From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 9 16:36:44 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 CEB5716A479 for ; Fri, 9 Nov 2007 16:36:44 +0000 (UTC) (envelope-from randyhyde@earthlink.net) Received: from elasmtp-galgo.atl.sa.earthlink.net (elasmtp-galgo.atl.sa.earthlink.net [209.86.89.61]) by mx1.freebsd.org (Postfix) with ESMTP id 902C013C481 for ; Fri, 9 Nov 2007 16:36:44 +0000 (UTC) (envelope-from randyhyde@earthlink.net) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=dk20050327; d=earthlink.net; b=cpKoNzKuT+cewhCVrWDtA931e7oafUYlwOu2RKSXLw6Yilpfai8xhOkV//eI+l2+; h=Received:Message-ID:From:To:References:Subject:Date:MIME-Version:Content-Type:Content-Transfer-Encoding:X-Priority:X-MSMail-Priority:X-Mailer:X-MimeOLE:X-ELNK-Trace:X-Originating-IP; Received: from [66.215.252.78] (helo=pentiv) by elasmtp-galgo.atl.sa.earthlink.net with asmtp (Exim 4.34) id 1IqWqU-0001h0-TY for freebsd-hackers@freebsd.org; Fri, 09 Nov 2007 11:36:39 -0500 Message-ID: <002f01c822ee$b04ac4b0$6302a8c0@pentiv> From: "Randall Hyde" To: References: <000701c82253$b3a8c030$6302a8c0@pentiv> <20071108225238.GB22005@dan.emsphone.com> <4734061D.9000606@freebsd.org> Date: Fri, 9 Nov 2007 08:36:32 -0800 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1807 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1896 X-ELNK-Trace: eba5e0c9192a36dcd6dd28457998182d7e972de0d01da94027df9aca3d9f83411742da86437c4f23350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c X-Originating-IP: 66.215.252.78 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 16:36:44 -0000 > > 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. Certainly this might be possible under Windows, as I have no idea what happens once I link in one of the various kernel.dll modules. Under Linux, however, I am directly issuing the INT($80) instruction, so one system call per byte is being made. To answer a different question in the thread, I'm pretty sure I'm making only one FreeBSD call per byte, at least in one of the cases I posted. You'll note that one of the test examples made a call to "bsd.read( fd, buffer, 1 );". That's just a function I wrote that rearranges parameters and sets up the stack, executes an INT( $80 ) instruction, cleans up the stack, and returns to the user. In a different test example I *was* making a couple of calls, (specifically to lseek to check to see if I'd reached EOF), but the performance difference was minimal (i.e., the time was being spent in the read call). I have to run off for an appt right now, but I'll try the "dd" command later today and see what that reports. I wonder if I'm only getting one character output per time slice, or something like that? Cheers, Randy Hyde