WordPress.org

Ready to get started?Download WordPress

Forums

[WP-Super-Cache] Memory Usage (10 posts)

  1. igneous
    Member
    Posted 6 years ago #

    I just installed this plugin [wp-super-cache], and pretty much immediately my memory usage on my vps went way up. Will this drop down? Also, Im not sure what to set my expiry time to, since my site has a lot of comments(if that matters?).

  2. DianeV
    Member
    Posted 6 years ago #

    > I just installed this plugin

    There are a lot of plugins for WordPress. Which plugin are you referring to?

  3. igneous
    Member
    Posted 6 years ago #

    wp-super-cache

  4. igneous
    Member
    Posted 6 years ago #

    this is what it did to my memory, the orange line:
    http://uploader.ws/upload/200801/default_1.png
    I deactivated it within an hour or so because it was crashing my server(which was maxed out BTW)

  5. DianeV
    Member
    Posted 6 years ago #

    igneous, whatever happened with this?

  6. igneous
    Member
    Posted 6 years ago #

    I gave up on it and ended up using 1 Blog Cacher plugin instead. Its the only cache plugin that I can use that won't crash my server. I would highly suggest it to anyone:
    http://wordpress.org/extend/plugins/1-blog-cacher/

  7. josh@bauguss.net
    Member
    Posted 6 years ago #

    well, i don't have an answer right now. But wordpress + plugins is a memory nightmare.

    A quick test from a blog not even live yet. I've got cforms, podpress, syndicate and a couple custom plugins enabled.

    The real culprit behind wordpress memory issue looks to be the options table. WordPress immediately loads all options into a global options array. (just put die(print_r($GLOBALS)) in an init hook of a plugin)

    So i did the following test.

    index.php i did an echo memory_get_usage();
    then in my init hook of a custom plugin I repeated the echo and then threw a die() so I would see the results.

    Before wordpress starts. php prints ~50kb of memory used. after the init is done, php is using 10mb of memory!

    Now this is with those plugins setup. I've got 5 forms setup in cforms. It looks like a design problem in the allowed usage of the options table. cform puts all its configured tables into the options table. This is really bad. While it might be ok for a site with very little traffic, its death if you get any decent traffic.

    Also keep in mind, that was just in the init hook. wordpress hadn't even looked up categories and posts yet.

    If none of these cache plugins takeover before wordpress loads options, then they won't save any memory.

    To harp a little more on the memory. That means php will load 10mb+ of memory into the apache process. I'm not gonna go deep into apache processes, but if you have high traffic, you might have over 80 processes running for apache. Each "live" process will expand its memory need and keep that memory until it dies. so if php demands more memory, that process will keep that memory for its life cycle.

    I'll be looking into this in the coming weeks as I have a new client who gets 50k hits a day on his blog and this memory issues is really killing his server.

    some more tests to run would be a default wp install and see what its base memory needs are. I really am beginning to feel that the wordpress devs should start educating their users on this. They could curve some of this by guiding plugin authors to not use the options table and keep their own options in their own table and not to load them in globals.

    Wanted to share these finds with you.

    best of luck, I'll try and remember to post my findings if I can solve this.

  8. Lassirra
    Member
    Posted 5 years ago #

    Any word on this?

    I run minimal plug-ins, tried wp-cache and wp-super-cache, and still my blog crashes and requires a server restart on an almost daily basis. While my blog gets decent traffic, it's by no means enough to crash a server that has only my site on it, and 2GB of memory in the box.

  9. Donncha O Caoimh
    Member
    Posted 5 years ago #

    Unfortunately some plugins do chew up memory. WP Super Cache needs as much memory as the length of the current page because it stores a copy of the page and also compresses it too so the compresses page has to be stored somewhere too.

    Some plugin authors really haven't a clue unfortunately about making their plugins scalable.

  10. Donncha O Caoimh
    Member
    Posted 5 years ago #

    igneous - I just figured out how 1blogcacher works: when the plugin sees a request for an uncached page it sends a request to your server for the exact same page and then caches that page.

    Check your access logs, do you have entries with a user agent starting with "1 Blog Cacher"? Those are the plugin requesting the same page again. That could skew your stats!

Topic Closed

This topic has been closed to new replies.

About this Topic