• One of our WP blogs was recently semi-slashdotted/neowinned and I’ve noticed something unfortunate – Apache 2 and MySQL 4.1 are extremely inefficient when compared to a site with very similar traffic using SQL Server 2000.

    Roughly speaking, this WP blog has had about 200,000 hits in the past 24 hours. But this caused Apache 2 to steadily use about 60% of the server CPU resources, plus a chunk for MySQL 4.1. The IIS site, by comparison, get about 110,000 to 130,000 hits per day (on average), but IIS and SQL Server only use about 10% of the CPU.

    I don’t know how many queries the blog is making, but I suspect it’s roughly the usual number between maybe 19 and 25. The IIS site makes 12 (mostly simple ones, granted).

    So my question is: can WP be made more efficient? Is this what caching plugins fix/help? Why does it take 20 queries to display the home page? If the server was a Linux distro, would the speed be noticably better under this load?

Viewing 11 replies - 1 through 11 (of 11 total)
  • That’s about 10 or 11 hits a minute average. What are you getting at peak times? It could be an Apache server configuration issue.

    Thread Starter rustindy

    (@rustindy)

    Just edited with the stats as of 1 minute ago – we only compile them every 24 hours normally, so the stats missed most of the bump. It’s been 200,000 hits in the past 24 hours! Also edited the IIS site for comparison – fortunately, there is one other site with a comparable load (during weekdays, at least) on the server. This only works out to about 2 or 3 hits per second, which is why I think the 60% server load is a little high…

    Moderator James Huff

    (@macmanx)

    Most unreasonable load is often related to certain plugins. Try disabling all of your plugins and see if that shows any improvement. Or, please list your active plugins here so we can comment on our load-related experiences with each plugin.

    Try something like WP-Cache, it’ll help out tons.

    Here’s a link to WP-Cache:

    https://mnm.uib.es/gallir/wp-cache-2/

    Thanks for emailing me the link Russ. Here are the plugins (And the blog was mine)

    Plugins:

    Bad Behavior
    Bad Behavior Stats
    Brian’s Latest Comments
    Comment Quicktags
    del.icio.us cached
    Gravatar
    Gravatar Signup
    MF Favorites
    Super Archive
    Textile 1
    Dunstan’s Time Since
    Underscore Permalinks
    WP-CaTT
    WP-shortstat

    When I got slashdotted, I was unable to access my site basically until I threw in a custom Staticize-Reloaded (the predecessor to WP-Cache).

    If you don’t have query-caching enabled on the SQL server, that’s one possible thing to try.

    Another thing is to use one of the PHP optimizers.

    A third thing is to run something like lighttpd or thttpd on another port to just serve images (if you have a lot).

    Lastly, of course, is playing with plugins and queries to bring stuff down.

    PHP optz + query cache + reduced queries will do a ton. But sometimes, a slashdot will put such a huge load you just need a ‘static’ page delivered. I only had staticize on for about 3 days, then disabled it again (I didn’t want to recode my site in order for the dynamic stuff to work properly within Staticize’d pages…).

    -d

    Thanks Dave. Ill try Staticize-Reloaded out.

    Moderator James Huff

    (@macmanx)

    If Staticize-Reloaded or WP-Cache don’t help, try disabling Brian’s Latest Comments. I know that there was a recent comments plugin that caused excessive load, but I can’t remember which. If that doesn’t improve the load, try disabling every plugin except Bad Behavior.

    wp-cache is sweet.

    super archives is a hogger. textile too. and gravatars too when you _enable_ caching (disable caching to reduce server load).

    Oh, and, er… My recent comments plugin comes with caching built-in. ??

    https://www.semiologic.com/projects/recent-comments/

    Moderator James Huff

    (@macmanx)

    Oops, I can’t believe that I didn’t noticed that. Super Archives is definitely the problem. We have a had a few forum members here kicked out by their hosting providers because of that plugin generating far too much load for shared hosting environments.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘WP Under Load’ is closed to new replies.