Subject: Re: vm tuning/monitoring
To: enami tsugutomo <enami@sm.sony.co.jp>
From: Hubert Feyrer <hubert@feyrer.de>
List: tech-kern
Date: 09/09/2004 10:40:37
On Thu, 9 Sep 2004, enami tsugutomo wrote:
> > but why that makes the system think that not enough exec pages are
> > present is beyond me:
>
> Since you don't need so much exec pages mapped?  Try to run pmap(1) on
> each process running and count how many pages are mapped exec (make
> sure to exclude shared mapping) and compare with vmstat -s output.
> Are the numbers so different?

Um... the following is after a reboot, and xuvmstat telling me that both
"exec" and "file" are both rather small, compared to "anon", and in dmesg
I get (with my patch):

	HF: fileover hit in uvm_pdaemon::uvmpd_scan_inactive()!
	HF: execunder hit in uvm_pdaemon::uvmpd_scan_inactive()!
	HF: fileover hit in uvm_pdaemon::uvmpd_scan_inactive()!
	HF: execunder hit in uvm_pdaemon::uvmpd_scan_inactive()!
	HF: fileover hit in uvm_pdaemon::uvmpd_scan_inactive()!
	...

Looking at the numbers you suggest above,
sum of pmap(1) exec pages is 77228K [1]
vmstat -s says 33516K for exec pages [2]

Where's that difference coming from? Shared exec pages?
(Still seems quite large to me, biggest things I run are Mozilla, X, and a
bunch of aterms ... not much to share that I can see)


 - Hubert


[1] ps -x | awk '{print $1}' | grep -v PID | xargs pmap | grep exec \
    | awk '{print $2}' | tr -d K | awk '{sum+=$1; } END {print sum;}'
[2] expr `vmstat -s | grep -i exec | awk '{print $1}'` \* `pagesize` / 1024

-- 
                         ,,_
If wishes were wings,  o"   )~  would fly.            -- Go www.NetBSD.org!
                        ''''