Traffic, Memory & WP Super Cache

During last week I’m working on a new server. As my hoster didn’t accept anymore the traffic on my shared hosting, I need to move it to a virtual server. I want to share some experience with you about this adventure :

Let me first say that I’m not very often use Linux before, thanks to the internet there is a lot of explanation how to configure it… I setup my new virtual server with Debian 4 / Confixx 3 which bring me in the same position as before on the share hosting. As I’m not knowing what kind of server performance I need for my traffic/usage, I ordered a server with 500MB RAM / 16GB hard disk space and unlimited traffic…

I installed Munin and switch the domain in the evening (21:00) of 20th.Sept. The first result was absolute horrible, my page was not longer reachable, the server crashed 2-3 times ! What happened ?

Munin Memory overview

Now a sever with only 500 MB dedicated RAM runs out of memory within a second if you use WordPress. Not sure if this is a misconfiguration on my side, but every visit on my homepage require 16-22MB RAM  :

Process overview

I need to raise the memory (which means I need to order a higher server pack) and also increase the Apache MaxClients Value to 30, since that time the server is stable. As I’m not willing to pay this price, I need to look now for a decrease of my server load. One major problem is the feed in my plugin NextGen Gallery. Every user of this plugin visit sometimes the “Overview” page which includes a feed of my blog. This causes a dramatic increase of traffic for my homepage.  I redirect all feeds now to feedburner, and after one day I can say that at least 7000 people visit per day the overview page.

In a second step I installed WP Super Cache.  I’m just interested how it affected my memory usage on the server, but either I misconfigured it or my Apache setup is not correct, nevertheless as you can see from the upper graphic, the memory load didn’t decrease, only the SQL queries decrease a bit. (WP Super Cache is running since the 23th Sept.).

SQL Queries

That’s the current status, I’m planning to move the content of this homepage to a new domain and new server,  but I need to check out the best web hosting offers, my current one is (for me) too expensive… need to look for better ways to keep this page reachable.

Advertisements

14 thoughts on “Traffic, Memory & WP Super Cache

  1. Alvaro says:

    Hi Alex,

    how much are you willing to pay for the Virtual Server? I manage some blogs with high traffic and I could offer you some options.

  2. foomip says:

    Have you checked out the VPS offerings from SWVPS http://www.swvps.com? They offer very competitively priced server and VPS offerings.

    I must say though, for stability nobody beats http://www.linode.com, and they are very well priced too (unfortunately they only offer hosting in the states).

    Have a look at them and let me know what you think.

  3. Greg says:

    1and1 just started offering cheap unlimited traffic accounts. Cheap as in starting at under $10 per month. 1and1 has a mixed reputation as do probably most low cost hosts. I’ve used them for over five years for a site without almost any traffic, so can’t speak to what happens when it gets moderate traffic.

    http://order.1and1.com:80/xml/order/Hosting;jsessionid=FD8EC801140D0D7D727DC9B9F8D87FC3.TCpfix142a?__frame=_top&__lf=Static&linkType=btn&linkOrigin=Home

    I’m just a user, so no benefit to me if you sign up. Although I’m sure there are links that would kick back a few cents to me, but I’ve never looked into it.

    Good luck. WordPress works there.

  4. Danny says:

    Ich kann campusspeicher.de sehr empfehlen. Zum einen wegen den niedrigen Preisen, vor allem aber wegen dem Support. Selbst am Wochenende erhält man innerhalb kürzester Zeit eine Antwort. Und die helfen auch gern beim Einrichten und Verwalten. Vielleicht ist das ja was für dich.

  5. Maria says:

    Would this effect the way the albums are working? I can’t seem to add to my current one now…

  6. XANi says:

    Dont use apache on VPS! It reallty uses a lot of ram, expecially with mod_php. On my VPS i have lighttp + php thru cgi and it uses lot less RAM. Only thing that ull have to play with are rewrites but google for it, i saw few howtos.

  7. chris says:

    definitely apache is a memory hog in general: it hosts PHP in each apache process, and forks a pool of apache workers that will quickly use up all your memory, like you’ve seen.

    you need to set MaxClients = Total RAM / average apache process size. that’s simply the max number that your system can run at once without swapping! look into lighttpd and FastCGI if you really want a good VPS solution for PHP.

    WP SuperCache is great but be sure to turn on the rewrite rules if you’re using apache, or use the lua script that is floating around various blogs for lighttpd.

  8. alex.rabe says:

    @Xani/chris : Thanks for the tips, indeed CGI/FastCGI should be a solution… Need to check out how I can rebuild it in this way.

  9. Mike says:

    I’ve just moved to slicehost and a virtual server with just 256Mb RAM, and it was hopeless with Apache. I have since set up nginx + fastcgi, and it flies. Memory usage is now just 120Mb with WordPress and lots of plugins. I use APC with PHP for caching.

  10. Angelo says:

    Hey man…DON’T use apache2 but Fast-CGI!

  11. Nokao says:

    Hi Alex.

    I switched recently with my 40 WordPress websites to a new virtual dedicated server … and had the same problems.

    My apache2.2 daemons grows fast to 40-50 MEGABytes, so I need to have only 15 open at time with a 1.5 Gb RAM server.

    WordPress is really heavy, I had also to put memory_limit = 50M in my php.ini file because sometimes the admin page was using more than 40.

    I can only suggest to you to do something like this:
    KeepAliveTimeout 3

    So at least few opened daemons can serve a lot of clients because the slow ones are disconnected fast.

  12. Nokao says:

    p.s. I also had the “server crash” problem that is, indeed, a 99% cpu usage of apache.

    This is my actual configuration with 1.5 Gb RAM and 2 CPUs at 2500mhz:

    StartServers 5
    MinSpareServers 5
    MaxSpareServers 10
    MaxClients 80
    MaxRequestsPerChild 500
    MaxMemFree 450000

    I also have JSP (tomcat) on the server so this is why I need apache.

  13. Linto says:

    It is pretty pathetic that WordPress needs all these resouces.

  14. Amos Struck says:

    Hallo Alex,

    ich bin mit meinem Server bei http://www.providerdienste.de/ die managen den Server auch. Preis/Leistung sowie Support ist dort wirklich allererste Sahne.

Comments are closed.

%d bloggers like this: