We're spinning up our new Moodle server for the academic year; running Moodle 3.3 from GitHub on a dual-core CentOS 7 VMware VM with 16GB of RAM. This is a better-resourced VM than what we've used in the past, so it should be speedy. This time the PostgreSQL database is running on the same VM as Moodle; normally we have it running on another server that supports multiple databases.
We're running PHP 7.0.19, and PostgresSQL 9.3. So here's the problem-- pageload times are ridiculously long, especially on the front page. Pageload times can be up to a minute to 1.5 mins. the main culprits are things loaded by /ajax/service.php, waitimes for message_popup_get_unread_popup_notification_count, and core_fetch_notifications take the most time (the former usually taking a minute to 1.5 minutes, the latter ~30S). We tried downgrading to PHP 5.6.5, thinking PHP 7 might confuse Moodle somehow and got nothing.
Based on past experience, this server should just work nicely, but clearly something's not right and we've gone down a few rabbit holes that just go deeper and don't reveal a clear place where something is misconfigured. We'd really like to resolve this quickly, since I have faculty that are ready to start moving into the new server, and I can barely get it fully configured, much less invite them to use it. As it is the server is not functional for endusers.
Any advice folks can provide will be much appreciated.