• Currentely my hoster is complaining that the server of my website is using an awfull lot of resources. 75% serverload while the website is hosted on a 4x Xeon.

    Iam using a WP version that was released before the 2.0 version. I read somewhere that WP is known for theire serverload problems. Is this true? And if so, does WP 2.0 has the same problem or is it lighter to load?

Viewing 15 replies - 1 through 15 (of 15 total)
  • Version 2 does use a cache, meaning that less is generated on the fly. So, once a page is generated, it is stored as a file and then just included, rather than have everything, like the time, the category, blah blah, put together every time a request is made.

    Probably would be a good idea to upgrade, but I’m not a WP developer, so I can’t make any promises.

    When you do upgrade, be sure to disable the rich text editor, it causes more problems than it’s worth!

    Version 2’s cache is an ‘object cache’ not a ‘page cache’. Don’t confuse them.

    If you want better performance at the page level, you need to install something like WP-Cache (which should have versions that work on both 1.5 and 2.0 revs). It will cache the output of an entire generated page, and serve it up when requested again. The downside is that if you have any dynamic php that needs to be executed every pageload, you have to wrapper it specially or it will become ‘static’ for the life of the cached page (some number of hours, usually). Could be a plugin call, a PHP-based ad or graphic rotator, etc. — they’d all be cached. Proper wrappering of custom php stuff, OR using Javascript approaches, will get you around that issue.

    So, try WP-Cache (or the older Staticize Reloaded code) if you want to see big performance gains. Don’t upgrade expecting to see an out-of-box big performance difference (though there have certainly been code optimizations and query optimizations made…).

    (oh, and I’m on Site5 too… ?? )

    -d

    Thread Starter nieuws

    (@nieuws)

    Thank you for the replies. I don’t know where the serverload is comming from. I don’t have an increasement in traffic at all, didn’t install nor change anything.

    However when i was reading upon wp i noticed some people saying it’s a very intensive script. Some decline that, but hell, i have to try something ??

    David > Is your linked site the one on Site5? May i ask how many unique visitors it has per day? Just to compare the serverload.

    Sorry, my mistake! As I said I’m not a wordpress developper, so I wouldn’t know much about how it uses the cache!

    Hope everything turns out well for you, nieuws.

    Thread Starter nieuws

    (@nieuws)

    Thanks!

    Anyone has other solutions exept caching the page? I just want to do as much as i can.

    Perhaps the plugins make any difference. I have the following plugins installed and running:

    – Customizable Post Listings by Scott Reilly.
    – Link Truncator by Sam Ingle.
    – Custom posts per page. Based on code by rboren & brehaut.
    – Quote Comment by Viper007Bond.
    – User online by Gamerz.
    – Force Word Wrapping by Jim Wigginton.
    – WordPress Database Backup by Scott Merrill.

    Customizable Post Listings is the most important plugin iam using.

    I also have a couple of plugins installed but not activated. Would it help if i delete them?

    For more information about that https://www.coffee2code.com/wp-plugins/

    To check my site see https://www.nieuwszicht.com

    Anything having to do with comments is suspect… Some of the top offenders were various comment-count plugins.

    But otherwise, I don’t know particulars about any of the plugins you’ve listed. For all I know, some could be doing evil things, or completely innocuous in the grand scheme.

    Have you checked your access and error logs? If you are getting say spammed, or hit by search bots, that can spike things. Nothing ‘just happens’ with performance — either code changed, or visits/hits changed. ??

    I’m down to about 300-500 unique IP visitors per day, so I’m not a heavy load.

    You can also look via the stats stuff in the control panel (or access-log parsers) to see where your bandwidth is going, which might tell you something too.

    -d

    Thread Starter nieuws

    (@nieuws)

    Thanks David, iam going to check that.

    Another question (i keep on asking ?? )
    Last week all of a sudden zillions of spambots found my website. They all started to spam comments like crazy. Since the website is in dutch it was pretty easy to setup some wordfilters in the blacklist list in WP. Do you, or anyone else, perhaps know if this causes extra serverload? Perhaps because every comment needs to be scanned on all these words in the list.

    it certainly does increase load. the wp code has to load up to the point it grabs the posted comment and tries to figure out what to do with it.

    in combination with any kind of comment-tracking or comment-status plugins, that could have caused a huge spike if you got enough spam.

    definitely might be worth installing something like badbehavior as well.

    but for total dynamic load times, wp-cache is the only big winner.

    Again, after you look at logs and the stats packages, you’ll have a better idea of what is causing hits.

    Hi,

    yes, trackback and comment spam CAN hit the server, especially when – like in the past days – you get batterings of 10,000 spams in a few hours.

    Just thought this might be useful information, if only to provide a little background to the subject. I’m not an expert, however, so this is all subject to the correction of people who know more about it.

    Basically, the way PHP works is that it executes the script every time it is requested. That sounds obvious, but if you think about all the various variables that must be requested, it can all add up. For example, say I request your front page, PHP has to retrieve the number of posts to be displayed, this is pulled from options, which is in the database.

    Then it has to get the last X posts, and put together the contents along with the title, the date, any comments, etc etc.

    Then it has to sort these in the right order, and insert the data in the right way into your template. Finally, it has to output this to the browser, including any HTTP headers. And if you have Gzip enabled, it has to compress it too.

    And unless this information has been stored anywhere, i.e. a chache, it has to go through this every time for each request! Even if two identical requests are made simultaneously.

    So basically, the server has to do a lot of thinking, which is what takes up resources.

    Compare this to a static HTML file, where the server just sends it to the browser, and leaves it there ??

    Actually, there’s a lot more to it that can change the performance.

    First, there are opcode caches, which can significantly boost the performance of dynamic code. For some reason, not every host is running them… But in the case of the opcode cache, it removes PHP having to dynamically process through the php file, and ‘generate’ the code for execution, then execute it.

    Second, there are various caching systems, both at the server level (like memcached), the program level (wp-cache), and the sql level (mysql’s query caching). Each of them can significantly change the loading time depending on how they are set up. There is also the ‘object cache’ of WP2, which effectively tries to cache the results of certain specific queries on the webserver end (which, depending on the architecture of your hosting box(es), typically will not make any useful performance difference..).

    WP-Cache in particular is one thing everyone has in their control (rather than the host’s control), and is the closest thing to delivering static pages back. The difference is that apache still has to start up php, and the wp code has to load far enough to trigger wp-cache, and wp-cache has to decide whether the requested page is in its cache… etc.

    However, it has been shown (in other discussions) that well-configured systems using a combination of caching and performance tuning can deliver millions of hits a day under WP/PHP.

    Anyway, just wanted to make sure it’s understood that it’s much more complex than simply “PHP vs HTML”, that there are ‘intermediate’ stages along the way.

    Oh yeah, AND the webserver software being used (i.e., apache, iis, lighttpd, thttpd, etc.) also significantly impacts performance of heavy sites, PHP or otherwise. In fact, if a lot of a given site IS static information (CSS, graphics, JS, etc), and not WP PHP code, then a number of alternative webservers could make huge performance differences — if you are hosting yourself and can change webserver apps! ??

    -d

    nieuws, it might be an idea to ask your hosting company what they think is causing the resource use — if antyhing they might be able to provide you with URLs, or at least time/date information which you might be able to use to help.

    It might not even be WordPress…

    Thread Starter nieuws

    (@nieuws)

    Thanks again for all replies everyone.

    I asked Site5 what they thought, according to them the frontpage (WordPress) is causing the problems. The rest of the pages not so mutch. Probably cause the frontpage reads 7 short exerpts, 30 headlines, 37 comment counts and the stats. Exept for the stats all are Customizable Post Listings commands.

    Thread Starter nieuws

    (@nieuws)

    I cleaned up some code and installed the WP Cache 2.0 plugin. However i have no clue if it’s working or not.

    The front page loads up 7 excerpts, 30 headlines, 37 comment counts and a lot more. If those queries are cached it would be an enormous power saver. Instead of loading all the queries constantly i want to load it from the cache and refresh it every 30 minutes. However, when i post a new article, it’s inmidiatelly on the front page, the same counts for comments in posts. Of coarse iam glad it is there instantly, that’s the purpose of a news site, being fast, but it leaves me thinking the index isn’t cached after all. Or is it?

    If wp-cache is doing things correctly, it should invalidate a cache entry when you post, or when there’s a comment.

    And, yes, I’ve found many sites with performance issues are those showing comment counts…

    You >might< be a candidate for the ‘object cache’ of WP2 — though I would generally look at custom solutions, such as CPL caching headlines and comment counts itself… Given the security issues with the object cache that have recently been discussed (not huge, but better to avoid them entirely…).

    -d

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘WP 2.0 serverloads’ is closed to new replies.