From owner-freebsd-rc@FreeBSD.ORG Sun Dec 23 14:12:12 2012 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 88B77573; Sun, 23 Dec 2012 14:12:12 +0000 (UTC) (envelope-from buganini@gmail.com) Received: from mail-vb0-f42.google.com (mail-vb0-f42.google.com [209.85.212.42]) by mx1.freebsd.org (Postfix) with ESMTP id 12CFF8FC0C; Sun, 23 Dec 2012 14:12:11 +0000 (UTC) Received: by mail-vb0-f42.google.com with SMTP id fa15so6872449vbb.29 for ; Sun, 23 Dec 2012 06:12:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=zoKQ70P/7OcttIeiZgRYytLiSLsWKnBKJ6/Jdx4O6+I=; b=lMa65S1xEdKzlUhn4Z0Vv717w9nzHFHQQ3+6VTpCpz2H8YrqsOdyRCTWZDlSocQeJI MButcwmw11Suoq3fodzS1mIC1vU3doMkgpdriKCra8rnM1SYO/rZKvW/7wuj0kvTfQfS SXidmId6KHSZ4pm+ZrrKuYSqH0Bcm1N3ULumkx5JZNnSAU5v2wPffTuWvZdNwh9Ei8h9 qf+CoCP7okleQ2z+8FXCPiXkY6iwfKoWPyX9YoPF9eSj2ByHNQAu+Sv42ptUUpp8lcOz /D0LS8kn+upxaPUKunpV4b6pfAqI5qT8Qt6OAYGYN1/fbwUEd59B7/GLln13wwZILalM 23LA== MIME-Version: 1.0 Received: by 10.52.92.131 with SMTP id cm3mr25065854vdb.110.1356271930930; Sun, 23 Dec 2012 06:12:10 -0800 (PST) Received: by 10.59.0.200 with HTTP; Sun, 23 Dec 2012 06:12:10 -0800 (PST) In-Reply-To: References: <20110821121509.GA27730@crane.none> <20110823201859.GA78110@crane.none> Date: Sun, 23 Dec 2012 22:12:10 +0800 Message-ID: Subject: Re: Concurrent execution of rc-scripts with rcorder(8) From: Buganini To: Chris Rees Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: "freebsd-rc@freebsd.org" X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Dec 2012 14:12:12 -0000 I've added an optional flag -q to switch of parallel execution, you will need to put rcexecr_parallel="YES" into /etc/rc.conf to enable parallel execution. Buganini 2012/12/23 Chris Rees > Reawakening ancient thread. > > On 23 August 2011 21:18, kilian wrote: > > On Sun, Aug 21, 2011 at 02:54:15PM +0100, Chris Rees wrote: > >> On 21 Aug 2011 13:39, "kilian" wrote: > >> > > >> > 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 > >> > > >> > >> I might suggest moving this to rc@. I'll try it later, looks > interesting. > >> > >> Chris > > > > For anyone who is interested, updated the README[1] with some numbers, > > detailing the influence on booting time. > > Hi Kilian, Buganini, > > I've been looking over both of your rc implementations, and they both > seem to do the job well. The main reservation I have for rcexecr [1] > is that it is not optional. Whether that is a problem is up for > debate, but I think that it is important at least for the mid term to > have a rc_parallel option; rc dependencies are funny things, and it > would be absolutely unacceptable to have strange failures on > production boxes. Every rc script would have to be reviewed in time > (including ports), to ensure that they fitted in properly. > > Chris > > [1] https://github.com/buganini/rcexecr/ > > [2] https://github.com/kil/rcorder >