|
|
Re: TCP hangs up [message #38630 is a reply to message #38565] |
Sat, 09 January 2010 01:27 ![Go to previous message Go to previous message](/theme/ovz3/images/up.png) ![Go to next message Go to next message](/theme/ovz3/images/down.png) |
Sékiltoyai
Messages: 7 Registered: August 2009 Location: France
|
Junior Member |
|
|
Hello,
Thanks for your answer.
Seems to be ok with your recommend. I have put tcpsndbuf to 48MB:64MB and i can send a 8GB file on my fastest connexion.
Here is the result in ubc :
240:
kmemsize 2358102 3607954 20971520 31457280 0
...
tcpsndbuf 106952 9038280 50331648 67108864 0
...
So i think a barrier around 10MB will be suitable.
But i have two questions :
- Is it a normal behaviour that programs (or kernel network driver, i don't know where is the problem) hangs up in case of this tcp buffer shortage ? Isn't there a bug in the kernel, which should simply reject new send() system calls when its buffers are full ?
- Why a call to vzsplit (with a division in 6 vps) gives me a tcpsndbuf of approximately 5.8MB:11MB, so a barrier of 5.8MB, which is far below the needed barrier ?
[Updated on: Sat, 09 January 2010 01:29] Report message to a moderator
|
|
|
|
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 next 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
|
|
|
|
Re: TCP hangs up [message #38639 is a reply to message #38637] |
Sun, 10 January 2010 19:00 ![Go to previous message Go to previous message](/theme/ovz3/images/up.png) |
Sékiltoyai
Messages: 7 Registered: August 2009 Location: France
|
Junior Member |
|
|
nuno wrote on Sun, 10 January 2010 19:43 | If it's your server and your container just increase the parameters and be happy.
|
mmh, no way !
It's my server (i administrate the host system) but i must deal with each vps on this server. So I can't assign to it 1/10 of the whole RAM just for the kernel memory !
|
|
|