On Wed, 9 May 2007, Daniel Ouellet wrote: > Otto Moerbeek wrote: > > > Where are the OS bottleneck that I can may be improve here? > > > > Loks at the memory usage. 300 httpd procces could take up 3000M > > easily, especially with stuff like php. In that case, the machine > > starts swapping and your hit the roof. As a general rul, do not allow > > more httpd procces than our machine can handle without swapping. Also, > > a long KeepAliveTmeout can works against you, by holding slots. > > Thanks Otto, > > I am still doing tests and tweak, but as far as swap, I checked that and same > for keep alive in httpd.conf and I even changed it in: > > net.inet.tcp.keepinittime=10 > net.inet.tcp.keepidle=30 > net.inet.tcp.keepintvl=30
These parameters do not have a lot to do with what you are seeing. I was talking abouty the KeepAliveTimeout of apache. It's by default 15s. WIth a long timout, any processs that has served a request will wait 15s to see if the client issues more requests on the same connection before it becomes available to serve other requests. For more details, see http://httpd.apache.org/docs/1.3/mod/core.html#keepalivetimeout > > For testing only. I am not saying the value above are any good, but I am > testing multiple things and reading a lot on sysctl and what each one does. > > KeepAliveTmeout is at 5 seconds. Try lowering it even more. > > No swapping is happening, even with 1000 httpd running. > > load averages: 123.63, 39.74, 63.3285 01:26:47 > 1064 processes:1063 idle, 1 on processor > CPU states: 0.8% user, 0.0% nice, 3.1% system, 0.8% interrupt, 95.4% idle > Memory: Real: 648M/1293M act/tot Free: 711M Swap: 0K/4096M used/tot