From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 21 12:39:00 2011 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 67020106566B for ; Sun, 21 Aug 2011 12:39:00 +0000 (UTC) (envelope-from kklimek@uos.de) Received: from smtp-auth.serv.Uni-Osnabrueck.DE (vm136.rz.uni-osnabrueck.de [131.173.16.11]) by mx1.freebsd.org (Postfix) with ESMTP id E8D6B8FC16 for ; Sun, 21 Aug 2011 12:38:59 +0000 (UTC) Received: from localhost (dslb-088-071-200-036.pools.arcor-ip.net [88.71.200.36]) (authenticated bits=0) by smtp-auth.serv.Uni-Osnabrueck.DE (8.13.8/8.13.8) with ESMTP id p7LCFiaN027944 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 21 Aug 2011 14:15:46 +0200 Date: Sun, 21 Aug 2011 14:15:10 +0200 From: kilian To: freebsd-hackers@freebsd.org Message-ID: <20110821121509.GA27730@crane.none> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2011.8.21.114814 (Univ. Osnabrueck) X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report= FROM_NAME_ONE_WORD 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1000_1099 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, RDNS_BROADBAND 0, RDNS_GENERIC_POOLED 0, RDNS_POOLED 0, RDNS_SUSP 0, RDNS_SUSP_GENERIC 0, RDNS_SUSP_SPECIFIC 0, __ANY_URI 0, __CD 0, __CT 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __RDNS_BROADBAND_4 0, __RDNS_POOLED_10 0, __SANE_MSGID 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_NO_MAILTO 0, __URI_NO_PATH 0, __URI_NO_WWW 0, __URI_NS , __USER_AGENT 0 X-PMX-Spam-Level: IIIIIIII Subject: Concurrent execution of rc-scripts with rcorder(8) 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: Sun, 21 Aug 2011 12:39:00 -0000 Hello, the idea to start services concurrently during boot isn't new and the question why FreeBSD doesn't do it has popped up on the forum and mailing list occasionally. So, why not give it a shot? rcorder(8) is normally used during boot to bring the rc-scripts into a particular order, so when they are executed linearly by /etc/rc, all constraints will be satisfied. I modified rcorder(8) to enable it to run rc-scripts concurrently, while keeping track of the constraints as rc-scripts start and finish. You can find the code at https://github.com/kil/rcorder. As it works now, it will fall back to the current mode of execution if anything goes wrong. So, if worst comes to worst, booting takes a bit longer. If you feel brave, give it a try (Actually, not too much bravery is needed: on all boots of my machine it worked perfectly every time.) I haven't done any measurements yet on how large the speedup is, but booting feels a bit faster with it. Also, there probably is room for improvement. Any ideas and feedback are very welcome! -kilian