I have been doing a bit of load testing with JMETER. Somethings atmosphere me.

I have been attempting to send 300 threads towards the http request apache webserver. Nevertheless the transaction / seconds never achieve above 40. Can there be some apache configuration like max connection or max thread required to open to ensure that can perform a solid 300 thread testing??

The CPU utilization also never hit above 5% ( server is 8 core )

You're right, you will find some.

You need to set correctly the next:

  • for Apache: MaxClients + ServerLimit
  • for Tomcat: maxThreads + acceptCount (AJP/HTTP connector)

Tomcat has two configurations within the Connector config file (.../tomcat/conf/server.xml):

  • maxThreads - most of request processing threads to become produced through the HTTP Connector, which therefore determines the max quantity of synchronised demands that may be handled
  • acceptCount - maximum queue length for incoming connection demands when all
    possible request processing threads are being used. Any demands received once the queue is full is going to be declined.

Apache configurations:

  • MaxClients - most of connections that'll be processed concurrently
  • ServerLimit - maximum on configurable quantity of processes.

The final two you can set in both httpd-mpm.conf and/or httpd-mpm.conf_2. inside your ../conf/extra/ folder, or increase httpd.conf something similar to the next:

<IfModule mpm_prefork_module>
    . . .
    ServerLimit 350
    MaxClients 350 
</IfModule>

Please be aware that ServerLimit value defines the maximum of MaxClients values, so ServerLimit ought to be equal or more than MaxClients.