Swap with low'ish load
I have a Linode 1024 with CentOS and Cpanel installed. It runs Nginx in front of Apache. I have some clients on it, most of which have tiny amounts of use (few hits a day). There are a couple forums with a total of +/- 200 visitors a day, none heavily used.
The biggest spike in use will be when I make a blog post (e.g. http://www.akivathedog.com/
What I am seeing at these times that I post to facebook and get a bit of traffic is that I start using up some swap, which makes me think I am running OOM.
Graph showing swap use jumping up:
vmstat and ps aux –sort -rss just during regular running time, I didn't run these when it was swaping, but will next time I catch it.
I know that I have some overhead from cpanel and it's related software, but that's why I put it on a 1024 linode (I've been told that cpanel with low traffic sites can easily get by on 512). I know I could install WPSuper Cache or similar, but am questioning why this is necessary with the resources I have.
What can I do to investigate this further? It concerns me that I am seeing swap'ing with this low amount of traffic and based on the swap I'm seeing; I think I would see performance rapidly decline / crash if the traffic doubled or came in faster.
I had played around with using a custom Kernel http://cloudlinux.com/
Thanks very much for your input.
Jamie
2 Replies
Running out of memory AND using swap is BAD.
Check how much memory you have left (+/- buffers and cache) when the swapping happens. If you have plenty left, there's not much to worry about. As long as your pages are loading quickly and your server doesn't feel sluggish, it's probably not an OOM situation. But you could always optimize a bit more to reduce swapping if you're concerned about it.
@hybinet:
Using swap is OK. Linux often uses swap even when there's plenty of memory left.
Running out of memory AND using swap is BAD.
Check how much memory you have left (+/- buffers and cache) when the swapping happens. If you have plenty left, there's not much to worry about. As long as your pages are loading quickly and your server doesn't feel sluggish, it's probably not an OOM situation. But you could always optimize a bit more to reduce swapping if you're concerned about it.
Thanks for your response. I'm going to run a loadimpact.com test on it during off hours and see how it responds and what my swap use looks like.
Thanks
Jamie