(Another) simple benchmark

Ivan Voras ivoras at fer.hr
Fri May 19 10:29:28 UTC 2006

Michael Vince wrote:
> Interesting that the linux you are claiming to use would use prefork
> Apache as default, while this is the default on FreeBSD I would think
> the threaded worker would be used on a lot of linux dists, since they 
> don't have the option to easily rebuild it.

"Professional" Linux distributions such as RedHat Enterprise Linux &
Debian have avoided threaded apache for a long time. One of the reasons
for this is that PHP doesn't work well with threaded server. Now, most
have two separate packages - apache-preforked and apache-threaded and
users can pick one (though preforked is still the default).

In other words, only distributions that don't expect PHP to be run on
them will have threaded apache by default. The one I used for testing
(WBEL3) was old enough that it didn't have threaded apache.

> Even if it is using prefork, the Linux Apache conf prefork settings
> already are set higher, the start up server is 8 and has a higher max
> spare server setting of 20 (double the setting of default FreeBSD
> setting), I have found that ab is a kind of weird program and initial
> settings of the Apache server (its ability to initially respond) do
> adversely affect its ability to do the ab benchmark for some reason.

Even in a steady state of 100000 requests?

I'll repeat: the difference between Linux and FreeBSD was

MaxSpareServers shouldn't affect FreeBSD much, because with high load
there will not be a situation when there's idle apache children "spare"
to kill.

> ...

> If I was working on a project such as Apache I know I wouldn't be
> concentrating of performance with prefork in this day when threaded
> modes are where Apache has been aiming for modern high performance web
> serving for a fair while now.

Did you miss discussions about how FreeBSD's threading sucks? Ok,
"sucks" is maybe a too strong strong word, but if you look for recent
discussions about MySQL, you'll see that the difference between Linux
and FreeBSD performance is huge.

I know Apache is not MySQL, but why include a known-bad factor in it?
The preforked model is classical Unix way of doing things, and it should
be easier to debug.

I've received many "apologistic" mails trying to justify FreeBSD's low
performance I've seen. This also used to happen when people reported
MySQL low performance ("you didn't configure this, FreeBSD actually
*shines* at that, threading is still under development and you shouldn't
actually use MySQL at all" and similar); now when it's accepted as fact
that there's a problem, developers are looking into it.

I won't consider any of the rebuttals I've got valid until someone (even
myself if I get the chance, though it won't be for a few months) repeats
the benchmark, possibly with 100% identical httpd configuration on
FreeBSD and Linux, and gets results that don't show a FreeBSD system
stuck at 90% in sys time and delivering bandwidth a modern calculator[1]
could beat. I'll repeat: I'm not completely sure I did the benchmark
correctly, this is why I sent the original post - so that someone could
repeat it and we can compare results. Theoretising about non-critical
stuff like MaxSpareServer has no practical meaning until someone proves
it in practice.

A note about ab: this is an ubiqutous program found everywhere where
there's apache. It's a simple program and *if* it exposes a flaw in
FreeBSD, the flaw should be fixed, not the program.

[1] ok, a calculator with only one simultaneous connection :)

Things Mr Welch Cannot Do During An RPG:
247. If the king rewards me with a forest, I am to assume he intends for
me to
keep it a forest.

More information about the freebsd-performance mailing list