Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Jan 2006 11:16:58 +0000
From:      "M. L." <user@celeritystorm.com>
To:        freebsd-questions@FreeBSD.org
Subject:   Apache & PV entries
Message-ID:  <43CF752A.6080507@celeritystorm.com>

next in thread | raw e-mail | index | archive | help
Hello list,

I am configuring a very heavily used apache webserver, that required 
some special needs.

This particular configuration needs to have at least 1024 httpds always 
running. Reaching this number is not a problem, but whenever I stop 
apache via apachectl stop, I notice all the httpds take a long time (1 
min) to vanish - and meanwhile, top shows most of them locked.

The states I see in top are:
*vm ob
RUN

while the header shows:
1038 processes:332 running, 12 sleeping, 694 lock

The numbers vary a lot. Eventually, they get killed, but it takes too 
much time.

After some searching, I found out the cause for this was running out of 
PVs. I've added the following relevant options to the kernel:
options         KVA_PAGES=768
options         PMAP_SHPGPERPROC=5120

sysctl vm.zone | grep PV shows: (note: httpd stopped here)
                                    (limit)     (used)  (free)       
(requests)
PV ENTRY:         24, 84410445,   5522, 1632543,  5381679


So, if my assumptions are correct,  and running out of PVs was the cause 
(I did get that message about increasing PMAP_SHPGPERPROC before I 
placed that in the kernel), there is a problem now. If you look at the 
vm.zone output, there are 84,410,445 PVs that could exist, but the 
system shows only 1,632,543 free.

This leads me to believe there is another thing to tune. I already have 
a high PVs limit, but according to this output, it's not going further 
than 1,6 millions.

My question is, what can I do to make the system use the full 84 
millions, as I have not found any way to do this.









Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?43CF752A.6080507>