[[mscom_network_start]]

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
mscom_network_start [2014/05/15 16:09]
beckmanf tcp configuration
mscom_network_start [2014/05/20 14:16]
beckmanf [TCP configuration] - rmem
Line 179: Line 179:
 ==== TCP configuration ==== ==== TCP configuration ====
  
-Set the maximum ​write window ​size for tcp connections+=== Local memory restrictions === 
 +Set the maximum window ​sizes for tcp connections ​to 512000 Bytes.  
 <​code>​ <​code>​
 sudo sh -c "echo 512000 > /​proc/​sys/​net/​core/​wmem_max"​ sudo sh -c "echo 512000 > /​proc/​sys/​net/​core/​wmem_max"​
 sudo sh -c "echo 512000 > /​proc/​sys/​net/​core/​wmem_default"​ sudo sh -c "echo 512000 > /​proc/​sys/​net/​core/​wmem_default"​
 +sudo sh -c "echo 512000 > /​proc/​sys/​net/​core/​rmem_max"​
 +sudo sh -c "echo 512000 > /​proc/​sys/​net/​core/​rmem_default"​
 sudo sh -c "echo 512000 512000 512000 > /​proc/​sys/​net/​ipv4/​tcp_wmem"​ sudo sh -c "echo 512000 512000 512000 > /​proc/​sys/​net/​ipv4/​tcp_wmem"​
 sudo sh -c "echo 512000 512000 512000 > /​proc/​sys/​net/​ipv4/​tcp_rmem"​ sudo sh -c "echo 512000 512000 512000 > /​proc/​sys/​net/​ipv4/​tcp_rmem"​
 </​code>​ </​code>​
  
 +=== Initial TCP contention window size ===
 +
 +The following section shows how to change the initial contention window size to to 1 MSS. 
 +
 +<​code>​
 +fritz@ubuntu:​~$ ip route show
 +default via 192.168.178.1 dev eth0  proto static ​
 +169.254.0.0/​16 dev eth0  scope link  metric 1000 
 +192.168.178.0/​24 dev eth0  proto kernel ​ scope link  src 192.168.178.33 ​ metric 1 
 +fritz@ubuntu:​~$ sudo ip route change default via 192.168.178.1 dev eth0 proto static initcwnd 1
 +fritz@ubuntu:​~$ ip route show
 +default via 192.168.178.1 dev eth0  proto static ​ initcwnd 1
 +169.254.0.0/​16 dev eth0  scope link  metric 1000 
 +192.168.178.0/​24 dev eth0  proto kernel ​ scope link  src 192.168.178.33 ​ metric 1 
 +fritz@ubuntu:​~$ ​
 +</​code>​
 +
 +=== TCP Congestion avoidance algorithm selection ===
 +
 +The linux kernel provides several algorithms for tcp congestion avoidance. The following code shows how to figure out the available algorithms (here cubic and reno) and set and control the setting. In this example the congestion avoidance algorithm is switched from "​cubic"​ to "​reno"​. ​
 +
 +<​code>​
 +fritz$ cd /​proc/​sys/​net/​ipv4/​
 +fritz$ cat tcp_available_congestion_control ​
 +cubic reno
 +fritz$ cat tcp_congestion_control ​
 +cubic
 +fritz$ sudo sh -c "echo reno > tcp_congestion_control"​
 +fritz$ cat tcp_congestion_control ​
 +reno
 +</​code>​
  
  
  
  • mscom_network_start.txt
  • Last modified: 2016/03/16 09:01
  • by beckmanf