Networking Forums

Networking Forums > Computer Networking > Linux Networking > Increasing TCP window size

Reply
Thread Tools Display Modes

Increasing TCP window size

 
 
Keisuke Nishida
Guest
Posts: n/a

 
      06-01-2006, 11:16 AM
Hello,

I have trouble getting the TCP window size increased on my linux box.
I have tried setting sysctl stuff, but they did not help me.

I am writing a streaming server over TCP (not UDP). I am working on
Red Hat Enterprise Linux 3 Update 7 (linux-2.4.21-40) with default
settings.

As soon as one of my clients connected to the server, it started
sending its data to the server. The TCP window size of packets from
the server to the client started with 32KB (after slow start). Afer
some traffic, the window size got smaller and smaller until 5840 bytes.

Okay, the traffic was small, so the window of 5840 bytes was
reasonable. The problem happened when the clients started sending
large data through the same TCP connection.

The client has a 10Mbps connection, so we want more window size than
5840 bytes. I expected Linux automatically increases the window size
for high traffic, but it didn't. The window size of the server stayed
at 5840 bytes, and the client got only 3Mbps or such.

That's too slow. The client disconnected from the server and
reconnected. Then, the window size raised to 32KB again, and the
client got faster transfer.

Questions:

1. Why the window size decreased from 32KB to 5840 bytes after the slow
start? Does Linux optimizes window size for low traffic?

2. Why the window size did not increase again when the client started
sending large data?

3. Is there a way to get the window size increased without
reconnection?

4. Is there a way to get the window size fixed? (e.g., always 32KB)


I have found a website which mentions a strange behavior of Linux 2.4:

http://dsd.lbl.gov/TCP-tuning/linux.html

I tried setting net.ipv4.route.flush to 1. It worked for new
connections but not for existing connections.

Thanks for your kind help.

Keisuke

 
Reply With Quote
 
 
 
 
Keisuke Nishida
Guest
Posts: n/a

 
      06-01-2006, 01:40 PM
Hello,

I wrote:
> 2. Why the window size did not increase again when the client started
> sending large data?


A friend of mine has found the reason. It looks like a driver bug.
When I replaced the driver of the network card, the window size got
increased again. Sigh.

Sorry for bothering you.

Keisuke


> Hello,
>
> I have trouble getting the TCP window size increased on my linux box.
> I have tried setting sysctl stuff, but they did not help me.
>
> I am writing a streaming server over TCP (not UDP). I am working on
> Red Hat Enterprise Linux 3 Update 7 (linux-2.4.21-40) with default
> settings.
>
> As soon as one of my clients connected to the server, it started
> sending its data to the server. The TCP window size of packets from
> the server to the client started with 32KB (after slow start). Afer
> some traffic, the window size got smaller and smaller until 5840 bytes.
>
> Okay, the traffic was small, so the window of 5840 bytes was
> reasonable. The problem happened when the clients started sending
> large data through the same TCP connection.
>
> The client has a 10Mbps connection, so we want more window size than
> 5840 bytes. I expected Linux automatically increases the window size
> for high traffic, but it didn't. The window size of the server stayed
> at 5840 bytes, and the client got only 3Mbps or such.
>
> That's too slow. The client disconnected from the server and
> reconnected. Then, the window size raised to 32KB again, and the
> client got faster transfer.
>
> Questions:
>
> 1. Why the window size decreased from 32KB to 5840 bytes after the slow
> start? Does Linux optimizes window size for low traffic?
>
> 2. Why the window size did not increase again when the client started
> sending large data?
>
> 3. Is there a way to get the window size increased without
> reconnection?
>
> 4. Is there a way to get the window size fixed? (e.g., always 32KB)
>
>
> I have found a website which mentions a strange behavior of Linux 2.4:
>
> http://dsd.lbl.gov/TCP-tuning/linux.html
>
> I tried setting net.ipv4.route.flush to 1. It worked for new
> connections but not for existing connections.
>
> Thanks for your kind help.
>
> Keisuke


 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to monitot the window size? Ammar Windows Networking 0 02-26-2008 10:12 PM
tcp window size of 1 Thorsten Kohlhepp Linux Networking 10 01-31-2008 05:48 PM
Confusion regarding the TCP window size query.cdac@gmail.com Linux Networking 1 07-04-2007 07:38 PM
Increasing effective window size on high latency path Bill Davidsen Linux Networking 0 06-21-2005 01:08 PM
OT My Computer Window Size..... MagicUK Broadband 4 01-03-2004 08:04 PM



1 2 3 4 5 6 7 8 9 10 11