From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 9 07:37:55 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2075E16A419 for ; Fri, 9 Nov 2007 07:37:55 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from kientzle.com (h-66-166-149-50.snvacaid.covad.net [66.166.149.50]) by mx1.freebsd.org (Postfix) with ESMTP id 700E313C494 for ; Fri, 9 Nov 2007 07:37:54 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from [10.0.0.222] (p54.kientzle.com [66.166.149.54]) by kientzle.com (8.12.9/8.12.9) with ESMTP id lA972rH7086993; Thu, 8 Nov 2007 23:02:58 -0800 (PST) (envelope-from kientzle@freebsd.org) Message-ID: <4734061D.9000606@freebsd.org> Date: Thu, 08 Nov 2007 23:02:53 -0800 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20060422 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Dan Nelson References: <000701c82253$b3a8c030$6302a8c0@pentiv> <20071108225238.GB22005@dan.emsphone.com> In-Reply-To: <20071108225238.GB22005@dan.emsphone.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Randall Hyde Subject: Re: Some FreeBSD performance Issues X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Nov 2007 07:37:55 -0000 Dan Nelson wrote: > In the last episode (Nov 08), Randall Hyde said: > >>It appears that character-at-a-time file I/O is *exceptionally* slow. >>... reasonable, though not stellar, performance under >>Windows and Linux. However, with the port to FreeBSD I'm seeing a >>three-orders-of-magnitude performance loss. ... > > What timings does > "dd if=/usr/include/sys/socket.h of=/dev/null ibs=1 obs=64k" report? > It takes about .4 sec on my non-idle dual pIII-900 system. Try > truss'ing your program as it runs; maybe the program is doing some > extra syscalls you aren't aware of? You should also carefully do an strace or similar on Windows and Linux as well. You may find that you're doing a system call per byte on FreeBSD but not on those other systems. Tim Kientzle