From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 25 11:26:13 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 08F2C16A4B3 for ; Sat, 25 Oct 2003 11:26:13 -0700 (PDT) Received: from heron.mail.pas.earthlink.net (heron.mail.pas.earthlink.net [207.217.120.189]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3253C43FAF for ; Sat, 25 Oct 2003 11:26:12 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from user-38ldvm8.dialup.mindspring.com ([209.86.254.200] helo=mindspring.com) by heron.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 1ADT6q-0003HY-00; Sat, 25 Oct 2003 11:25:57 -0700 Message-ID: <3F9AC007.DB48DE9D@mindspring.com> Date: Sat, 25 Oct 2003 11:25:11 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Ted Unangst References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a4ab35a33cc9c9ad1095f6c4182b6baae0387f7b89c61deb1d350badd9bab72f9c350badd9bab72f9c cc: freebsd-hackers@freebsd.org cc: Michel TALON Subject: Re: Some mmap observations compared to Linux 2.6/OpenBSD X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Oct 2003 18:26:13 -0000 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