Code Monkey home page Code Monkey logo

Comments (3)

cbeuw avatar cbeuw commented on May 26, 2024

TBH I didn't know the existance of BBR before this post.

I read around and found this quite promising, and yes I would say it's recommended to enable BBR, and by the looks of it, it's as simple as setting a sysctl parameter. However I don't like this script, because all it does is basically upgrade the kernel, and set sysctl, and then reboot the system. These steps can easily be done manually, and for me personally, I wouldn't want a script to control my kernel upgrade.

from cloak.

cbeuw avatar cbeuw commented on May 26, 2024

Regarding the scripts in general, I don't like the concept of a lot of them. That's why I've been not very keen on working on that build script. If it's for downloading a readily-compiled binary, install shadowsocks-libev using apt and guide the user through the configuration, then yes it is a good idea, and it's especially useful for those who are not very familiar with Linux. Compiling a software from source, on the other hand, is something you'd expect only experienced Linux user would do, which means that a automatic script is redundant. There is also an issue of how much to compile. In the particular script I forked from teddysun for this project, it compiles libsodium and libev (and prehaps a bunch of other libs) instead of installing the readily available libsodium-dev and libevdev from apt - not everyone wants to do this. Of course I can provide a choice in the script on whether they want to compile the libs on their own machine or just install the apt version, but if the users of the scripts know what they need, they probably didn't need to use the script at all in the first place.

from cloak.

 avatar commented on May 26, 2024
echo '* soft nofile 51200' >> /etc/security/limits.conf
echo '* hard nofile 51200' >> /etc/security/limits.conf
ulimit -n 51200
rm /etc/sysctl.conf
echo 'fs.file-max = 51200
net.core.rmem_max = 67108864
net.core.wmem_max = 67108864
net.core.netdev_max_backlog = 250000
net.core.somaxconn = 4096
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_fin_timeout = 30
net.ipv4.tcp_keepalive_time = 1200
net.ipv4.ip_local_port_range = 10000 65000
net.ipv4.tcp_max_syn_backlog = 8192
net.ipv4.tcp_max_tw_buckets = 5000
net.ipv4.tcp_fastopen = 3
net.ipv4.tcp_mem = 25600 51200 102400
net.ipv4.tcp_rmem = 4096 87380 67108864
net.ipv4.tcp_wmem = 4096 65536 67108864
net.ipv4.tcp_mtu_probing = 1
net.ipv4.tcp_congestion_control = hybla' >> /etc/sysctl.conf
sysctl -p

Install BBR

modprobe tcp_bbr
echo "tcp_bbr" >> /etc/modules-load.d/modules.conf
echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf
echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf
echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf
sysctl -p

Check BBR

sysctl net.ipv4.tcp_available_congestion_control
sysctl net.ipv4.tcp_congestion_control
lsmod | grep bbr

from cloak.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.