From owner-freebsd-questions@FreeBSD.ORG Thu Jun 5 23:24:15 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 10AEA106566C; Thu, 5 Jun 2008 23:24:15 +0000 (UTC) (envelope-from kirk@strauser.com) Received: from kanga.honeypot.net (kanga.honeypot.net [206.29.77.83]) by mx1.freebsd.org (Postfix) with ESMTP id C42558FC16; Thu, 5 Jun 2008 23:24:14 +0000 (UTC) (envelope-from kirk@strauser.com) Received: from localhost (localhost [127.0.0.1]) by kanga.honeypot.net (Postfix) with ESMTP id 2E9525DDE64; Thu, 5 Jun 2008 18:23:44 -0500 (CDT) X-Virus-Scanned: amavisd-new at honeypot.net Received: from kanga.honeypot.net ([127.0.0.1]) by localhost (kanga.honeypot.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TYWM+zaD+EC2; Thu, 5 Jun 2008 18:23:40 -0500 (CDT) Received: from [10.0.7.101] (wlan2-101.honeypot.net [10.0.7.101]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by kanga.honeypot.net (Postfix) with ESMTPSA id 968295DDD09; Thu, 5 Jun 2008 18:23:40 -0500 (CDT) Message-ID: <4848757B.30408@strauser.com> Date: Thu, 05 Jun 2008 18:23:39 -0500 From: Kirk Strauser User-Agent: Thunderbird 2.0.0.9 (X11/20071031) MIME-Version: 1.0 To: Kris Kennaway References: <200806051508.29424.kirk@strauser.com> <4848523E.2010604@FreeBSD.org> <200806051617.54400.kirk@strauser.com> <484867E3.3070705@FreeBSD.org> In-Reply-To: <484867E3.3070705@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: Poor read() performance, and I can't profile it X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jun 2008 23:24:15 -0000 Kris Kennaway wrote: > No, if it's reading in 16 byte units it will explain the terrible > performance. No, it's actually doing 4096-byte reads. That was just an example of what I meant. Since I wrote that, though, I wrote a program to do 1,000,000 seeks to position 0, and it ran immeasurably fast. I'm guessing that lseek() is optimized to not do anything if you ask it to move to the position you're already at. Any other thoughts? There definitely aren't any setbuf() calls, and no matter what it still takes 100 times more kernel overhead on Linux than FreeBSD. Speaking of which, I think my next experiment will be to try the Linux binaries on FreeBSD and see if it behaves similarly. -- Kirk Strauser