Subject: Re: failing to keep a process from swapping
To: enami tsugutomo <enami@but-b.or.jp>
From: SODA Noriyuki <soda@sra.co.jp>
List: tech-kern
Date: 10/30/2004 04:28:22
>>>>> On Sat, 30 Oct 2004 04:18:00 +0900 (JST),
	enami tsugutomo <enami@but-b.or.jp> said:

>> Also, if you really want to stop the paging, you can increase
>> vm.anonmin to the size of total anonymous memory usage (i.e. squid +
>> kernel).

> Not always possible since this may require to set over 100%.

Yeah...
Perhaps is it better to change the calculation of (uvmexp.active +
uvmexp.inactive + uvmexp.free) in uvmpd_scan_inactive() to
uvmexp.npages?
	
BTW, do you have any idea what was happening at the following case?
It seems the anonymous memory didn't exceed anonmax at that point,
although it's not 100% sure.

> > Thus, when 'squid' wants more memory, it should not need to go to
> > swap, as there is 200+ MB of *excess* usage for file cache.
> 
> Perhaps the file cache actually decreased to 15% of managed memory
> only for a moment. If that actually happened, then anonymous memory
> and file cache became equal condition, thus anonymous memory might
> be paged out.
--
soda