[mythtv-users] My MythTV journey

David Rees drees at greenhydrant.com
Wed Dec 24 02:59:12 EST 2003


Jarod C. Wilson wrote:
> On Dec 23, 2003, at 20:11, Brian Scully wrote:
>> The swapfile is on the disk.  My question was: if it is in fact the
>> kernel's cache that is filling my memory, Why would the kernel
>> maintain that information on disk to save it from being read from
>> disk?  That was my original question.
> 
> It could be some program that was loaded into memory long ago, and 
> hasn't been accessed in ages. Storing and fetching a program's memory
> out of swap is usually faster than killing and restarting the entire
> program.

Additionally, if the kernel has swapped out a program, even if you 
suddenly end up with a lot of free memory, the kernel will not bother to 
attempt to load programs in from swap.  The logic there is that swapping 
programs in takes work, why bother when I will probably have to swap it 
back out again and not even use it?

If you are sure you have enough memory, just disable swap altogether, 
there are some types of workloads that it the kernel does not handle 
very well and will result in excessive swapping.

-Dave


More information about the mythtv-users mailing list