Web Hosting Talk







View Full Version : Load testing a server


Mike the newbie
02-12-2002, 07:24 PM
(this is more of a software recommendation than anything else)

I'm putting together a new server for colo. I've got it pretty much finished, so I wanted to put a load on it and see how it holds up.

I downloaded OpenSTA from www.opensta.org, wrote a test script and configured it to load my server with 400-600 concurrent users.

Here the result of a top command during the test:# top
last pid: 3007; load averages: 36.47, 22.99, 10.99
up 0+20:41:38 16:12:58
413 processes: 10 running, 403 sleeping
CPU states: 22.2% user, 0.0% nice, 26.8% system, 4.2% interrupt, 46.7% idle
Mem: 126M Active, 105M Inact, 94M Wired, 28K Cache, 86M Buf, 425M Free
Swap: 500M Total, 500M Free


That's FreeBSD 4.5, Apache 1.3.22, php 4.1.1 PentiumIII, 800MHz, 768MB. At one point I had a bit over 500 processes running, pushing out over 6GB of data an hour.

OpenSTA was simple to set up and run. Highly recommended for server testing.

dektong
02-12-2002, 07:27 PM
400-600 concurrent users


What does "users" exactly mean? Do you mean 400-600 concurrent httpd processes? Thanks for the info ... I would test it on my new server

cheers,
:beer:

Mike the newbie
02-12-2002, 07:39 PM
The test page that Apache was serving out is the standard Apache page that you see when you first load Apache plus a phpinfo() embedded in it; all renamed to index.php.

The 400-600 concurrent users means 400-600 concurrent httpd processes. All the processes in the top command, except for about 25, are httpd processes.

I also found out some info on config limits, and what happens when Apache reaches its MaxClients setting. This was in the httpd-error.log file:

[Sun Feb 10 16:07:36 2002] [error] server reached MaxClients setting, consider raising the MaxClients setting


So I tried raising my MaxClients (in httpd.conf), and then I saw this:

[Sun Feb 10 16:09:28 2002] [notice] caught SIGTERM, shutting down
WARNING: MaxClients of 1024 exceeds compile time limit of 512 servers, lowering MaxClients to 512. To increase, please see the HARD_SERVER_LIMIT define in src/include/httpd.h.
[Sun Feb 10 16:09:34 2002] [notice] Apache/1.3.22 (Unix) mod_ssl/2.8.5 OpenSSL/0.9.6a configured -- resuming normal operations

So I learned that Apache has a compiled-in limit of 512 concurrent users, unless I make a config change in the source code.