Setting swapiness is how I can deal with a recurrence but it will not flush current swap. And I can not shut down any process to perform swap off. :( On 11/4/10, Eric Shubert wrote: > On 11/04/2010 03:26 PM, Bryan O'Neal wrote: >> Please no debates on why I need to clear swap... >> >> If I have a box with 20% free ram and 5% free swap but no paging >> activity - how do I force linux to release the allocated swap? I have >> ~ 2x as much allocated swap as free memory so simply turning swap off >> seems like a bad idea. >> >> Thanks >> > > To minimize swap use, put > vm.swappiness = 0 > in /etc/sysctl.conf file. You can also change it on the fly in the > /proc/sys/vm/swappiness. > See http://unixfoo.blogspot.com/2007/11/linux-performance-tuning.html > > AFA purging the swap file is concerned, I only know to stop and start it > again: > # swapoff -a && swapon -a > You might not run into trouble doing this, as there's probably a good > deal of (filesystem) cached ram being used that the kernel will give up > if it's needed for running processes. Do the math though to be sure you > won't run out. Either that or stop some less important processes while > you do it. > > -- > -Eric 'shubes' > > --------------------------------------------------- > PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us > To subscribe, unsubscribe, or to change your mail settings: > http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss > -- Sent from my mobile device --------------------------------------------------- PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us To subscribe, unsubscribe, or to change your mail settings: http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss