Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Mar 2003 17:56:20 +0300 (MSK)
From:      Igor Sysoev <is@rambler-co.ru>
To:        Andrew Kinney <andykinney@advantagecom.net>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: shared mem and panics when out of PV Entries
Message-ID:  <Pine.BSF.4.21.0303251451040.476-100000@is>
In-Reply-To: <3E7F0F65.7994.11617945@localhost>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 24 Mar 2003, Andrew Kinney wrote:

> On 24 Mar 2003, at 16:02, Igor Sysoev wrote:
> 
> > How many Apache processes do you have and what's their size ?
> 
> It varies between 150 and 256 Apache processes.  Our MaxClients 
> is set to 256, which seems to work well.
> 
> Their size varies from 240MB to 290MB depending on how long 
> they've been running.  Their resident set size (RSS) is usually 
> between 7MB and 90MB each, though it seems to average about 
> 60MB each (as shown in 'top' and 'ps').
> 
> The root Apache process has the same size as the others, but the 
> RSS is only 1.2MB.
>
> > kern.ipc.shm_use_phys, kern.ipc.shmmax, etc are for System V shared
> > memory. They have no relation to the memory that shared between
> > processes via fork().
> 
> That would explain why they've not had any effect on this issue. :-)
> 
> So, what's the best approach to limiting memory shared via fork() 
> or reducing PV Entry usage by that memory?  Is there something I 
> can do with the kernel config or sysctl to accomplish this?

No, as far as I know there's no way to do it.
The irony is that you do not need the most of these PV entries because
you are not swaping.

I think you should try to decrease memory that shared between Apache
processes. If you can not change scripts then the single method is
to decrease number of Apache processes while keeping to handle
the current workload:
1) disable keepalive if it enabled;
2) set Apache behind reverse-proxy server that frees Apache processes
   as soon as proxy get the whole responses.


Igor Sysoev
http://sysoev.ru/en/






To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0303251451040.476-100000>