collecting pv entries -- suggest increasing PMAP_SHPGPERPROC
tlambert2 at mindspring.com
Wed May 7 00:27:52 PDT 2003
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.
More information about the freebsd-hackers