We are running a reasonably busy web site on FreeBSD (100K-200K hits per
day); we have split the database server (MySQL on FreeBSD 4.3) apart from
the web server  (Apache on FreeBSD 5.0 now).  Both running i386 versions
(Athlon CPUs).

Things generally work very well, but ongoing memory usage is a concern.  We
have to run both mod_perl and mod_php, and the resulting memory usage is in
the 10-20 MB range per httpd process.  (The mod_php seems especially leaky
with respect to memory.)  So on our 1 GB web server, it's pretty risky
running more than 50 httpd processes.

I keep reading about optimizing mod_perl shared memory, and yet it seems I
am missing an essential piece, as it looks like the system is not using
shared memory at all:

# ipcs -m             
Shared Memory:
T     ID     KEY        MODE       OWNER    GROUP
# sysctl -a | grep shm
kern.ipc.shmmax: 33554432
kern.ipc.shmmin: 1
kern.ipc.shmmni: 192
kern.ipc.shmseg: 128
kern.ipc.shmall: 8192
kern.ipc.shm_use_phys: 0
          shm     1    16K     16K        1  16384

This is running with the GENERIC kernel, which appears to have shared memory
enabled.  Using the precompiled Apache 1.3.27 port from freebsd.org.

So it appears that I somehow need to tell Apache that I want to use shared
memory, before I even try to optimize mod_perl.  And yet I can't find any
appropriate directives.

Can anyone suggest what I am missing?  I can only add another 512 MB to the
machine before the add-more-physical-memory approach runs out.

Thanks ...

Tom Haapanen

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message

Reply via email to