Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Oct 2015 11:06:01 -0500
From:      Mark Felder <feld@FreeBSD.org>
To:        Cyril Vechera <cv@jet9.net>, dougb@FreeBSD.org, freebsd-hackers@freebsd.org, freebsd-rc@freebsd.org
Subject:   Re: rc(8) parallel tasks
Message-ID:  <1445011561.1233840.412174489.688C5822@webmail.messagingengine.com>
In-Reply-To: <560EAC05.6050308@jet9.net>
References:  <560EAC05.6050308@jet9.net>

next in thread | previous in thread | raw e-mail | index | archive | help


On Fri, Oct 2, 2015, at 11:08, Cyril Vechera wrote:
> Hi there.
> 
> We've got a small launcher script (~250 loc) for parallel services 
> start/stop etc. It is used on our embedded systems and our users 
> containers. And I've done a proof of concept for implanting it to the 
> FreeBSD's standard /etc/rc for execution starting scripts in parallel. 
> It gave me a boot time reduction of rc part from 27 to 7 seconds, mostly 
> on eliminating jams for network or other long-latency resources waiting.
> 
> The launcher is written in pure POSIX shell and uses FIFOs (named pipes) 
> as a mutexes for synchronization. So it is embedded into /etc/rc and 
> /etc/rc.d preserving rc.subr preloading. As a primary requirement, it 
> guarantees topological order (strict partial order) defined by 
> dependencies. It requires only POSIX shell, FreeBSD or Linux kernel, 
> mkfifo and a writeable file system. Due to last requirement, it can be 
> run on the late stage or should be supplied by some kinf of writtable 
> fs, ie tmpfs. The FreeBSD-integrated version uses standard rcorder 
> annotations (REQUIRE, BEFORE and PROVIDE) and there's no need to change 
> rc.d scripts
> 
> It's not a full init replacement or a kind of services supervision tool. 
> It only starts or invokes a group of scripts in parallel with resolving 
> and assuring execution in dependencies order.
> 
> Please take a look at the script and patch set for FreeBSD:
> 
> https://github.com/cvss/jet9-multitask-init/blob/master/jet9-multitask-init
> https://github.com/cvss/jet9-multitask-init/tree/master/examples/freebsd
> 
> 

Your first link is a 404, but this looks really nice!


-- 
  Mark Felder
  ports-secteam member
  feld@FreeBSD.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1445011561.1233840.412174489.688C5822>