Debian 编译自定义内核

本来是用来对比锐速的,提高 TCP INIT CWND 以尽可能占用更多的带宽。

内核修改提速

1
2
3
sed -i s/'tp->snd_cwnd = min(tp->snd_cwnd'/'tp->snd_cwnd = max(tp->snd_cwnd'/ net/ipv4/tcp_input.c
sed -i s/'define TCP_INIT_CWND  10'/'define TCP_INIT_CWND   96'/ include/net/tcp.h
sed -i s/'define TCP_RTO_MIN    ((unsigned)(HZ\/5))'/'define TCP_RTO_MIN    ((unsigned)(HZ\/25))'/ include/net/tcp.h

编译内核

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
wget https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.4.3.tar.gz
tar -xf linux-4.4.3.tar.gz
cd linux-4.4.3
apt-get install kernel-package
make oldconfig
make menuconfig
make-kpkg clean
make-kpkg --initrd kernel-image -j3
cd ..
dpkg -i linux-*.deb

测试完毕,仅hybla有奇效。


Linux

115 字

2016-02-27 12:48 +0000

comments powered by Disqus