Swap with low'ish load

Hello;

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/ ) and put it on facebook. This can result in what I still consider a trivial amount of traffic, perhaps 100-200 loads in an hour, but at times some of that traffic comes fairly rapidly, but really what were talking about might be at most a page load every few seconds for a little while. Still doesn't seem like it should amount to enough to max out the ram.

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:

~~[https://docs.google.com/leaf?id=0B-mn8OFdOruNmI2MGQ3YmItZWRmOC00OTllLTg1MTktOWQ4MWE0Y2E0NWM5&hl=enUS" target="blank">](https://docs.google.com/leaf?id=0B-mn8O … 5&hl=en_US">https://docs.google.com/leaf?id=0B-mn8OFdOruNmI2MGQ3YmItZWRmOC00OTllLTg1MTktOWQ4MWE0Y2E0NWM5&hl=en_US](

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.

http://p.linode.com/5916

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/ and am still set to PVGRUB; it is basically a slightly modified centos kernel. I planed to switch this back to regular centos. I don't know if this could effect anything or not.

Thanks very much for your input.

Jamie

2 Replies

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.

@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

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