Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
How TCP backlog works in Linux (2014) (veithen.github.io)
11 points by luu on March 1, 2015 | hide | past | favorite | 1 comment


Unfortunately it's not complete:

> The maximum length of the queue for incomplete sockets can be set using /proc/sys/net/ipv4/tcp_max_syn_backlog.

Yes, but:

* http://livegrep.com/search/linux?q=tcp_max_syn_backlog points to "sysctl_max_syn_backlog" variable

* http://livegrep.com/search/linux?q=sysctl_max_syn_backlog

* Which is used when the "syn backlog queue" or "request_sock_queue" in kernel nomenclature is created: https://github.com/torvalds/linux/blob/v3.17/net/core/reques...

But It's a max! The desired value is passed from:

* https://github.com/torvalds/linux/blob/v3.17/net/ipv4/inet_c...

* https://github.com/torvalds/linux/blob/v3.17/net/ipv4/af_ine...

IE: if you want to have big syn backlog you _MUST_ do two things:

* bump tcp_max_syn_backlog to 65535

* bump listen "Backlog" to 65535

Artur Bergman from fastly famously says that "tcp_max_syn_backlog" must not be greater than 65535, but I saw no evidence for that:

* https://www.youtube.com/watch?v=6UvK6BS42Jc#t=2036




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: