Re:One Million Concurrent TCP connections
by thomasknowles on Friday September 23, 2011 @04:18AM
(#3029258)
Actually I would run ss over the netstat for such high concurrency connection as netstat hits /proc/net/tcp and it's quite slow. However, you need to have the tcp_diag module loaded otherwise it falls back to /proc/net/tcp.
Re:One Million Concurrent TCP connections
by X-Istence on Friday September 23, 2011 @11:50AM
(#3030397)
You may not have read the entire article, but he clearly explains that their tech stack is FreeBSD + Erlang not Linux + Erlang.
There is no /proc/net/tcp on FreeBSD. Hell, there is no /proc unless it is specifically mounted by the administrator, but tools certainly don't use it to get data.
Re:One Million Concurrent TCP connections
by thomasknowles on Saturday September 24, 2011 @06:51AM
(#3032968)
I read it, I just presume people most users are linux based in here.
Re:One Million Concurrent TCP connections
by derobert on Friday September 23, 2011 @03:23AM
(#3029167)
You might be able to parse /proc/net/tcp yourself faster, especially for just counting by state.
Re:One Million Concurrent TCP connections
by X-Istence on Friday September 23, 2011 @11:51AM
(#3030399)
/proc/net/tcp doesn't exist on FreeBSD...
Re:One Million Concurrent TCP connections
by adient on Friday September 23, 2011 @07:16AM
(#3029589)
You may have tried but generally add -n to netstat to speed it up by just displaying IPs instead of trying to resolve them. I've never seen a system with so many concurrent connections hands on so there could be some other bottleneck.
netstat -s |grep "connections established" is pretty fast and does the job if you're not filtering for certain ports or IPs. But running plain old netstat on a system with so many connections is a really bad idea. I almost fired myself once over a crufty cron job I left running...
Running netstat|grep like this on a high concurrency server takes a long time to run. I've never found a faster way to get real-time stats on our busy servers and would be interested if anyone else has.