Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Oct 2015 10:35:33 -0700
From:      Larry Maloney <larry.maloney@hackerdojo.com>
To:        Cyril Vechera <cv@jet9.net>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: rc(8) parallel tasks
Message-ID:  <3B7471C5-16B2-41B0-809F-48BADF037357@hackerdojo.com>
In-Reply-To: <560EADD2.60905@jet9.net>
References:  <560EADD2.60905@jet9.net>

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

Sent from my iPhone

> On Oct 2, 2015, at 9:16 AM, Cyril Vechera <cv@jet9.net> wrote:
>=20
> Hi there.
>=20
> We've got a small launcher script (~250 loc) for parallel services start/s=
top 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 reduct=
ion of rc part from 27 to 7 seconds, mostly on eliminating jams for network o=
r other long-latency resources waiting.
>=20
> The launcher is written in pure POSIX shell and uses FIFOs (named pipes) a=
s 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 top=
ological order (strict partial order) defined by dependencies. It requires o=
nly 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 supp=
lied by some kinf of writtable fs, ie tmpfs. The FreeBSD-integrated version u=
ses standard rcorder annotations (REQUIRE, BEFORE and PROVIDE) and there's n=
o need to change rc.d scripts
>=20
> It's not a full init replacement or a kind of services supervision tool. I=
t only starts or invokes a group of scripts in parallel with resolving and a=
ssuring execution in dependencies order.
>=20
> Please take a look at the script and patch set for FreeBSD:
>=20
> https://github.com/cvss/jet9-multitask-init/blob/master/jet9-multitask-ini=
t
> https://github.com/cvss/jet9-multitask-init/tree/master/examples/freebsd
>=20
>=20
> --=20
> Cyril Vechera
>=20
> _______________________________________________
> freebsd-hackers@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"=




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3B7471C5-16B2-41B0-809F-48BADF037357>