Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 07 May 2003 00:25:37 -0700
From:      Terry Lambert <tlambert2@mindspring.com>
To:        andykinney@advantagecom.net
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: collecting pv entries -- suggest increasing PMAP_SHPGPERPROC
Message-ID:  <3EB8B4F1.78C037A9@mindspring.com>
References:  <3EB7DA83.24126.24BD4CE5@localhost>

next in thread | previous in thread | raw e-mail | index | archive | help
Andrew Kinney wrote:
> PV Entries are directly related the number of simultaneous children
> processes Apache is allowed to spawn.
> 
> To figure out how many PV entries your system is using per
> Apache process, run this command:
> 
> ipcs -a ; sysctl vm.zone | grep PV
> 
> Take a look at the "shared" memory section and find the NATTCH
> value for Apache.  That number is the total number of Apache
> processes that have attached to that shared memory segment.
> 
> The last line of output is your PV entry stats.  The third number in
> from the left is the number of PV entries currently in use.

Another alternative is to change the code that's doing the
attaching, or move the attach into a module that persists
over a fork, before the fork.  My preference would be to
convert to mmap() of /dev/zero to get anonymouns memory and
call minherit() with INHERIT_SHARE before the fork.  Worst
case, you can have a before-the-fork and an after-the-fork
module, and create it before and save where it lives in a
file somewhere to communicate the information.

Then all the PV entries get shared.

-- Terry



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3EB8B4F1.78C037A9>