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
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.
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
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:
I tried setting net.ipv4.route.flush to 1. It worked for new
connections but not for existing connections.
Thanks for your kind help.