Carlos E. R. said the following on 01/16/2014 02:19 PM:
On 2014-01-16 19:42, Anton Aylward wrote:
Carlos E. R. said the following on 01/16/2014 12:59 PM:
Maybe I have that much in swap simply because I hibernate the system every night.
Very likely.
Why don't you try turning swap off then on again.
That's worse. Then memory that is currently free is used by what was out, in swap.
Possibly; possibly not. If the swap was allocated and used when in hibernate then its not in use by any process any more, but still 'allocated' as in 'high water mark'. Turning the swap device off de-allocates memory that isn't mapped for any process. Turn it back on and it sets the high water mark to zero. Right now you have lots of free memory. You have no reason for the current process set to be using swap. So long as there is memory available, either unused or reclaimable from the VM system, Linux won't use swap. If any process actually is using swap when you have free memory then something is very very wrong with your system! Very wrong! The VM system is, in effect, permanently in 'page out' mode, but using any page again bring it to the back of the queue. Only if there is no free memory will a page drop off the front of the queue "into swap". It its a code page then there is no reason to 'swap' it out, its already out there - in the executable or library file. If the data page gets references its brought to the back of the queue. "Only data pages ever get swapped out." Then there's IO buffers. But that's IO not swap. That you have free memory AT ALL means that there are pages on the free queue that have never been allocated at all. If the VM systems needs memory for a process and its not on the active queue, then it will take a page from the free queue and it goes on the active queue, which is LRU and whose front end might get swapped out. But so long as there is free memory there is no need to 'claim' a page from the active queue and push its contents to swap. Free memory means no swapping/paging. If you have free memory then why should there be anything in swap? There isn't, that's a 'high water mark' from when there was. And its from when you backed up physical memory when you hibernated. OK, I've skipped detail and used a very broad/generalized brush about how VM works, but the basic point holds: If You Have Free Memory Then You Aren't Using Swap. Modulo fringe cases. So try the swapoff/on and see what changes. http://www.redhat.com/magazine/001nov04/features/vm/#life-page https://www.kernel.org/doc/gorman/pdf/understand.pdf -- While wizards don't believe in gods they know for a fact that gods believe in gods. (Reaper Man) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org