2

We have a dedicated server that feeds a very large wordpress site with a lot of advanced queries - large integrated CMS/Video-enabled with a ton of extra WP fields added on.

The server is 32G memory, 4Quad running W2012 with apache(2.4)/php5.6.3/mysql5.7/tomcat8 - everything over ssl.

The server stack was just recently updated and we haven't finished configuring it.

With just some basic tweaks... things aren't running to great.

  1. A static page is at 240 ms - great.
  2. a wordpress page out of the box with no plugins... 800ms-1.2s... not great at all.
  3. Our main site - just a blank page. About 800ms... blah.
  4. Our main site homepage - about 2-4 seconds
  5. Our main site page with a lot of dynamic queries - 4-30 seconds (kid you not).

Background: Before the server was upgraded to the latest stack our sites performance was much quicker but we were getting a ton of out of memory errors - and these happened at a greater rate on larger pages but always around random code bits. Since the upgrade we have had zero memory errors and really no php errors at all.

I can copy over server configurations if needed but I have php's memory set at 2GB, I have 15G allocated to innodb, and I have played around with the mpm worker settings - and really everything I do, doesn't really effect the server ttfb issue. No errors in apache logs, nothing in php logs.

I am noticing extremely high CPU utilization by apache - we are only getting like 10K hits a day and it is always back and forth between 50-95% staying closer to 80% most of the time. Also I notice that the CPU pegging happens instantly after I restart apache with no visitors. At the same time apache appears to be using very little memory - 300M max when before our upgrade apache was always at 1G plus.

(Side question here - is there a utility to see what apache mods are using CPU/memory - ON WINDOWS)

Where is the first place I should start troubleshooting this? I would like to keep the WP side of this out of the question - that can be its own question. For instance on our heavy pages I mentioned 4-30 seconds... 4 would be acceptable for now. I am wondering why we are getting the ttfb extreme spikes. Let me know what other info you need me to provide. (also can someone add W2012 tag?_

10
  • It sounds like the database is a big part of the problem for you. Are you logging database queries and minimizing the number of queries per page? Have you installed something to cache db queries and pages like memcache and w3 total cache? Commented Jun 30, 2017 at 8:55
  • Make sure the server isn't using the SWAP as that will absolutely kill your SQL queries. There are several plugins online that can help you worm out or monitor SQL queries, wordpress.org/plugins/query-monitor is a good one that I've used in the past. The reason that your ram usage by Apache might be lower is the concurrent sessions, if the previous one allowed more, it would consume more. Commented Jun 30, 2017 at 10:54
  • Do you have a development server running the same site to test with? That would help you narrow it down to application problem vs. server/load issue. In addition to the other suggestions I'd suggest enabling the slow query log (in dev) to see if that gives you any clues. Commented Jun 30, 2017 at 16:43
  • @StephenOstermiller - My first reaction is that it is an issue between Apache/mysql or mysql itself. I just don't understand why it seems my longer database queries are timing out or looping when I have so much memory allocation for it. I have ran bigger WP sites on less spec'ed boxes without all of these issues.
    – blankip
    Commented Jun 30, 2017 at 18:27
  • @SimonHayter - am installing a duplicate site so I can turn on the query monitor plugin. Will tell you how this turns out.
    – blankip
    Commented Jun 30, 2017 at 18:36

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.