[CentOS-mirror] Good stress tester...

Mon Feb 9 07:41:28 UTC 2009
Tobias Lundquist <toblun at df.lth.se>

Kate Gerry wrote:
>
> I’ve been setting up a mirror and I would like to know if anybody has 
> any good ideas on how to stress test it without being live?
>
> I’d like to be able to simulate a lot of requests from either one or 
> multiple IPs (I know I’d have to run it on more than one system)
>
> Please let me know as I’m not sure if it’s working correctly as of yet!
>

We also wanted to stress test our new server before going live.
To get the load we wrote two small perl programs, one for the
server and one for the clients.

The server part generated files with different sizes.
The file sizes where picked to look like dvd/cd-iso:s(4.5GB, 700MB), 
ordinary packages
(1-150MB) and small files (1-100k). The program also generated a list 
containing
url:s to the files (both ftp and http). To avoid just getting files from 
cache we
generated a file set with the total size four times the size of ram (in 
our case 256GB).

At the clients we had another perl program that fetched the list 
containing the url:s,
started a given number of downloads threads, picked a file randomly from 
the list
and and downloaded the file to /dev/null.
This way we tested the configuration of httpd, ftpd and the os i one test.
At the most we had 12 clients running a total of 7000 simultaneous 
downloads.

This really helped us to detect bottlenecks and find other problems in 
the configuration.

regards,
Tobias Lundquist