[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Please stop hating on sysvinit (was Re: do packages depend on lexical order or {daily,weekly,monthly} cron jobs?)



On 2019-08-09 07:00:41 +0200 (+0200), Vincent Bernat wrote:
>  ❦  8 août 2019 21:47 +02, Simon Richter <sjr@debian.org>:
> 
> >> inetd performance is very low because it needs to spawn one instance for
> >> each connection. systemd socket activation has absolutely 0 overhead
> >> except on the first connection (where systemd needs to start the
> >> service).
> >
> > If you specify "wait" instead of "nowait" for a TCP service, your service
> > is handed the listening socket, and can continue to accept more connections
> > on that socket.
> [...]
> 
> My bad, I didn't know that.
> 
> > This feature went unused not because noone thought of it, but because there
> > is no real world use case that benefits from it. Either the service is used
> > regularly, then it makes sense to keep the daemon in memory, or it isn't,
> > then the reduced complexity for one-shot services (to the point where you
> > can use a shell script as a service) is the benefit.
> 
> Reality seems different. Almost nothing was using inetd (tftpd is the
> only daemon I have in mind), while many daemons adopted systemd socket
> activation. For example, OpenSSH (optional), Docker (by default), CUPS
> (by default), libvirt (by default, several services), Dovecot (by
> default). It seems the key difference is that socket-activated services
> are regular services. They can be started manually if we want them to be
> and they inherit everything systemd is able to provide to services.

On the other hand, I still run the following out of inetd (with
nowait by the way) on a bunch of systemd-based systems: cfingerd,
ident2, simpleproxy, tcpd. I'll readily admit it's because I've just
not found the time to work out how to configure systemd to serve
them instead (last I checked the packages for these didn't include a
service file), but I've also not felt particularly compelled to as
it's really convenient just to be able to put a line in
/etc/inetd.conf and HUP it.

Systemd having socket activation doesn't automatically make inetd
obsolete.
-- 
Jeremy Stanley

Attachment: signature.asc
Description: PGP signature


Reply to: