From owner-freebsd-current@FreeBSD.ORG Wed Apr 14 13:04:55 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AE3DA16A4CF for ; Wed, 14 Apr 2004 13:04:55 -0700 (PDT) Received: from tx3.oucs.ox.ac.uk (tx3.oucs.ox.ac.uk [163.1.2.167]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0FAE143D5A for ; Wed, 14 Apr 2004 13:04:55 -0700 (PDT) (envelope-from colin.percival@wadham.ox.ac.uk) Received: from scan3.oucs.ox.ac.uk ([163.1.2.166] helo=localhost) by tx3.oucs.ox.ac.uk with esmtp (Exim 4.24) id 1BDqcw-0007Ca-NB for current@freebsd.org; Wed, 14 Apr 2004 21:04:54 +0100 Received: from rx3.oucs.ox.ac.uk ([163.1.2.165]) by localhost (scan3.oucs.ox.ac.uk [163.1.2.166]) (amavisd-new, port 25) with ESMTP id 27353-08 for ; Wed, 14 Apr 2004 21:04:54 +0100 (BST) Received: from gateway.wadham.ox.ac.uk ([163.1.161.253]) by rx3.oucs.ox.ac.uk with smtp (Exim 4.24) id 1BDqcw-0007CX-9k for current@freebsd.org; Wed, 14 Apr 2004 21:04:54 +0100 Received: (qmail 3472 invoked by uid 1004); 14 Apr 2004 20:04:53 -0000 Received: from colin.percival@wadham.ox.ac.uk by gateway by uid 71 with qmail-scanner-1.20 (clamscan: 0.67. sweep: 2.18/3.79. Clear:RC:1(163.1.161.131):. Processed in 0.348284 secs); 14 Apr 2004 20:04:53 -0000 Received: from dhcp1131.wadham.ox.ac.uk (HELO piii600.wadham.ox.ac.uk) (163.1.161.131) by gateway.wadham.ox.ac.uk with SMTP; 14 Apr 2004 20:04:52 -0000 Message-Id: <6.0.1.1.1.20040414210106.03b83830@imap.sfu.ca> X-Sender: cperciva@imap.sfu.ca (Unverified) X-Mailer: QUALCOMM Windows Eudora Version 6.0.1.1 Date: Wed, 14 Apr 2004 21:04:50 +0100 To: Dan Nelson From: Colin Percival In-Reply-To: <20040414194447.GD28745@dan.emsphone.com> References: <11095.1081621779@critter.freebsd.dk> <407B1EBC.6050405@freebsd.org> <407B234D.7070209@kientzle.com> <20040413160331.GM6308@numachi.com> <20040413200013.GC53327@cirb503493.alcatel.com.au> <6.0.1.1.1.20040414065121.039cde20@imap.sfu.ca> <407D78AB.1000700@kientzle.com> <20040414194447.GD28745@dan.emsphone.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" cc: current@freebsd.org cc: Colin Percival cc: Peter Jeremy Subject: Re: Optimizing RCng execution speed ? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Apr 2004 20:04:55 -0000 At 20:44 14/04/2004, Dan Nelson wrote: >In the last episode (Apr 14), Tim Kientzle said: >> 2) What is syslogd doing for 0.89 seconds? > >It is logging the kernel bootup output one line at a time, fsyncing >between lines. This can take a LONG time if you were just in >single-user mode and stored a lot of short shell lines in the kernel >buffer. I just remove the SYNC_FILE flag from line 741. Why is kernel >(and only kernel) log output fsynced anyway? I would assume that kernel log output is fsynced because the times when fsyncing is important are exactly the times when you're likely to want to see any errors logged by the kernel. That said, it seems that a useful optimization here would be to remove the SYNC_FILE until we kill our parent; syncing after each line doesn't help when we've got lots of lines waiting to be logged. Colin Percival