From owner-freebsd-current@FreeBSD.ORG Sat Apr 10 22:35:13 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 6432A16A4CE for ; Sat, 10 Apr 2004 22:35:13 -0700 (PDT) Received: from tx2.oucs.ox.ac.uk (tx2.oucs.ox.ac.uk [163.1.2.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id B696F43D2D for ; Sat, 10 Apr 2004 22:35:12 -0700 (PDT) (envelope-from colin.percival@wadham.ox.ac.uk) Received: from scan2.oucs.ox.ac.uk ([163.1.2.162] helo=localhost) by tx2.oucs.ox.ac.uk with esmtp (Exim 4.24) id 1BCXcd-0007Iy-LN for current@freebsd.org; Sun, 11 Apr 2004 06:35:11 +0100 Received: from rx2.oucs.ox.ac.uk ([163.1.2.161]) by localhost (scan2.oucs.ox.ac.uk [163.1.2.162]) (amavisd-new, port 25) with ESMTP id 27721-07 for ; Sun, 11 Apr 2004 06:35:11 +0100 (BST) Received: from gateway.wadham.ox.ac.uk ([163.1.161.253]) by rx2.oucs.ox.ac.uk with smtp (Exim 4.24) id 1BCXcd-0007Ir-7v for current@freebsd.org; Sun, 11 Apr 2004 06:35:11 +0100 Received: (qmail 11593 invoked by uid 1004); 11 Apr 2004 05:35:11 -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.155948 secs); 11 Apr 2004 05:35:11 -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; 11 Apr 2004 05:35:10 -0000 Message-Id: <6.0.1.1.1.20040411061504.03923940@imap.sfu.ca> X-Sender: cperciva@imap.sfu.ca (Unverified) X-Mailer: QUALCOMM Windows Eudora Version 6.0.1.1 Date: Sun, 11 Apr 2004 06:35:08 +0100 To: Poul-Henning Kamp From: Colin Percival In-Reply-To: <11095.1081621779@critter.freebsd.dk> References: <11095.1081621779@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" cc: current@freebsd.org 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: Sun, 11 Apr 2004 05:35:13 -0000 At 19:29 10/04/2004, Poul-Henning Kamp wrote: >Is anybody working on optimizing RCng execution speed ? > >I think our boottime is getting a bit too slow these days... One obvious optimization would be to avoid processing /etc/rc.subr many times; on my 2.8GHz system running FreeBSD 5.2.1, this reduces RCng time from 4.8 seconds down to 4.0 seconds: Original times (with http://www.daemonology.net/tmp/src.rc.cp_time.diff) : Starting RC scripts: kern.cp_time: 2 0 69 0 62 RC scripts done: kern.cp_time: 74 0 442 4 863 After applying http://www.daemonology.net/tmp/src.rc.subr.diff : Starting RC scripts: kern.cp_time: 2 0 70 1 61 RC scripts done: kern.cp_time: 60 0 400 3 715 Most of the idle time is due to HTT, but there is still 1.5 seconds when both logical processors are idle (presumably while waiting for data from IDE); launching rcNG scripts in parallel would presumably help with this. But it's a bit silly to optimize a 4 second startup time; could someone running 5.x on slower hardware send me their cp_time values with and without the second patch? Colin Percival