From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 21 18:14:39 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 70958106564A for ; Sun, 21 Aug 2011 18:14:39 +0000 (UTC) (envelope-from kklimek@uos.de) Received: from smtp-auth.serv.Uni-Osnabrueck.DE (vm135.rz.uni-osnabrueck.de [131.173.16.10]) by mx1.freebsd.org (Postfix) with ESMTP id ECFF08FC15 for ; Sun, 21 Aug 2011 18:14:38 +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 p7LIEZxs018790 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 21 Aug 2011 20:14:36 +0200 Date: Sun, 21 Aug 2011 20:13:59 +0200 From: kilian To: freebsd-hackers@freebsd.org Message-ID: <20110821181359.GA58700@crane.none> References: <20110821121509.GA27730@crane.none> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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.180315 (Univ. Osnabrueck) X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report= FROM_NAME_ONE_WORD 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_2000_2999 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, __BOUNCE_CHALLENGE_SUBJ 0, __BOUNCE_NDR_SUBJ_EXEMPT 0, __CANPHARM_UNSUB_LINK 0, __CD 0, __CP_URI_IN_BODY 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_WWW 0, __USER_AGENT 0 X-PMX-Spam-Level: IIIIIIII Subject: Re: 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 18:14:39 -0000 On Sun, Aug 21, 2011 at 04:18:10PM +0200, joris dedieu wrote: > 2011/8/21 kilian : > > 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! > > There is another implementation which had been posted here (maybe) > some times ago. Maybe a good thing to compare. > > https://github.com/buganini/rcexecr Didn't know someone else already implemented this. I had a (quick) look at the source code and tried it out, too. Seems to do its job quite well. I'm (obviously) biased in my opinion but what might be considered a drawback of the rcexecr implementation is that it requires modifications to some files in /etc/rc.d. The modifications to /etc/rc are also more invasive. rcexecr is a whole new program, based on rcorder. My implementation requires changes only to /etc/rc and adds features to rcorder (preserving compatibility, I might add). - kilian > > Joris > > > > -kilian > > _______________________________________________ > > freebsd-hackers@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" >