* Increasing TCP initial cwnd @ 2009-10-26 13:40 Yair Gottdenker 2009-10-26 13:54 ` Ilpo Järvinen 0 siblings, 1 reply; 5+ messages in thread From: Yair Gottdenker @ 2009-10-26 13:40 UTC (permalink / raw) To: netdev 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 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Increasing TCP initial cwnd 2009-10-26 13:40 Increasing TCP initial cwnd Yair Gottdenker @ 2009-10-26 13:54 ` Ilpo Järvinen 2009-10-26 13:57 ` Ilpo Järvinen [not found] ` <fa3cddca0910260728n61d8de61p9e58260c893d9f9f@mail.gmail.com> 0 siblings, 2 replies; 5+ messages in thread From: Ilpo Järvinen @ 2009-10-26 13:54 UTC (permalink / raw) To: Yair Gottdenker; +Cc: Netdev On Mon, 26 Oct 2009, Yair Gottdenker wrote: > 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. How about trying tcp_init_metrics in tcp_input.c? -- i. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Increasing TCP initial cwnd 2009-10-26 13:54 ` Ilpo Järvinen @ 2009-10-26 13:57 ` Ilpo Järvinen [not found] ` <fa3cddca0910260728n61d8de61p9e58260c893d9f9f@mail.gmail.com> 1 sibling, 0 replies; 5+ messages in thread From: Ilpo Järvinen @ 2009-10-26 13:57 UTC (permalink / raw) To: Yair Gottdenker; +Cc: Netdev [-- Attachment #1: Type: TEXT/PLAIN, Size: 1127 bytes --] On Mon, 26 Oct 2009, Ilpo Järvinen wrote: > On Mon, 26 Oct 2009, Yair Gottdenker wrote: > > > 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. > > How about trying tcp_init_metrics in tcp_input.c? 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. ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <fa3cddca0910260728n61d8de61p9e58260c893d9f9f@mail.gmail.com>]
[parent not found: <alpine.DEB.2.00.0910261629040.19761@wel-95.cs.helsinki.fi>]
* Re: Increasing TCP initial cwnd [not found] ` <alpine.DEB.2.00.0910261629040.19761@wel-95.cs.helsinki.fi> @ 2009-10-26 15:07 ` Yair Gottdenker 2009-10-27 7:38 ` Ilpo Järvinen 0 siblings, 1 reply; 5+ messages in thread From: Yair Gottdenker @ 2009-10-26 15:07 UTC (permalink / raw) To: Ilpo Järvinen, netdev 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 <ilpo.jarvinen@helsinki.fi> wrote: > On Mon, 26 Oct 2009, Yair Gottdenker wrote: > >> Thanks for the response. >> I disabled metric by: net.ipv4.tcp_no_metrics_save = 1 in sysctl.conf. >> But just after the call to tcp_init_metrics in tcp_input.c there is >> also a call to: tcp_init_congestion_control which calls the congestion >> control algorithm that is in used. I created my own and in the init >> function I set the snd_cwnd to 10 and still there is no change and >> only 4 segments are initially sent. >> You are right tcp_slow_start has nothing to do with the cwnd size, I >> mistakenly thought that the initial flow enters that function. > > Hopefully you don't mess up anything in there. > > Please see from http://www.cs.helsinki.fi/research/iwtcp/kernel-patch/ > I haven't had time/interest to bring it up to date but at least there's > very clearly shown how the initial window can be configured through a > sysctl (though don't try to patch it to late kernels, it would just be > a never ending pain for you :-)). > >> What do you mean RW? do you mean tcp read/write buffer size? > > RW = Restart Window (RFC2681 IIRC, nowadays also in RFC 5681 I think). > ...It is related to slow-start after idle. > > -- > i. > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Increasing TCP initial cwnd 2009-10-26 15:07 ` Yair Gottdenker @ 2009-10-27 7:38 ` Ilpo Järvinen 0 siblings, 0 replies; 5+ messages in thread From: Ilpo Järvinen @ 2009-10-27 7:38 UTC (permalink / raw) To: Yair Gottdenker; +Cc: Netdev On Mon, 26 Oct 2009, Yair Gottdenker wrote: > 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: Right. I know what I've modified in that patch... ;-) > 1. tcp_ipv4.c in function tcp_init_cwnd. since currently I am working > with no metric this is irrelevant. 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 think. > 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. 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. ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-10-27 7:38 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-26 13:40 Increasing TCP initial cwnd Yair Gottdenker
2009-10-26 13:54 ` Ilpo Järvinen
2009-10-26 13:57 ` Ilpo Järvinen
[not found] ` <fa3cddca0910260728n61d8de61p9e58260c893d9f9f@mail.gmail.com>
[not found] ` <alpine.DEB.2.00.0910261629040.19761@wel-95.cs.helsinki.fi>
2009-10-26 15:07 ` Yair Gottdenker
2009-10-27 7:38 ` Ilpo Järvinen
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox