SWBench - A Simple Webserver Benchmark program
(C) 1998 by Lars Hoss

[ Home ]

Current version: 0.1.0 Click here for download
What is it
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.

Why do I have written it
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.

What do I need
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.

What is planned for the future
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 :-)

If you have some ideas or wishes, drop me a mail.

Who helped me

  • -mat- brandy: He added a nice replay mode

SWBench - A Simple Webserver Benchmark program
(C) 1998 by Lars Hoss
Last update: 03/29/98