• I was trying to figure out how much RAM / CPU I needed at a bare minimum to host a wordpress blog, and I stumbled on something rather annoying.

    I am using wp_super_cache to create static pages of the wordpress posts and lighttpd + an LUA script to redirect a user to the wp_super_cache-generated page immediatly. This saves alot of server resources. Even with a 500 Mhz CPU and 128 RAM I could serve ~120 pages per second.

    The only real load comes when wp_super_cache has to generate a html file because none has been made yet, or a post has been updated / a comment added. So this mostly happens when a new post is added, because this means all of the index pages need to be updated, because all posts are moved 1 place down. Now have a look at this.

    Picture of memory cache tests

    I don’t understand why wordpress is moving so much into the cache. Sure, pages after the initial one take 3 rather than 13 seconds to generate because the cache is only filled on the initial load, but it took 3 seconds in the first place, so why is it loading stuff into the cache at all?

    The reason I want to get rid of this behaviour is because I want to host at a bare minimum and since I am using wp_super_cache + an LUA script to redirct there imemdiatly, this caching stuff is making the server (when its at 128 RAM) extremely slow, nearly unresponsive even, for no good reason. Which doesn’t make any sense at all because I am basically requesting the exact same page to be generated. I want wordpress to completely ignore the fact there are thousands of post, and just focus on the 10 that are being requested.

    tl;dr version:

    How do I alter the wordpress code so that it completely ignores all posts, except for the ones being requested on the index page(s), to prevent allot of unnecessary stuff being written to the memory cache.

  • The topic ‘Big wordpress blog causes memory cache to become huge for no good reason’ is closed to new replies.