Increase initcwnd on DebianIn case of high latency link, a too small initcwnd
could degrade performance, as it may take a while for throughput to increase to its maximum.
Increasing initcwnd
could mitigate this a bit.
Major CDNs are also using a custom initcwnd
for better performance.
I used a script from serverfault, did some minor changes, and put it into /etc/network/if-up.d/initcwnd
to persist the change:
#!/bin/bash
set -e
DEFAULT_ROUTE=`ip route | grep "^default" | head -1`
if [ ! -z "$DEFAULT_ROUTE" ]; then
ip route change $DEFAULT_ROUTE initcwnd 64
fi
Don’t forget to chmod +x
it to make it executable.
The change could be verified by:
# ip route show
default via 10.0.0.1 dev eth0 initcwnd 64
In case of high latency link, a too small initcwnd
could degrade performance, as it may take a while for throughput to increase to its maximum.
Increasing initcwnd
could mitigate this a bit.
Major CDNs are also using a custom initcwnd
for better performance.
I used a script from serverfault, did some minor changes, and put it into /etc/network/if-up.d/initcwnd
to persist the change:
#!/bin/bash
set -e
DEFAULT_ROUTE=`ip route | grep "^default" | head -1`
if [ ! -z "$DEFAULT_ROUTE" ]; then
ip route change $DEFAULT_ROUTE initcwnd 64
fi
Don’t forget to chmod +x
it to make it executable.
The change could be verified by:
# ip route show
default via 10.0.0.1 dev eth0 initcwnd 64