July 11, 2011

Swap utilization going over

What is the issue if swap utilization is going above threshold on a Linux server, again and again?

If you are using swap means your server is running low on resources. And if...

If you are using swap means your server is running low on resources. And if you are filling up the swap... you desperately need more RAM/SWAP on your system!!!

dd if=/dev/zero of=/swapfile1 bs=1024 count=524288 will create you a 512MB file

mkswap /swapfile1
swapon /swapfile1

Will enable that swap for the system :)

You can of course make bigger or smaller swap files.

Regards

Like  (0 likes)

SWAP partitions are used to support virtual memory. Actually, data takes to...

SWAP partitions are used to support virtual memory. Actually, data takes to swap partition when there is not enough RAM to store it properly specially when system is under process. Generally, it is equal 2x physical RAM for up to 2 GB of physical RAM (specially on Linux distro), but never less than 32 MB.
Sometimes over utilization makes the system slow and I myself experienced the same problem. I pass the command like: swapoff -a (for over utilization or overcome the slowness) if u make it again pass as: swapon -a
For more details see man swapoff / swapon
If u want to see per processor swap utilization then type as :
ps -ef

Like  (0 likes)

@ Ben : i got one doubt now. Whether kernel remove/kill the recent process or...

@ Ben : i got one doubt now. Whether kernel remove/kill the recent process or the most unused process in swap ?

Like  (0 likes)

you cannot allocate more memory in your sistem and the kernel will call the...

you cannot allocate more memory in your sistem and the kernel will call the OOM killer which tries to kill the latest process or a process with an huge amount of memory allocated (usually the current running one)

Like  (0 likes)
Click Here!