WordPress.org

Ready to get started?Download WordPress

Forums

WP Under Load (12 posts)

  1. RustIndy
    Member
    Posted 9 years ago #

    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?

  2. error
    Member
    Posted 9 years ago #

    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.

  3. RustIndy
    Member
    Posted 9 years ago #

    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...

  4. 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.

  5. masquerade
    Member
    Posted 9 years ago #

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

  6. Matt Mullenweg
    Troublemaker
    Posted 9 years ago #

    Here's a link to WP-Cache:

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

  7. XeroCool
    Member
    Posted 9 years ago #

    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

  8. davidchait
    Member
    Posted 9 years ago #

    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

  9. XeroCool
    Member
    Posted 9 years ago #

    Thanks Dave. Ill try Staticize-Reloaded out.

  10. 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.

  11. Denis de Bernardy
    Member
    Posted 9 years ago #

    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. :)

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

  12. 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.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags