Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Mar 2001 03:13:59 -0800
From:      Peter Wemm <peter@netplex.com.au>
To:        Matt Dillon <dillon@earth.backplane.com>
Cc:        Alfred Perlstein <bright@wintelcom.net>, "Michael C . Wu" <keichii@peorth.iteration.net>, "Michael C . Wu" <keichii@iteration.net>, izero@ms26.hinet.net, cross@math.psu.edu, grog@FreeBSD.ORG, fs@FreeBSD.ORG, hackers@FreeBSD.ORG
Subject:   Re: tuning a VERY heavily (30.0) loaded s cerver 
Message-ID:  <200103211114.f2LBE0h57371@mobile.wemm.org>
In-Reply-To: <200103201852.f2KIquW95665@earth.backplane.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
Matt Dillon wrote:
> :If this is a result of the shared memory, then my sysctl should fix it.
> :
> :Be aware, that it doesn't fix it on the fly!  You must drop and recreate
> :the shared memory segments.
> :
> :better to reboot actually and set the variable before any shm is
> :allocated.
> :
> :-- 
> :-Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org]
> 
>     Lets see.  Approximately 4MB shared across 4000 processes.  That eats
>     1024 pte's per process, or around 4 million pmap elements that would be
>     saved.  That's a lot of KVM that would be saved.

Also, 4MB = 1024 pages, at 28 bytes per mapping == 28k per process.
28k * 4000 processes = 114688k of kvm, ie: 114MB of kvm.  I bet you'll find
that you are right on the limit, and you are seeing lots of page unwiring
by the page daemon to try and stop it running out of pv entries.
Do you see messages on the console saying that pmap_collect got activated?

Do a sysctl vm.zone (or vmstat -z) and see the entry for 'PV ENTRY'.
vmstat -z is different to vm.zone on 4.x, but somebody broke it on
-current so that you cannot use it on crashdumps anymore. :-(
GRRRRR!

You can increase PMAP_SHPGPERPROC (kernel compile option).  Or use the
sysctl to use physical memory backed shm mappings, which do not consume
pv_entries for each page per process.

Cheers,
-Peter
--
Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au
"All of this is for nothing if we don't go to the stars" - JMS/B5


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?200103211114.f2LBE0h57371>