RHEL V4 & V5 - e1000: eth9: e1000_clean_tx_irq: Detected Tx Unit Hang
문제
레드헷 리눅스에서 e1000 NIC를 사용 중 e1000: eth9: e1000_clean_tx_irq: Detected Tx Unit Hang 메시지가 발생되며 시스템이 Down되는 문제가 발생합니다.
해결책
이 문제는 인텔 82545/82546 칩에만 발생되는 것으로 문제를 피하기 위해서는
- "TSO" disabled.
/sbin/ethtool -K eth0 tso off
/sbin/ethtool -K eth1 tso off
- Option 추가
TxDescPower = 10 with TxDescriptors = 1024
InterrupThrottleRate=8000,8000,8000,8000.
options e1000 TxDescPower=10,10 TxDescriptors=1024,1024
InterruptThrottleRate=8000,8000 <-- /etc/modprobe.conf
- 근본적인 해결책
Intel NIC를 다른 NIC로 바꾸는 것입니다.
------------------------------------------------------------------
Turn off TSO on all NICs. Large Segment Offload (known as Transmit Segment Offload in Linux) was implemented to offload some network processing to the NIC. While good in theory, it appears to cause more problems than it solves. It was more appropriate in older systems with limited processing power, but can result in choppy video and audio in media streaming and gaming applications in modern systems.
It should be defaulted off on all NICs. There is no reason for a user to turn it back on.
Turn off TSO:
ethtool -K ethX tso off
TCP Segmentation Offload
중요
10G NIC를 사용한다면 TSO(TCP Segmentation Offload)를 OFF로 설정하길 권장한다.
TCP는 전송시 패킷을 분할(Segmentation)하는데, 이 작업을 CPU가 아닌 NIC가 수행하도록 설정하는 것이 TSO이다. (기본 값은 ON이다.) 하지만 10G NIC 서비스 환경에서 우리는 이와 관련된 많은 장애를 겪었다.
TCP 패킷 유실 및 지연
TCP 연결 종료
Load Average의 비정상적인 증가
결론적으로 TSO는 모두의 기대만큼 높은 성능을 내지 못하는 것으로 추정된다. (NIC만 1G로 바꿔도 이런 문제는 발생하지 않았다.) 결론적으로 TSO를 OFF로 설정함으로써 서비스는 정상화되었다. 이에 따른 CPU 사용량은 우려할 수준이 아니며 서비스 규모와 비례하는 정직한 지표를 보여 준다.
TSO 설정은 다음과 같이 설정/확인할 수 있다. (K의 대/소문자에 유의한다.)
# ethtool -K ethX tso off // TSO OFF 설정
# ethtool -k ethX // 설정 열람
...
tcp segmentation offload: on
...
참고
더 자세한 정보는 다음 링크를 참조한다.
http://sandilands.info/sgordon/segmentation-offloading-with-wireshark-and-ethtool
http://www.linuxfoundation.org/collaborate/workgroups/networking/tso
http://www.packetinside.com/2013/02/mtu-1500.html
-------------------
TSO
# ethtool -k eth0
Features for eth0:
...
tcp-segmentation-offload: on
tx-tcp-segmentation: on
tx-tcp-ecn-segmentation: off [fixed]
tx-tcp6-segmentation: on
tx-tcp-mangleid-segmentation: off
generic-segmentation-offload: on
generic-receive-offload: on
...