5
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

LinuxとMacでのRWIN,MTUの設定

Posted at

あまり設定の詳しいことは知らないけどとりあえず枠は大きくすれば速くなるものなので.MTUは環境によって変わるので調べること.自宅環境はBフレッツなので1454に.

Linuxでの設定

net.ipv4.tcp_window_scaling = 1
net.ipv4.tcp_wmem = 4096 257232 1028928
net.ipv4.tcp_rmem = 4096 257232 1028928
net.ipv4.tcp_mem = 2048000 2048000 2048000
net.core.rmem_default = 257232
net.core.wmem_default = 257232
net.core.rmem_max = 1028928
net.core.wmem_max = 1028928

を /etc/sysctl.conf に追記し,sudo sysctl -p で反映.

# The primary network interface
auto eth0
iface eth0 inet static
	address 182.48.40.100
	mtu 1454

の MTU の設定行を /etc/network/interfaces の適切な位置に書き込む.一時的には ifconfig eth0 mtu 1454 で良い.

Macでの設定

$ sudo sysctl -w net.inet.tcp.recvspace=262144
net.inet.tcp.recvspace: 65536 -> 262144
$ sudo ifconfig en0 mtu 1454

起動時に反映させるにはスクリプト書いて登録しておかないといけないのかな.そこについてはさらに調べる必要がある.

参考文献

Ubuntu関係
http://linux2.g.hatena.ne.jp/lnznt/20120708/1341729750
http://d.hatena.ne.jp/poez22/20110511/1305072154
Mac関係
http://macdeunix.com/modules/xfsection/article.php?articleid=21

5
8
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
5
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?