Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 May 2006 21:42:20 +0200
From:      Ivan Voras <ivoras@fer.hr>
To:        "current@freebsd.org" <current@freebsd.org>
Subject:   (Another) simple benchmark
Message-ID:  <446CCE1C.1050200@fer.hr>

next in thread | raw e-mail | index | archive | help
Today I had the opportunity to experiment for a short time with a 4-CPU 
Xeon machine with hyperthreading (-> 8 logical CPU-s) and 3GB RAM. In 
absence of anything smarter to do, I installed WBEL 3 Linux (non-RedHat 
version of RedHat Enterprise Linux) which was accidentally on the table 
and after toying around I've run a simple benchmark - ab (apachebench, 
included by default with apache server) over localhost to a local 
apache2 server, on a static home-page file. The command line was "ab -n 
100000 -c 100 http://localhost/". Since I still had time with the 
machine, I then downloaded and installed FreeBSD 6.1 to try to beat the 
score. Unfortunately, not only I couldn't beat the score, but the 
results were *extremely* bad. Since I'm still not sure it isn't my 
fault, I won't post the actual results, but I wonder...

Apache is a well known server-grade product, which doesn't use threading 
(it was preforked in both systems), doesn't call gettimeofday() 
constantly, uses sendfile(), and in short, is very different from MySQL. 
It shouldn't behave this badly on FreeBSD.

Some observations from the benchmark runs:
- Linux was maxed out with ~50% total idle time, each logical processor 
(hyperthreading was enabled) had ~25% user + ~25% sys time. It still 
delivered order-of-magnitude better results. WBEL3 uses Linux 2.4.x 
kernel (i.e. old kernel)
- FreeBSD CPU time was 100% spent, with 90%-95% spent in sys time
- On FreeBSD, enabling hyperthreading got me a slowdown of *4x* over the 
initial (bad) results (some slowdown is not surprising, 4x slowdown is).
- Linux "load average" never went above 8, FreBSD's went > 60; this 
could be just a difference in accounting, or it could not - I don't know.

What is needed to reproduce this simple benchmark:
- SMP machine, the more CPUs the better
- installed software: only apache20. The "ab" benchmark is included in 
it. Leave apache's default configuration as-is (i.e. preforked, max 150 
parallel clients allowed)
- A simple static HTML page (Apache's default "welcome, but this site is 
not configured" should be ok).
- my invocation of "ab" was with "-n 100000 -c 100" ; the (n)umber of 
requests could be modified to fit local CPU speed, but (c)oncurrency 
shouldn't (100 parallel requests is not uncommon).

Since I didn't have time to reinstall Linux to check if apache's 
configuration was the same in all important things all this may be 
bogus, but if anyone has a spare box with several CPUs, I'd be 
interested in results.

p.s. I don't think the actual Linux kernel version matters here, any 2.4 
or newer will do.





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?446CCE1C.1050200>