Increasing OS Limits on Processes


Apache provides settings for preventing the number of server processes and threads from exceeding certain limits. These settings affect scalability because they limit the number of simultaneous connections to the web server, which in turn affects the number of visitors that you can service simultaneously. These settings vary from MPM to MPM and are described in detail in Chapter 11.

The Apache MPM settings are in turn constrained by OS settings limiting the number of processes and threads. The steps needed to change the limits vary from operating system to operating system. In Linux 2.4 and 2.6 kernels, the limit can be accessed and set at runtime by editing the /proc/sys/kernel/threads-max file. You can read the contents of the file with

cat /proc/sys/kernel/threads-max


and write to it using

echo value > /proc/sys/kernel/threads-max


In Linux (unlike most other Unix versions), there is a mapping between threads and processes, and they are similar from the point of view of the OS. In Solaris, those parameters can be changed in the /etc/system file. Such changes don't require rebuilding the kernel, but might require a reboot to take effect. You can change the total number of processes by changing the max_nprocs enTRy and the number of processes allowed for a given user with maxuproc.




Apache(c) Phrase Book(c) Essential Code and Commands
Apache Phrasebook
ISBN: 0672328364
EAN: 2147483647
Year: 2006
Pages: 254

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net