Increasing TCP initial cwnd

Previous thread: [PATCH net-next-2.6] net: sysfs: ethtool_ops can be NULL by Eric Dumazet on Monday, October 26, 2009 - 4:23 am. (3 messages)

Next thread: [PATCH 2/2] tc35815: Enable NAPI by Atsushi Nemoto on Monday, October 26, 2009 - 6:46 am. (3 messages)
From: Yair Gottdenker
Date: Monday, October 26, 2009 - 6:40 am

Hi all,

I am working on research project to control the sender initial
congestion window size. I am trying to allow user space to set the
initial congestion window size but with no luck. The sender always
sends just 4 packets disregarding from the snd_cwnd.

I am working on kernel version 2.6.31.3.

I made the following changes:
1. tcp_ipv4.c -> in function tcp_v4_init_sock, changed from
tp->snd_cwnd = 2 to tp->snd_cwnd = user_space_initial_cwnd.
2. tcp_output.c -> tcp_init_cwnd - to always return user_space_initial_cwnd.
3. tcp_cong.c -> tcp_slow_start- to always return user_space_initial_cwnd.

Any help will be more than welcome.

Yair
--

From: =?ISO-8859-15?Q?Ilpo_J=E4rvinen?=
Date: Monday, October 26, 2009 - 6:54 am

How about trying tcp_init_metrics in tcp_input.c?

-- 
 i.
--

From: =?ISO-8859-15?Q?Ilpo_J=E4rvinen?=
Date: Monday, October 26, 2009 - 6:57 am

Also, now that I looked. I don't understand what interesting you find in 
tcp_slow_start to modify? That certainly has nothing to do with initial 
window. ....Then you also might want to play with RW but that 
is out-of-scope of your question, just mentioning it for completeleness.

-- 
 i.
From: Yair Gottdenker
Date: Monday, October 26, 2009 - 8:07 am

Thanks,

I already had a look in it. Their changes that are related to changing
the initial cwnd  (snd_cwnd) are in several places in the patch:
1. tcp_ipv4.c in function tcp_init_cwnd. since currently I am working
with no metric this is irrelevant.
2. tcp_ipv4.c: in function tcp_v4_init_sock, which I applied
3. tcp_minisocks.c - which I applied
. They patched kernel 2.6.18.8 which is very old and there were a lot
of changes since that in the kernel tcp layer. I didn't test their
patch but applying the same logic to 2.6.31.3 doesn't seems to change
initial window size.

It is clear that in order to correctly make the change to the initial
cwnd, one should apply changes to many more scenarios like setting the
initial cwnd after idle time and more. I want to proceed step by step,
first the naive changes to make it work.




On Mon, Oct 26, 2009 at 4:38 PM, Ilpo Järvinen
--

From: =?ISO-8859-15?Q?Ilpo_J=E4rvinen?=
Date: Tuesday, October 27, 2009 - 12:38 am

You managed to mix up this filename twice in a row in a different way :-). 
...That function resides in tcp_input.c instead. And changes in 
tcp_init_metrics are not completely irrelevant, even with no metrics it 
is executed as "no metrics" works a bit differenctly than you seem to 

Hmm, it now rings a bell... You cannot directly set initial window to a 
large value (or you can but that doesn't do anything on the wire) because 
you hit first the limit of receiver advertised window that applies 
auto-tuning (with a starting value was four IIRC).

-- 
 i.
--

Previous thread: [PATCH net-next-2.6] net: sysfs: ethtool_ops can be NULL by Eric Dumazet on Monday, October 26, 2009 - 4:23 am. (3 messages)

Next thread: [PATCH 2/2] tc35815: Enable NAPI by Atsushi Nemoto on Monday, October 26, 2009 - 6:46 am. (3 messages)