Forum Moderators: phranque

Message Too Old, No Replies

server limit & Thread limit.in httpd config .

         

tanuj

5:09 am on Apr 28, 2010 (gmt 0)

10+ Year Member



i was just playing with the server limit & Thread limit in the Apache server config <httpd.conf>..
and if i am not wrong then in the config file
server limit x thread limit = maximum client.
so i tried with various combination ie. (160,1) server limit,thread limit (16,10) (80,2) and during the test i observed that in every case i got the same Throughput and TPS <Transaction per second> which means while changing these values there is no much effect on the performance...
but if we look at the memory point of view 160,1 should used most memory and 16,10 should used the least..because more memory needed to spawn the new child process...
so if we talk in terms of Throughput and TPS , can somebody suggest what else component in the config file can effect the throughput ...or any sweet config which can increase the throughput with out effecting other things...

lammert

9:52 am on Apr 28, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hi tanuj, welcome to WebmasterWorld!

The server-limit settings are used when Apache is working in pre-fork mode or multi-threaded mode, the thread-limit settings when Apache works in multi-threaded mode. These two settings are not working together in pre-fork mode and Apache will use only one the server-limit settings. Most Apache configurations are configured for pre-fork mode, so you may first try to check that.

These limits have no effect on the average throughput of the server. What they control is the maximum number of processes that Apache allows to coexist in memory before it starts refusing incoming connections. Normally the amount of available RAM is the main measurement to calculate the proper values of these maximum settings. Under high load you want to have as much as possible Apache processes, but not so much that they claim more physical memory than there is available and swapping of memory to disk starts to happen.

Optimal throughput on Apache servers is not configured with Apache parameters. There are two other main parts which limit throughput. One is your network connection with the Internet backbone and the second is the efficiency of the scripting (PHP, Perl, etc) on your server. A mediocre Apache configuration on a Pentium 3 server can easily saturate a 100 Mbit network connection if it only serves static files like images.

What you can do is setting the KeepAlive directive to Off. This will decrease load speed for single clients somewhat, but it may increase total throughput with less Apache instances because it doesn't allow connections to clients to stay open for a long time. With this setting Apache instances are reused faster for new incoming requests. The drawback is that clients can't ask the server for multiple files over one established connection and clients therefore have to initiate a new connection for every transfer.