Some mmap observations compared to Linux 2.6/OpenBSD
Terry Lambert
tlambert2 at mindspring.com
Sat Oct 25 11:26:13 PDT 2003
Ted Unangst wrote:
> On Fri, 24 Oct 2003, Michel TALON wrote:
> > What is more interesting is to look at the actual benchmark results in
> > http://bulk.fefe.de/scalability/
> > in particular the section about mmap benchmarks, the only one where
> > OpenBSD shines. However as soon as touching pages is benchmarked
> > OpenBSD fails very much.
>
> look closer. openbsd's "touch page" times are identical to what you'd
> expect a disk access to be. the pages aren't cached, they're read from
> disk. so compared to systems that don't read from disk, it looks pretty
> bad. a 5 line patch to fix the benchmark so that the file actually is
> cached on openbsd results in performance much in line with freebsd/linux.
Why does the benchmark need to be "fixed" for OpenBSD and not
for any other platform?
My point here is that a benchmark measures what it measures, and
if you don't like what it measures, making it measure something
else is not a fix for the problem that it was originally intended
to show.
Microbenchmarks are pretty dumb, in general, because they are not
representative of real world performance on a given fixed load,
and are totally useless for predicting performance under a mixed
load.
That said, if this microbenchmark bothers you, fix OpenBSD.
I know that Linux has some very good scores on LMBench, and that
optimiziing the code to produce good numbers on that test set has
pessimized performance in a number of areas under real world
conditions.
Unless there's an obvious win to be had without additional cost,
it's best to take the numbers with a grain of salt.
THAT said, it's probably a good idea for the other BSD's to use
the read/black code from OpenBSD as a guid for their own code.
-- Terry
More information about the freebsd-hackers
mailing list