Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Munin shows ram that is doing nothing most of the time. But swapping still happens. Quite regularly actually, bogging down the hdd.

enter image description here

Or am I seeing the ram graph in the wrong way? How would I go about diagnosing this kind of problem?

share|improve this question

2 Answers 2

up vote 0 down vote accepted

Ok, let's look at this in more detail then.

From you image, I get that your server has a couple of moments during the day, where it reports a couple of pages being swapped out.

A memory page is 4KiB in size. That is 4096 bytes. The maximum amount of pages I see swapped out per second in your graph is 2. That is 8192 bytes per second for a period of maybe 10 to 15 minutes. Your harddrive can handle this. Really. This is not bogging down your harddrive. If it is, you really need another drive. Even simple harddrives are generally able to handle dozens of megabytes per second.

Now, as for why your server is swapping: it is pretty normal for a Linux system that has been on for a prolonged period of time to use some swap. Only pages that are hardly ever accessed are swapped out and you should not notice any negative effects when this happens.

Again, in your case, only a couple of megabytes have ever been in use as swap. I cannot relate the white parts in your graph to the minute amount of swapping that occured. Are you looking for that?

share|improve this answer
    
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. –  Dave M Apr 8 at 18:58
    
Thank you, now that clears it up nicely. –  Red Balloon Apr 9 at 6:49
    
I've to look somewhere else for the root of the problem. Yesterday at around 8:30PM network became very slow, server was giving me download speeds around 80kbps from 10mbps. –  Red Balloon Apr 9 at 7:00

Sometimes Linux swaps even when there's enough RAM, if this is causing a problem you can

a) Reduce the swappiness value

b) Reduce the size of the swap partition or get rid of it altogether. (I personally like to have a very small swap partition, many sysadmins like none at all, it depends of what kind of failure -oom vs swapping- is worse for you).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.