[lug] mmap and NFS docroot

John Hernandez John.Hernandez at noaa.gov
Tue Sep 20 10:47:39 MDT 2005


We have five Linux 2.6 Apache 2.0.54 servers that share a common
document root, mounted with from a single Linux 2.6 NFS server with the
following options:

ro,rsize=8192,wsize=8192,timeo=14,hard,udp,nfsvers=3,acregmin=60,acregmax=120,acdirmin=60,acdirmax=120

Web servers have 2GB of RAM, and MaxClients is set to 2048, prefork.
Using top, the typical process repors VIRT=17k, RES=8.7k, SHR=5.9k.  The
content is primarily static, with some minimal SSI.

The Apache 2.0 documentation recommends turning off EnableMMAP for
NFS-mounted doc roots in order to avoid Bus errors and potential
instability.  With EnableMMAP on, we do in fact experience occasional
Bus errors.

However, if we turn mmap off, we experience degraded performance as the
system increasingly swaps under load over a period of 20-40 minutes
(memory leak?), to the point of unresponsiveness.  On the other hand,
the Bus errors, while transient and relatively infrequent, wreak havoc
on our availability monitoring tools.  Can anyone suggest a way around
this problem?  Why does mmap provide such a massive performance boost,
and can it be used sanely with NFS in this scenario?

-- 

 |  John Hernandez - NOAA Boulder NOC - 303-497-6392
 |  Mailstop R/OM62. 325 Broadway, Boulder, CO 80305
 |  PGP Public Key ID: 586A7E23



More information about the LUG mailing list