Advice on Webserver for Linode 720

I've been hosting a few very low traffic Wordpress blogs using a normal LAMP stack. The blogs are getting a bit more traffic and I've found myself running out of RAM. Because this is all for non-profit organizations I was hoping to find a way to make the most of the current node, without needing to upgrade to the next service level.

I'm pretty limited in my understanding in this area, but so far I've tried reverse proxying nginx to apache but couldn't get it to work, and tried just nginx+spawn-fcgi, but couldn't get that to work either.

My thought was to give Cherokee a try since Linode has a nice tutorial on it, but I don't want to waste another few days messing with it its not going to help.

So, I guess my question is: Would Cherokee help lower my memory footprint and be easy to maintain like Apache, or am I better off just sticking with Apache and stepping up to a bigger linode?

Any help or advice at all is much appreciated.

12 Replies

> I've been hosting a few very low traffic Wordpress blogs using a normal LAMP stack. The blogs are getting a bit more traffic and I've found myself running out of RAM.
A "normal" Lamp stack isn't appropriate for a VPS without some serious tightening of the config files, particularly your my.conf (see /usr/share/doc/mysql-server-5.0/examples) and apache.conf, at the very least. There are gazillions of posts on how to do this, both here and elsewhere. Eventualy, there may even be a section in the Linode Library on it…

Otherwise, you're just going to need to figure out Nginx/Lighttpd/etc. Seriously, it's not that hard, and there are many here who can help.

Thanks for the reply mjrich. I've actually read through both of the those articles and spent a fair bit of time playing with my.conf and apache.conf, and employed memecache and wp-supercache, all of which helped. It's been a good learning experience.

Is it safe to assume that because I've followed the articles you pointed out, and am still having memory issues, that my best course of action is to take another stab at nginx/lighttpd?

When I tried nginx I followed this ~~[http://www.mensk.com/webmaster-toolbox/perfect-ubuntu-hardy-nginx-mysql5-php5-wordpress/" target="_blank">](http://www.mensk.com/webmaster-toolbox/ … wordpress/">http://www.mensk.com/webmaster-toolbox/perfect-ubuntu-hardy-nginx-mysql5-php5-wordpress/](

While it's tempting to say yes! – just dive into one of the other webservers, the reality is that you first really need to work out what is consuming all of your ram, when, and why. Out of curiosity, what does "a bit more traffic" translate to?

Installing munin (if you haven't already) should help nail it down, together with the standard cli tools, e.g. ps, top, htop, and scripts like http://www.pixelbeat.org/scripts/ps_mem.py.

Essentially, you need to know what is misbehaving (trying to serve too many requests, spending too much time waiting for a response, etc.), else run the risk of just fixing something that wasn't actually the problem.

There are 4 Wordpress blogs, which when I took over managing them were getting no more than 10-12 hits a day. At that point I had about 120 megs of free RAM. In that last few months the organizations that own the blogs have been growing, now they are getting 100-120 hits a day. In hindsight "a bit" was a horrible adjective to use.

I have not yet installed munin, I'll do that today. Been using top to asses memory usage and keep clients and servers in Apache under control.

Thanks for your help, it sounds like I jumped the gun and need to do more troubleshooting before asking questions. My apologies.

No worries.

You should be able to handle many, many more than 120 hits/day – 100 requests/second is quite doable (albeit using httperf to test Drupal on Nginx/fastcgi). If you're running out of ram currently, then there is certainly some more tweaking that can be done.

Good luck, and post back when you've got a bit of data from munin etc. :)

Just passing on advice I've picked up. Take a look at using WP Super Cache if you're not already:

http://wordpress.org/extend/plugins/wp-super-cache/

Have a look at this thread:

https://www.linode.com/forums/viewtopic … ght=apache">https://www.linode.com/forums/viewtopic.php?t=4340&highlight=apache

Are you really running out of RAM with 120 hits per day? Care to post the output of free -m ? Apparently many people get confused by the way Linux reports memory usage, so it would be better to check that first. FYI, It's the second line (-/+ buffers/cache) that matters.

Next, check the MaxClients line in apache2.conf, as well as the keybuffer line in my.cnf – these two lines are most often responsible for memory shortages on an out-of-the-box LAMP stack. As a safe default, Apache MaxClients should be below 50 (try 20), and MySQL keybuffer should be below half of your RAM.

Hrrm, 120 hits per day is basically idle…

I'm thinking this is probably another situation for:

http://www.linuxatemyram.com/

But we'll see after we get back the "free -m" output.

free -m reports the following:

total used free shared buffers cached

Mem: 720 648 71 0 145 359

-/+ buffers/cache: 143 576

Swap: 127 0 127

For Apache I am using prefork with the following

StartServers 2

MinSpareServers 2

MaxSpareServers 5

MaxClients 100

MaxRequestsPerChild 2000

My mysql key_buffer is at 64M

So it sounds like for sure I need to lower my max clients. Am I also misunderstanding how linux reports RAM?

edit: I am running Ubunutu 8.04 LTS

Indeed you are. You have 576MB free. Check out the link Guspaz posted.

:oops: I am now returning to the catacombs of the UX world, never to bother you nice people again.

Thanks to everyone for your help, sorry I wasted your time with a server newbie mistake.

@rivalsociety:

Thanks to everyone for your help, sorry I wasted your time with a server newbie mistake.
Don't feel too bad; I've seen experienced admins make the same mistake.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct