On Wed, 2011-06-15 at 09:53 +0200, Frederic Crozat wrote:
Le mercredi 15 juin 2011 à 09:08 +0200, Carl-Daniel Hailfinger a écrit :
Am 11.06.2011 21:53 schrieb Greg KH:
[...] Because what we have right now sucks.
Seriously, it does, it was great for the 70's and 80's when things were static, but now, it makes absolutly no sense whatsoever. Linux has been evolving to support this type of dynamic, use only what you need when you need it, type of a system for a very long time now, and this is just one piece of that progression that has been needing to change for a very long time.
So if I'm installing a web server machine with apache, it will boot quickly, but the first access to the server will take almost forever because nobody connected to port 80 before and thus apache wasn't started? Or does "use only what you need when you need it" not apply here (and if not, why)?
Socket activation is mainly used to simplify service startup and to avoid to express any dependencies, and not about on-demand start. On a common systemd setup, there are almost zero dependencies to resolve, because all communication channels between services are established before any service is ever started. The kernel will just suspend the requesters until the real service is running. The same logic applies to filesystems access when systemd's automounter is used. Most common services are started just unconditionally, like they have been started since forever, regardless if there are traffic on the socket or not.
Looking at http://0pointer.de/blog/projects/socket-activation.html it seems that systemd socket activation adds an additional overhead of a few context switches for every single connect. How big is the performance degradation for short-lived TCP and UDP connections in that case?
Are you running apache behind xinetd ATM ? I don't think so. So I don't see why you would use socket-activation for apache server.
Right, if you run a real webserver, you don't run it inetd mode. Also, the overhead for native/non-inetd systemd socket activation is zero. Apache listens itself, it only gets the first connection passed, if configured to run with socket activation. SShd is a fine example, and there are not many, to run by default from systemd's inetd mode. On most workstations nobody ever logs-in over ssh, and it can be started on demand just fine. If you run a server, where users log-in over ssh all the time, you wouldn't run sshd in inetd mode there, but just enable the service unconditionally, so it is immediately ready when users connect. Kay -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org