LWN.net Logo

The road forward for systemd

The road forward for systemd

Posted May 27, 2010 14:07 UTC (Thu) by BenHutchings (subscriber, #37955)
In reply to: The road forward for systemd by mezcalero
Parent article: The road forward for systemd

How do you decide the necessary backlog length for listening sockets?


(Log in to post comments)

The road forward for systemd

Posted May 28, 2010 9:31 UTC (Fri) by liljencrantz (subscriber, #28458) [Link]

I don't think you can set that manually, the kernel does that for you.

The road forward for systemd

Posted May 28, 2010 10:23 UTC (Fri) by michich (subscriber, #17902) [Link]

No, the backlog length must be set by userspace when making the socket listen, see listen(3p):

int listen(int socket, int backlog);

The road forward for systemd

Posted May 28, 2010 10:33 UTC (Fri) by michich (subscriber, #17902) [Link]

Looking at the code... It uses SOMAXCONN by default (src/socket.c:socket_init()) and it allows overriding it in the config file with a Backlog=... line (src/load-fragment.c).

The road forward for systemd

Posted May 31, 2010 16:11 UTC (Mon) by mezcalero (subscriber, #45103) [Link]

As already pointed out we set it to SOMAXCONN by default, which should be a very good value for (almost?) all cases. And to cover other cases, we allow you to override that in the .socket file.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds