Hi, I have a site in production which is operating very slowly. I have spent all day optimizing it, but it’s still very slow. I will skip over everything I did, because ultimately I am wondering if it’s something with my server config (or maybe with my server itself).
This is the reason I’m wondering that. I made a basic template with NOTHING on it. Then ran it with Output Profiler. AND this is with extensions disabled (set to ‘n’) in the config file..
base time:0.0156
controller execution time: 1.2012
total execution time: 1.2168
memory usage: 3.5 million bytes
16 queries
PHP (without EE) memory usage = 256 K
Now it is night time and I tried it again. This time extensions is enabled. But traffic to the site is very low. Again this is for the page with nothing on it:
base time: 0.0312
controller: 1.3416
total: 1.3728
memory usage: 6 million bytes (because extensions are enabled, I think)
21 queries (because of extensions)
Another thing that jumped out at me was the individual SQL execution times. The very first one is:
SELECT * FROM (`exp_sites`) WHERE `site_id` = 1
#EE_Config.php L:208 EE_Config::site_prefs()
which takes a whopping 1.0296. The other 21 queries combined only take 0.0312. What is it about that first SQL statement that makes it so slow.
Another question. I have the exact same site on a testing server. It’s not optimized or anything, but yet the times are much faster. Here is the same page with no content in the testing server:
base: 0.0098
controller: 0.0977
execution: 0.1077
memory usage: 13 million
26 queries
So it’s not that fast either, but still much faster than the production server. And yet it’s basically the same site, same add ons etc. (the production server has some tweaks and optimizations, so it should have an advantage) The first SQL statement again is:
SELECT * FROM (`exp_sites`) WHERE `site_id` = 1
which comes in at 0.0006! Compared to 1.0296. It’s mostly this first SQL statement in the production environment that is taking so long, and I’m not sure what the cause of it is.
I’m running EE 2.8.1.
Any help is much appreciated.