max simultaneous connections on apache


To know how much max simultaneous connection that can be handled by apache, try to look at apache parameter :

# /usr/sbin/httpd -l
Compiled in modules:
core.c
prefork.c
http_core.c
mod_so.c

That means apache using prefork.c module for Multi Processing Modules purpose.
Prefork process multiple child with any of child handle 1 connection at one time.

Try to look at httpd.conf
# more /etc/httpd/conf/httpd.conf
----------------------------------------------
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept spare
# MaxSpareServers: maximum number of server processes which are kept spare
# MaxClients: maximum number of server processes allowed to start
# MaxRequestsPerChild: maximum number of requests a server process serves

StartServers 8
MinSpareServers 5
MaxSpareServers 20
MaxClients 150
MaxRequestsPerChild 1000

----------------------------------------------

It means :
- MaxClients 150 : max simultaneous request that can be handled.
Default setting at 150, if we want to expand capacity, it depend on available memory on system.

Look at how much consumed memory by apache
# ps -ylC httpd
S UID PID PPID C PRI NI RSS SZ WCHAN TTY TIME CMD
S 0 5924 1 0 75 0 9340 4997 schedu ? 00:00:27 httpd
S 500 12354 5924 0 75 0 9764 5027 semtim ? 00:00:00 httpd
S 500 12355 5924 0 75 0 9844 5035 semtim ? 00:00:00 httpd
S 500 12356 5924 0 75 0 9772 5025 semtim ? 00:00:00 httpd
S 500 12357 5924 0 75 0 9776 5027 schedu ? 00:00:00 httpd
S 500 12358 5924 0 75 0 9772 5025 semtim ? 00:00:00 httpd
S 500 12359 5924 0 75 0 9776 5027 semtim ? 00:00:00 httpd
S 500 12360 5924 0 75 0 9764 5027 semtim ? 00:00:00 httpd
S 500 12361 5924 0 75 0 9760 5025 semtim ? 00:00:00 httpd

RSS Tab ==> consumed memory ( in KiloBytes), total sum = 90 MB.
Apache consume 90 MB of memory.

Thanks to Pak Indra for gimme a question that I must solved myself.

Popular posts from this blog

Howto configure boot device order on ILOM

SAN Switch Config Command

Howto cstm on HP-UX