Recovered from the older tannerjc.net wiki snapshot dated January 23, 2016.

General Troubleshooting Process

Benchmarking

Tuning

  • THIS SECTION IS INCORRECT! **

  • Calculate BDP (bandwidth delay product)

      100 Mebibits | 220  |   Byte | 3 s
BDP = -------------+------+--------+------- = 39321600 Bytes
          s        | Mebi | 8 bits |

Example w/ Verizon 3G

[root@x200 ~]# ping yahoo.com
PING yahoo.com (67.195.160.76) 56(84) bytes of data.
64 bytes from ir1.fp.vip.ac4.yahoo.com (67.195.160.76): icmp_seq=5 ttl=52 time=158 ms

  • Check if the NIC module has tunable DMA buffers by 25%

  • RxDescriptors=1024 TxDescriptors=512

  • Increase the tcp advanced window scale

  • net.ipv4.tcp_adv_win_scale=N

  • default N=2: up to (65535 * 22) ~= 256 KB

  • maximum N=14: up to (65535 * 214) ~= 1 GB


  • Check for packet fragmentation and tune buffer to compensate
[jtanner@x200 ~]$ cat /proc/net/snmp | grep '^Ip:' | cut -f17 -d' '
ReasmFails
0

[jtanner@x200 ~]$ ps axo pid,comm,util | grep softirq
    4 ksoftirqd/0      0
 3102 ksoftirqd/1      0

blockquote If ksoftirqd consumes more than a tiny percentage of CPU time, then that is an indication that the system is under heavy softirq load. See the ksoftirqd(9) man page for more information. /blockquote

  • Two approaches for improving interrupt handling

  • Interrupt coalescing: process multiple frames with each interrupt

  • Polling: process queues based on a timer-driven interrupt

  • NAPI devices: /usr/share/doc/kernel-doc-*/Documentation/networking/NAPI_HOWTO.txt

NAT

  • echo 1 /proc/sys/net/ipv4/ip_forward
  • iptables –table nat –append POSTROUTING –out-interface eth0 -j MASQUERADE
  • iptables –append FORWARD –in-interface eth1 -j ACCEPT

Bridging

F18