Reputation: 2644
We are running into performance issues with Apache when doing load testing and are wondering if there is some configuration we are missing. In our environment, Apache serves up static UI content and also balances load between a few Tomcat servers.
A major component of our application is to handle numerous simultaneous uploads of fairly large files. These upload requests hit Apache which proxies the request to a Tomcat server where the file is saved to disk and some other minor things are done. An individual upload request can take a while because of the size of the files. In our load testing, we are trying to find the limit of how many uploads we can handle at one time.
All of our servers are Windows so our only choice for mpm is mpm_winnt. With mpm_winnt, the max threads per child is 1920 so the largest possible configuration seems to be:
<IfModule mpm_winnt.c>
ThreadsPerChild 1920
MaxRequestsPerChild 0
</IfModule>
When we increase load to do thousands of simultaneous uploads, things get bogged down and become unresponsive. If we hit Tomcat directly during the load test we get quick responses so the bottleneck appears to be Apache.
We enabled mod_status and the /server-status page shows the following which seems to prove that Apache is maxing out:
1920 requests currently being processed, 0 idle workers
The server Apache is running on is not being taxed from a CPU, memory, or network perspective. It seems like our hardware should be able to handle significantly more load but we are running into this seemingly artificial limitation of 1920 requests from the mpm_winnt module.
Is there anything we can do to increase this threshold? We would like the limiting factor to be hardware related (i.e. maxed network traffic, CPU, memory, etc.). Any thoughts or ideas would be much appreciated.
Upvotes: 3
Views: 3294
Reputation: 2644
It turns out that 1920 is the default thread limit and the threads per child value cannot exceed the thread limit which is why I could not exceed 1920 threads. I was not able to find the thread limit configuration in any of the config files which is a little odd given that most settings in Apache are usually either presented with default values or commented out in the config files. Anyway, I added it as shown below and was able to increase the number of threads to 15,000 which is the maximum value for mpm_winnt.
<IfModule mpm_winnt_module>
ThreadLimit 15000
ThreadsPerChild 15000
MaxConnectionsPerChild 0
</IfModule>
Upvotes: 2