View Single Post
  #19  
Old 25th August 2009, 05:13
bajodel bajodel is offline
Member
 
Join Date: Jul 2007
Location: Italy
Posts: 63
Thanks: 26
Thanked 12 Times in 11 Posts
Default

Quote:
Originally Posted by MrM View Post
OK, I've changed it to 0.
EDIT: Should the swap usage decrease without rebooting the server? Or will it only stop growing (in case this setting helps)?
(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

Quote:
Originally Posted by MrM View Post

.. 270m apache2
.. 270m apache2
.. 270m apache2

I don't think I quite understand the swap column here. What does 270m mean? 270MB? Surely not?!
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.


Bye..

bajodel.

Last edited by bajodel; 25th August 2009 at 05:39.
Reply With Quote