4
4

More than 5 years have passed since last update.

ネットワークの蹴り出し?が遅い場合

Last updated at Posted at 2015-03-16

いま、Ubuntu 14.04TLSで、サーバを構築しています。いままで、WebProxy として、squid3 を利用していたのですが、StartSSLの証明書+nginxで、正しく接続できないため、polipo に乗り換えました。ただ、なんかネットワーク接続時の蹴り出し?が遅い...(蹴り出しって言わないかな?初速?接続時?バッファリング時?)

こうすると、良いらしい!

/etc/hosts のip6が入っている行をすべてコメントアウトする。(後ろ向きー:-P)


127.0.0.1 localhost
***.***.***.*** hoge
# The following lines are desirable for IPv6 capable hosts
#::1 localhost ip6-localhost ip6-loopback
#ff02::1 ip6-allnodes
#ff02::2 ip6-allrouters

次に、/etc/sysctl.conf に以下の行を追加する。


net.core.rmem_default = 524288
net.core.rmem_max = 524288
net.core.wmem_default = 524288
net.core.wmem_max = 524288
net.ipv4.tcp_wmem = 4096 87380 524288
net.ipv4.tcp_rmem = 4096 87380 524288
net.ipv4.tcp_mem = 524288 524288 524288
net.ipv4.tcp_rfc1337 = 1
net.ipv4.ip_no_pmtu_disc = 0
net.ipv4.tcp_sack = 1
net.ipv4.tcp_fack = 1
net.ipv4.tcp_window_scaling = 1
net.ipv4.tcp_timestamps = 1
net.ipv4.tcp_ecn = 0
net.ipv4.route.flush = 1

最後に、sudo sysctl -p する。以上!

実際に設定してみると、かなり接続は速くなった感じ。気のせいかも知れませんがw

4
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
4