Subject: Re: failing to keep a process from swapping
To: SODA Noriyuki <soda@sra.co.jp>
From: Arto Selonen <arto@selonen.org>
List: tech-kern
Date: 10/30/2004 10:38:17
Hi!

On Sat, 30 Oct 2004, SODA Noriyuki wrote:

> Perhaps is it better to change the calculation of (uvmexp.active +
> uvmexp.inactive + uvmexp.free) in uvmpd_scan_inactive() to
> uvmexp.npages?

In which case they could be removed from uvmpd_scan_inactive()
saving CPU cycles. It would also match the documentation, then.
The documentation says the vm.{anon,exec,file}{min,max} are
"percentage of physical memory", which from sysadmin point of view
makes most sense to me.

Physical memory is a known value, from which it is possible to base the
min,max limits. The limits in turn tell *to me* how much of the RAM I want
to use for what. This is then realized by the logic of page
daemon. Currently the limits are percentages of "the amount of
memory that can be given to any one process at a given time", and even
that is not quite right. How useful a number is that?

Of course, this ignores the memory reserved for kernel, but surely
it could be dealt with in other ways? (eg. take a known, documented
amount of the given limits, like 90% or 95%, and then use them, leaving
the rest to kernel and UBC, or whatever).


Artsi
-- 
#######======------  http://www.selonen.org/arto/  --------========########
Everstinkuja 5 B 35                               Don't mind doing it.
FIN-02600 Espoo        arto@selonen.org         Don't mind not doing it.
Finland              tel +358 50 560 4826     Don't know anything about it.