Linux.com

Home Linux Community Forums Linux System Administration System Management Swap space is never used, are my settings correct

Swap space is never used, are my settings correct

Link to this post 02 Oct 10

Since it is a VM there are additional layers that could be causing the problem such as contending for resources with other VMs running under the same host or potential issues with the virtual disks. I would recommend monitoring both the VM client and the host machine to track bottlenecks and their sources.

Link to this post 04 Oct 10

The issue just happened, so after fours days of up time the server memory shows following:

top - 09:03:38 up 3 days, 22 min, 2 users, load average: 0.00, 0.03, 0.00
Tasks: 104 total, 1 running, 103 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.2% us, 0.2% sy, 0.0% ni, 98.6% id, 0.8% wa, 0.0% hi, 0.1% si
Mem: 3089396k total, 3059924k used, 29472k free, 137096k buffers
Swap: 2031608k total, 0k used, 2031608k free, 2526236k cached

So, at this time when any client tries to copy that 200mb file, it hangs. So, somehow it never starts using the
swap space. (which its supposed to start using when RAM is near full!)
I am now rebooting the server to avail all the 3gb RAM!

Link to this post 05 Oct 10

Based upon the amount of RAM that is still showing as free, I don't think the actions are really eating the RAM. Have you considered that the RAM may be used for the prefetch operations? Read http://www.linuxatemyram.com/ to learn about RAM usage, it will also tell you how to free the cache next time it appears full so you can properly asses the RAM use.

I highly recommend looking to the operations on the host machine and the other virtual machines on the host to find the source of the bottleneck.

Link to this post 27 Oct 10

Ram is like real food and swap is like army rations. You only eat the army rations when you run out of real food, and when you have to eat army rations, life sucks. Whatever solution you come up with, using swap is probably not what you want to do.

What virtualization system are you using? Vmware? Xen? KVM? What other things is the virtualization host doing? How many other VMs are you running? How are they behaving?

What kind of HDD setup do you have? If the host/dom0/metal just has a regular disk, and your'e sharing it among multiple VMs including this IO intensive one, that's probably your bottleneck. Is the host OS using lots of swap? I could imagine something like you're describing if the host OS is thrashing but the guest claims to have free ram.

What are you doing that's using so much network? You may have to figure out a better way to make everyone play nicely. Do you know for a fact that things only go bad when multiple hosts do these big transfers, or is it just a slow creeping death?

Really, as I'm typing this, it smells like you have a memory leak that you either need to plug or restart the responsible process automatically. That should be easy to set up. Do you know what processes are eating the ram? You should find out.

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board