Kaynağa Gözat

Update bdp.sh

MoeClub 5 ay önce
ebeveyn
işleme
f923cb267a
1 değiştirilmiş dosya ile 3 ekleme ve 0 silme
  1. 3 0
      bdp.sh

+ 3 - 0
bdp.sh

@@ -5,6 +5,9 @@ RTT="${2:-60}"           # ms
 BDP=`echo "${Bandwidth} ${RTT}" |awk '{printf "%d", ($1 * $2) * ((1024 * 1024) / (1000 * 8))}' 2>/dev/null`
 [ -n "$BDP" ] && [ "$BDP" -gt 0 ] || exit 1
 
+sysctl -w net.core.optmem_max="${BDP}"
+sysctl -w net.core.rmem_default="${BDP}"
+sysctl -w net.core.wmem_default="${BDP}"
 sysctl -w net.core.rmem_max="${BDP}"
 sysctl -w net.core.wmem_max="${BDP}"
 sysctl -w net.ipv4.tcp_rmem="4096 87380 ${BDP}"