*SOLVED* too many of orphaned sockets [message #5753] |
Tue, 29 August 2006 17:46 |
hvdkamer
Messages: 40 Registered: July 2006
|
Member |
|
|
I've created a setup where on one VE Lighttpd is a name-based proxy and is redirecting to anaother VE with an internal IP-address. That works. So I wanted to test how fast it is and then I ran into problems with the following ab2:
hoefnix:~# ab2 -c 12 -n 2000 http://ve108.armorica.tk/
Below a concurrency of 8 everything is fine, between 9 and 11 it sometimes goes well. From 12 and upwards is goes always wrong with some failed requests. On the hardware node I then get the following message:
Aug 29 18:23:08 strato kernel: printk: 2 messages suppressed.
Aug 29 18:23:08 strato kernel: TCP: too many of orphaned sockets
Aug 29 18:23:08 strato last message repeated 9 times
This is bullshit however . The tcp_max_orphans is 32.768. With an constant cat /proc/net/sockstat I see that the orphans are not raised. However because of the setup I do see 4.000 time_wait buckets which die after two minutes. The user_beancounters in bothe VE's are still zero, even after multiple runs.
I'm not an programmer, but just to see when this message is given leads to tcp.c with the following code:
if (sk->sk_state != TCP_CLOSE) {
sk_stream_mem_reclaim(sk);
if (tcp_too_many_orphans(sk, tcp_get_orphan_count(sk))) {
if (net_ratelimit())
printk(KERN_INFO "TCP: too many of orphaned "
"sockets\n");
tcp_set_state(sk, TCP_CLOSE);
tcp_send_active_reset(sk, GFP_ATOMIC);
NET_INC_STATS_BH(LINUX_MIB_TCPABORTONMEMORY);
}
}
And the function tcp_too_may_orphans leads to a file ub_orphan.h which is copyrighted by SWsoft. So I think I'm her at the right source . Can someone give an clue for which parameter I must tune? It isn't one of the beancounters (all zero) or tcp_max_orphans (never reached). There are some other things checked in this function, but taht is way above my head. Pleas advice...
Henk van de Kamer
auteur Het Lab
http://www.hetlab.tk/
[Updated on: Wed, 30 August 2006 13:49] Report message to a moderator
|
|
|
|
Re: too many of orphaned sockets [message #5766 is a reply to message #5765] |
Wed, 30 August 2006 07:48 |
hvdkamer
Messages: 40 Registered: July 2006
|
Member |
|
|
vass wrote on Wed, 30 August 2006 07:50 | So you're using 2.6.16 series...
|
Nope, the 2.6.8 series . But I think the functions are the same.
vass wrote on Wed, 30 August 2006 07:50 | Look at the code:
|
As said, I'm not a C programmer . But if I understand you correctly, the second return with the sysctl_tcp_max_orphans is never reached. So indeed this function is replaced with a different accounting for a VE? Ok, that will explain that my experimenting with the parameters didn't solve anything .
vass wrote on Wed, 30 August 2006 07:50 | So the number of orphaned sockets (count) is greater, then (barrier of NUMTCPSOCK parameter) /4. Thus, if the reason is that, you can increase the barrier (not limit!) of numtcpsock parameter.
|
But is it possible to use a higher barrier than the limit? Because the limit is never reached, the failcnt is still zero. Anyway, I wil experiment with this parameter to see if it will surpress the message and if I get better results with the Apache Benchmark. Let you know.
Henk van de Kamer
auteur Het Lab
http://www.hetlab.tk/
|
|
|
|
|
|