IBM REDP-4285-00 User Manual

Page of 170
4285ch04.fm
Draft Document for Review May 4, 2007 11:35 am
136
 
Linux Performance and Tuning Guidelines
LAN adapters are efficient when network applications requesting data generate requests for 
large frames. Applications that request small blocks of data require the LAN adapter 
communication processor to spend a larger percentage of time executing overhead code for 
every byte of data transmitted. This is why most LAN adapters cannot sustain full wire speed 
for all frame sizes.
Refer to Tuning IBM System x Servers for Performance, SG24-5287. section 10.3. Advance d 
network features for more details. 
4.7.8  Increasing the packet queues
After increasing the size of the various network buffers, it is suggested that the amount of 
allowed unprocessed packets be increased, so that the kernel will wait longer before dropping 
packets. To do so, edit the value in /proc/sys/net/core/netdev_max_backlog.
4.7.9  Increasing the transmit queue length
Increase the txqueuelength parameter to a value between 1000 and 20000 per interface. This 
is especially useful for high-speed connections that perform large, homogeneous data 
transfers. The transmit queue length can be adjusted by using the ifconfig command as 
shown in Example 4-23.
Example 4-23   Setting the transmit queue length
[root@linux ipv4]# ifconfig eth1 txqueuelen 2000
4.7.10  Decreasing interrupts
Handling network packets requires the Linux kernel to handle a significant amount of 
interrupts and context switches unless NAPI is being used. For Intel e1000–based network 
interface cards, make sure that the network card driver was compiled with the 
CFLAGS_EXTRA -DCONFIG_E1000_NAPI flag. Broadcom tg3 modules should come in 
their newest version with built-in NAPI support.
If you need to recompile the Intel e1000 driver in order to enable NAPI, you can do so by 
issuing the following command on your build system:
make CFLAGS_EXTRA -DCONFIG_E1000_NAPI
In addition, on multiprocessor systems, binding the interrupts of the network interface cards to 
a physical CPU may yield additional performance gains. To achieve this goal you first have to 
identify the IRQ by the respective network interface. The data obtained via the ifconfig 
command will inform you of the interrupt number.
Example 4-24   Identifying the interrupt
[root@linux ~]# ifconfig eth1
eth1      Link encap:Ethernet  HWaddr 00:11:25:3F:19:B3
          inet addr:10.1.1.11  Bcast:10.255.255.255  Mask:255.255.0.0
          inet6 addr: fe80::211:25ff:fe3f:19b3/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:51704214 errors:0 dropped:0 overruns:0 frame:0
          TX packets:108485306 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:4260691222 (3.9 GiB)  TX bytes:157220928436 (146.4 GiB)
          Interrupt:169