FreeBSD and Linux Comparative Apache benchmarks
An anonymous fan wrote in to send us some benchmarks that attempt
to compare
FreeBSD and Linux
and normal web tasks like CGI, Flat HTML and mod_perl.
A little thin on the details, but not surprising results.
The server went down with a power outage. It's a linux box (for those who are curious) with enough memory and CPU time to burn. If anything gets slashdot'd, it would be the pipe...
It's up now.
Chip
Hmm? Netscape doesn't work on FreeBSD? Funny, I downloaded the FreeBSD version from ftp.netscape.com and it worked fine.
My only software problem with FreeBSD is getting Applix to work. Applix is the only Linux commercial application I run that does not seem to have a FreeBSD version. Well, RealPlay too... v3 is kinda old...
My only real gripe with FreeBSD is that it's not as clean and "transparent" as OpenBSD. It's starting to look as cluttered as Linux.
-E
Send mail here if you want to reach me.
I'd really like to know a) how you come to this conculsion and b) where your evidence is.
,hacker Perl another Just)'
Not that I don't believe you - I just hate seing blind advocacy without any real figures behind it. You've made a blanket statement "[freeBSD], despite having a faster TCP/IP stack, linux is faster" - but I'm unconvinced. However I do run Linux and not *bsd because there are still apps that are Linux specific (e.g. Oracle and Sybase, both of which I need to run) - and I don't fancy playing about in any compatibility modes for that stuff since it's critical to me.
perl -e 'print scalar reverse q(\)-:
Matt. Want XML + Apache + Stylesheets? Get AxKit.
The point though was to benchmark the speed of the web environments (i.e. CGI, mod_perl, php etc) not the different OS's. The different OS's were just thrown in there to see if that made a significant difference. It didn't, and I'm not sure why someone posted this to slashdot except as flamebait.
,hacker Perl another Just)'
The mod_perl group is hoping to do some more extensive benchmarking to look at the speed differences in longer scripts in the different languages too - the "hello world" example is only really a valid comparison between different ways of using Perl - not of different languages - for that you need a more complex test.
Matt.
perl -e 'print scalar reverse q(\)-:
Matt. Want XML + Apache + Stylesheets? Get AxKit.
I wonder who compiled apache, and with what compiler, and what flags ;-) Compilers do matter, as I just learned myself today, I wonder how much they would affect apaches preformance.
In addition, the load will be affected by the script running on the same machine.
Using a bourne shell to conduct tests is not something I would view as particularly useful; perl would have been better, since it could compile itself to begin with to be more efficient (ie, faster). Also, this will give one concurrent test at a time; not particularly relevant in real-world situations.In conclusion, basing FreeBSD performance vs linux performance using these figures is lunacy.
--
When you get a cumulative score >n (what number? does anybody know), all your comments start at 2 points.
Let me guess, it would be something like:
-- Ed Avis ed@membled.com
> I just installed freeBSD I didnt like it...
I'm sorry...
> I wanted to see whitch was more solid freeBSD
> seemed nice but A lot of the basics just
> wouldnt work like *netscape* which hurt my
> feelings..
That's odd...I've used both the FreeBSD and Linux versions of Netscape here with out problems.
> ALso does anyone know where i can get the BSD kernel source?
If you are looking for an online reference, check out http://www.freebsd.org/cgi/cvsweb.cgi. If you want to download the source, you can get 'ssys.*' from ftp://ftp.cdrom.com/pub/FreeBSD/3. 2-RELEASE/src/. However, just remember that FreeBSD is more than just a kernel, it is an Operating System.
OK my understanding is that any cgi program when run is actually a new program, and that mod_perl is run from within the web server. My simple translation - cgi's fork mod_prel & static don't fork. From the numbers FreeBSD seems faster at anything that the web server can do. Outside of that FreeBSD slows down, despite having a faster TCP/IP stack, linux is faster. Most websites use some form of database stuff, therefore it makes more sense to use linux for those sites (or so it does to me).
Anyways just my thoughts.
-cpd
I wonder whether it was running Linux or FreeBSD? :-)
This is exactly right. A half-dozen or so 3-5 rated comments with little or no -1 comments will get you an automatic +2 on every post (at least, at one point it did for me, guess I'll see if that's true anymore since I haven't posted in weeks).
Hmm, I *was* logged in, wasn't I?
I may take some time to write a generic web load simulation suite so that these things can be done in a standardized way.
However, I am pleased to see that people are looking into BSD vs Linux performance. Linux needs to not get complacent, and BSD is an ideal prod in that direction. NT just can't provide the level of competition necessary to keep us lean and mean.
This won't format quite right since Slashdot doesn't accept the "pre" tag (why?)...
HTTPD Web Application Env Hits/s Operating Sys. Chip Session Client HTTP/x By
----- ------------------- ------ -------------- ---- ------- ------ ------ --
*apache 1.3.6 static html 996.41 Linux 2.2.10 PIII-500 no ab 1.0 ct
*apache 1.3.6 mod_perl 518.24 Linux 2.2.10 PIII-500 no ab 1.0 ct
*apache 1.3.6 C/C++ cgi executable 210.19 Linux 2.2.10 PIII-500 no ab 1.0 ct
*apache 1.3.6 perl cgi 7.22 Linux 2.2.10 PIII-500 no ab 1.0 ct
*apache 1.3.6 static html 1183.64 FreeBSD 3.2 PIII-500 no ab 1.0 ct
*apache 1.3.6 mod_perl 568.28 FreeBSD 3.2 PIII-500 no ab 1.0 ct
*apache 1.3.6 C/C++ cgi executable 154.94 FreeBSD 3.2 PIII-500 no ab 1.0 ct
*apache 1.3.6 perl cgi 6.94 FreeBSD 3.2 PIII-500 no ab 1.0 ct
As extracted from this post on the mod_perl mailing list which summarizes all the results of everyone so far.
Here is the author's summary:
Subject: Benchmarks
Author: Chip Turner
Date: Sun, 4 Jul 1999 19:40:44 -0400 (EDT)
As promised, I've run some benchmarks under Linux and FreeBSD comparing
Perl CGI, C CGI, flat html, and mod_perl. I've tried to duplicate the
methodology used by the benchmarks posted here in the past. The results
were fairly interesting. If anything can be concluded, it is that Perl
CGI is dead for serious web development. It's just way, way, way too
slow. Apache::Regostry can improve this (and I've not tested how much of
an effect it would have), but 7 requests per second compared to about 550
requests per second with mod_perl is _quite_ a significant gap.
Another interesting result is that for non-CGI requests, FreeBSD seems to
be about 10% faster than Linux in the mod_perl and flat html tests.
The info, including httpd.conf, the test script, and other info is
available at http://perl.pattern.net/bench/. Any feedback is definitely
welcome. If there is much interest, I can add an Apache::Registry version
of bench.cgi to the test, as well as a C Hello World Apache module.
(perl.pattern.net is a new DNS entry, so it might not have propogated yet.
Hopefully it will within a few hours.)
Chip
as found here.
The results are about what I'd expect--the Linux TCP/IP stack needs work.
But really, benchmarking using loopback??? I hardly expect a loopback driver to be optimized. The client loads interfere with the serving. And ther's no network driver or interrupt loads.
I would have been much more impressed if two boxen with 100baseTX cards had been connected with a crossover cable. It has plenty of bandwidth. Network benchmarks should be done on a network!
-- Robert
Whomever says they got it working is a liar.. Vmware forces the use of kernel modules which FreeBSD can't emulate.
:). (Well that and creative labs only released binary sblive drivers)
That's why I'm still using linux on my workstation computer