SWBench is a very simple program to measure the hit rate of a given webserver.
Hit rate means the the capability to serve pages as many as possible per
second. It uses the UNIX fork() system function to clone itself. Then each
child runs a loop where it tries to get the page index.html from the webserver.
Whenever a child gets a page, it writes its result into a shared memory
segment. When pressing control+c the program stops and adds the result
of all childs togehter. By dividing the total result through the elapsed time
of the benchmark the average hit rate is calculated.
SWBench is free and licensed under the GPL.
My employers decided to set up their own internet webserver.
We wanted to measure the performance of our system and how it
changes by modifing some parameters. So I started to write my
own benchmark program.
Furthermore I wanted to learn how things like shared memory and
fork() do work.
I developed this program under Linux 2.0.33. The program uses Systen V
shared memory to communicate between the childs. Because it is completly
written in C, it must be possible to compile it on other operating systems
supporting System V shared memory.
There are many things todo. More command line options, better result output and
so on. This is the first release so many things can be done in the future :-)
|What is planned for the future|
If you have some ideas or wishes, drop me a mail.
- -mat- brandy: He added a nice replay mode