Re: TCP hangs up [message #38636 is a reply to message #38631] |
Sun, 10 January 2010 17:43 ![Go to previous message Go to previous message](/theme/ovz3/images/up.png) ![Go to next message Go to previous message](/theme/ovz3/images/down.png) |
Sékiltoyai
Messages: 7 Registered: August 2009 Location: France
|
Junior Member |
|
|
Hello,
Thanks again for your advices.
nuno wrote on Sat, 09 January 2010 10:10 |
Don't forget that you can have 100 of those connections. Testing is your best bet.
|
I've made some tests and, as you have wroten, if i make several ftp transfers in the same time, the tcpsndbuf explode.
For only four parallel transfers, i have to save at least 20M of kernel memory for tcp connexions, it's too big for an auxiliary vps (this one is going to be dedicated to the backup, and i have only 1G RAM).
It doesn't seem to be possible to control independantly tcp parameters (via sysctl) on each vps. And I don't want to disable tcp window scale for the whole server. So, i have made another test. I have limited trafic with some simple netfilter rules :
-A FORWARD -s 192.168.2.40/32 -i venet0 -o eth0 -j LIMITER
-A LIMITER -m limit --limit 2/sec -j ACCEPT
-A LIMITER -m statistic --mode nth --every 10000 -j LOG --log-prefix "[FOR_INTERNET]limited_packet" --log-tcp-options --log-ip-options
-A LIMITER -j DROP
And for 2 connexions, the tcp buffer falls down to 244K.
I think i'll set up a consistent trafic limiting with tc, but is it a good way of solving my problem ?
nuno wrote on Sat, 09 January 2010 10:10 |
After faling to allocate memory the TCP connection may be FUBAR (damaged beyond repair).
|
And how can we check this ? And how can we "repair" a connexion in FUBAR state ? Is it automatic ?
Thank,
Regards.
[Updated on: Sun, 10 January 2010 17:43] Report message to a moderator
|
|
|