Cake 使用主动队列管理(AQM)技术保持全局同步,可以控制延迟,有效利用宽带。同时它还可以保证每个主机,每个流公平的分享宽带。
Cake 与 kernel 4.19 并入主线,因此使用 Cake 需要 kernel 和 iproute2 版本大于 4.19。如何确认 kernel 和 iproute2 版本,以及如何升级本文不做详细说明。
以 root 身份执行命令 tc qdisc replace dev eth0 root cake
,其中 eth0
是网络接口名。
#!/bin/bash | |
# numactl -> /usr/bin//usr/bin/numactl | |
# iperf -> /usr/bin//usr/bin/iperf | |
# tcp server | |
# /usr/bin/numactl -N 0-3 /usr/bin/iperf -s | |
# udp server | |
# /usr/bin/numactl -N 0-3 /usr/bin/iperf -u -s |
#!/bin/bash | |
config_dir="$HOME/.wireguard/" | |
mkdir -p "$config_dir" | |
cd "$config_dir" || { | |
echo 切换目录失败,程序退出 | |
exit | |
} | |
# 生成两对密钥,分别用作服务器和客户端使用 |
#!/bin/bash | |
function calc() { | |
res=0 | |
for file in $(ls $3/single_$1_*$2*); do | |
tmp=$(tac $file | sed -n 4p | awk '{print $7}') | |
res=$(echo "${res}+${tmp}"|bc) | |
done | |
echo "time:" $i "threads:" $j "result:" $res | |
} |
# Disabled ipv6 | |
net.ipv6.conf.all.disable_ipv6 = 1 | |
net.ipv6.conf.default.disable_ipv6 = 1 | |
net.ipv6.conf.lo.disable_ipv6 = 1 | |
# Enable BBR | |
net.core.default_qdisc=fq | |
net.ipv4.tcp_congestion_control=bbr |
# Hadoop settings | |
export HDFS_NAMENODE_USER="hduser" | |
export HDFS_DATANODE_USER="hduser" | |
export HDFS_SECONDARYNAMENODE_USER="hduser" | |
export YARN_RESOURCEMANAGER_USER="hduser" | |
export YARN_NODEMANAGER_USER="hduser" | |
export HADOOP_HOME=/home/hduser/hadoop-3.2.1 | |
export PATH=$PATH:$HADOOP_HOME/bin | |
export PATH=$PATH:$HADOOP_HOME/sbin | |
export HADOOP_MAPRED_HOME=$HADOOP_HOME |
# /etc/systemd/system/[email protected] | |
[Unit] | |
Description=GO Simple Tunnel | |
After=network.target | |
[Service] | |
Type=simple | |
LimitNOFILE=1048576 | |
Restart=always |
Godzilla (feat. Juice W Eminem & Juice WRLD | |
Stan Eminem & Dido | |
Without Me Eminem | |
'Till I Collapse Eminem & Nate Dogg | |
Irremplaçable Astride Perrot | |
Book of Rhymes (feat. D Eminem & DJ Premier | |
Alfred’s Theme Eminem | |
Love The Way You Lie Eminem & Rihanna | |
Tone Deaf Eminem | |
Favorite Bitch (feat. T Eminem & Ty Dolla |