Web Server Load Utility
loadtest is a simple shell script which can be used to see how a webserver handles load. Its usage is:
[localhost$] ./loadtest.sh
Usage: ./loadtest.sh url running_time_in_seconds number_of_concurrent_fetches(1..10)
The script assumes that the wget utility exists on the system. It forks the number of child processes specified by number_of_concurrent_fetches and each child process continually runs the provided URL for the specified time interval.
To effect maximum loading of the server the URL should be carefully constructed. For example a URL which causes complex database operations to be performed will consume far more resources than one which returns simple html.
Note that even when CPU usage has been brought high on the test system, running more child processes can still result in a longer delay for a legimate request. As a result of round robin timesharing, more processes means that each one has to wait longer before its request is serviced.