View Single Post
  #21  
Old 27th August 2009, 00:15
MrM MrM is offline
Member
 
Join Date: Oct 2008
Location: Ljubljana, Slovenia
Posts: 58
Thanks: 6
Thanked 0 Times in 0 Posts
Default

Sorry for not replying for a while. I was quite busy the last couple of days.

Quote:
Originally Posted by bajodel View Post
So.. MrM ..how things are going ?
Is swap devouring your expensive server ?
I do believe, that swap usage has stopped increasing ever since I changed swappines to 0. I have also not observed any adverse effects of this change.

Quote:
Originally Posted by bajodel View Post
(in case) ..i think it should stop growing.. at least.
No reboot is required.

But ..if you want to test the 'trend' from the initial status (low swap) you can:
# echo "0" > /proc/sys/vm/swappiness (mod swappiness behaviour)
# sync (recommended before drop cached memory)
# echo "3" > /proc/sys/vm/drop_caches (drop chached memory)
# swapoff -a (disable swap)
# swapon -a (re-enable swap)

It's heavy to swallow for your server ..but i think it's (quite) equivalent to rebooting. At worst you can cron that in a script :-) if you cannot find a solution
I will now try this, to clear the swap without having to reboot, and cross my fingers it doesn't start growing again. I'll also make the swappines change permanent, by setting vm.swappiness=0 in /etc/sysctl.conf.

Quote:
Originally Posted by bajodel View Post
For 'top' the default view is kb (when not explicit) ..in your case is surely mb .. but consider:


p: SWAP -- Swapped size (kb)
The swapped out portion of a taskÔs total virtual memory image.

o: VIRT -- Virtual Image (kb)
The total amount of virtual memory used by the task. It includes
all code, data and shared libraries plus pages that have been
swapped out.

VIRT = SWAP + RES.

q: RES -- Resident size (kb)
The non-swapped physical memory a task has used.

RES = CODE + DATA.
I'm not sure I entirely understand this. So, is 270MB per apache process normal?

Thank you very much for taking the time to help me solve this problem, bajodel. It appears, for now, that the swappiness setting did the trick. I would never have figured this out on my own.
Reply With Quote
Sponsored Links