Re: vm.pmap.shpgperproc and Apache

From: Mark Tinguely <tinguely_at_casselton.net>
Date: Mon, 26 Nov 2007 18:37:30 -0600 (CST)
>  (This is about 7.0-BETA3 amd64)
>
>  Can someone explain to someone who isn't a VM guru exactly what 
>  vm.pmap.shpgperproc does?

In non-technical terms, shpgperproc tells the OS a rough guess of how many
pages will be shared between processes. The pv_entry_max is generated by
multiplying shpgperproc by the maximum number of processes (maxproc) that
was compiled into the kernel and adjusts for the page count. If maxproc was
not hardcoded, then maxproc is also calculated based on the number of pages
available in the computer

When processes shares a physical page, each process may have a different
virtual address for the page. The OS maintains a list of all the processes
that are sharing the managed physical page and virtual address in that process.
This structure also keeps a list of all the managed pages that are currently
being used by this process. The structure that make up these lists is called
a pv_entry.

The new "chunked" pv_entry in FreeBSD 7 and 8 for the amd64/i386 architectures
is very space efficient and IMO could tolerate higher shpgperproc/pv_entry_max
limits.

Raising the pv_entry_max too high, the problem will be getting a page for
the pv_entry chunk, as well as getting physical page to share. More memory
and increasing the pv_entry limits will help you avoid this problem.

--Mark Tinguely
Received on Mon Nov 26 2007 - 23:37:34 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:23 UTC