← Documents Documentation/networking/device_drivers/ethernet/chelsio/cxgb.rst GitHub 원문 ↗

Linux 6.18.37 · Networking

Chelsio N210 10Gb Ethernet Network Controller

Chelsio N110/N210의 적응형 인터럽트, TSO, TCP 조정, SMP 친화도와 구형 PCI-X 및 hotplug 문제 해결법을 설명합니다.

Source pathDocumentation/networking/device_drivers/ethernet/chelsio/cxgb.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약·해설

cxgb.rst:1-393

이 릴리스 노트는 2005년의 N210/N110 환경을 다루므로 2.4 커널, PCI-X, hotplug 같은 역사적 조건이 많습니다. 현재 시스템에 그대로 적용하기보다 `adaptive-rx`와 TSO의 원리, CPU 친화도, 대역폭-지연 곱에 따른 버퍼 조정과 구형 환경 전용 우회 방법을 구분해 읽는 것이 좋습니다.

지원 범위
항목내용
드라이버Chelsio 10Gb Ethernet
주 대상N210
하위 호환N110
릴리스2.1.1, 2005-06-20

드라이버 릴리스의 대상과 버전입니다.

Adaptive RX
`adaptive-rx on`적응형 알고리즘부하 관찰지연 시간 조정
`adaptive-rx off`기본 50us`rx-usecs` 수동 설정

트래픽 부하에 맞추어 인터럽트 병합 지연 시간을 조정합니다.

TSO 제어
작업명령
활성화`ethtool -K <if> tso on`
비활성화`ethtool -K <if> tso off`
상태 확인`ethtool -k <if>`
기본값활성화

large send 오프로딩의 기본 상태와 ethtool 명령입니다.

성능 조정 영역
영역주요 매개변수
PCI`setpci` 지연 타이머
TCP 옵션`tcp_timestamps`, `tcp_sack`
연결`tcp_max_syn_backlog`
소켓 버퍼`rmem_*`, `wmem_*`
패킷 백로그`netdev_max_backlog`
IRQ`smp_affinity`

예시 설정은 재부팅하면 사라지는 시스템 전역 값입니다.

RX 윈도 계산
RTT 측정`1.25MB × RTT(ms)`최소 RX_WINDOW변동 고려 최대 2배256KB~512KB 예시

10Gb 링크의 RTT를 대역폭-지연 곱 공식에 넣고 변동 여유를 둡니다.

드라이버 로그
상태메시지 핵심
드라이버 시작version 2.1.1
NIC 감지N210 1x10GBaseX, PCI-X
링크 연결10Gbps full duplex
링크 끊김link is down

syslog에서 드라이버와 링크 상태를 빠르게 확인합니다.

SMP 재전송 원인
IRQ가 여러 CPU에 배치패킷 데이터 분산다른 순서로 재조립TCP 재전송IRQ를 단일 CPU에 바인딩

IRQ와 패킷 처리가 CPU 사이에 나뉘면 순서가 달라질 수 있습니다.

IRQ 친화도 유지
대상조치
irqbalance 데몬`chkconfig ... irqbalance off`
커널 irqbalance부팅 옵션 `noirqbalance`
NIC IRQ`ifconfig ... | grep Interrupt`
CPU 0 바인딩`echo 1 > .../smp_affinity`

수동 친화도 설정을 덮어쓰는 irqbalance 경로를 막습니다.

2.4 hotplug 문제
모듈 적재`hotplug``ifcfg-eth#` 검색HWADDR 없음다음 인터페이스 이름잘못된 IP 설정

HWADDR 매핑이 없으면 잘못된 인터페이스 이름과 설정이 선택될 수 있습니다.

AMD-8131 안전 설정
항목권장 안전값일반적인 기본값
데이터 길이1KB2KB
미완료 트랜잭션28
성능 시험2KB 가능문제 시 안전값 복원

133MHz PCI-X split completion 데이터 손상 우회 설정입니다.

응용 프로그램 친화도
netserver·netperfCPU 바인딩`runon` 또는 친화도 API캐시 지역성 안정측정 성능 개선

10Gb 작업이 CPU 사이를 이동하지 않게 해 측정 변동을 줄입니다.

현재 적용 판단
내용성격
적응형 병합·TSO현재도 유효한 원리
대역폭-지연 곱 기반 버퍼현재도 유효한 원리
2.4 hotplug역사적 환경
AMD-8131 PCI-X특정 구형 칩셋
ifconfig IRQ 표시구형 도구 관련

일반 원리와 구형 환경 전용 우회 방법을 구분합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0
2 .. include:: <isonum.txt>
3
4 =============================================
5 Chelsio N210 10Gb Ethernet Network Controller
6 =============================================
7
8 Driver Release Notes for Linux
9
10 Version 2.1.1
11
12 June 20, 2005
13
14 .. Contents
15
16 INTRODUCTION
17 FEATURES
18 PERFORMANCE
19 DRIVER MESSAGES
20 KNOWN ISSUES
21 SUPPORT
22
23
24 Introduction
25 ============
26
27 This document describes the Linux driver for Chelsio 10Gb Ethernet Network
28 Controller. This driver supports the Chelsio N210 NIC and is backward
29 compatible with the Chelsio N110 model 10Gb NICs.
30
31
32 Features
33 ========
34
35 Adaptive Interrupts (adaptive-rx)
36 ---------------------------------
37
38 This feature provides an adaptive algorithm that adjusts the interrupt
39 coalescing parameters, allowing the driver to dynamically adapt the latency
40 settings to achieve the highest performance during various types of network
41 load.
42
43 The interface used to control this feature is ethtool. Please see the
44 ethtool manpage for additional usage information.
45
46 By default, adaptive-rx is disabled.
47 To enable adaptive-rx::
48
49 ethtool -C <interface> adaptive-rx on
50
51 To disable adaptive-rx, use ethtool::
52
53 ethtool -C <interface> adaptive-rx off
54
55 After disabling adaptive-rx, the timer latency value will be set to 50us.
56 You may set the timer latency after disabling adaptive-rx::
57
58 ethtool -C <interface> rx-usecs <microseconds>
59
60 An example to set the timer latency value to 100us on eth0::
61
62 ethtool -C eth0 rx-usecs 100
63
64 You may also provide a timer latency value while disabling adaptive-rx::
65
66 ethtool -C <interface> adaptive-rx off rx-usecs <microseconds>
67
68 If adaptive-rx is disabled and a timer latency value is specified, the timer
69 will be set to the specified value until changed by the user or until
70 adaptive-rx is enabled.
71
72 To view the status of the adaptive-rx and timer latency values::
73
74 ethtool -c <interface>
75
76
77 TCP Segmentation Offloading (TSO) Support
78 -----------------------------------------
79
80 This feature, also known as "large send", enables a system's protocol stack
81 to offload portions of outbound TCP processing to a network interface card
82 thereby reducing system CPU utilization and enhancing performance.
83
84 The interface used to control this feature is ethtool version 1.8 or higher.
85 Please see the ethtool manpage for additional usage information.
86
87 By default, TSO is enabled.
88 To disable TSO::
89
90 ethtool -K <interface> tso off
91
92 To enable TSO::
93
94 ethtool -K <interface> tso on
95
96 To view the status of TSO::
97
98 ethtool -k <interface>
99
100
101 Performance
102 ===========
103
104 The following information is provided as an example of how to change system
105 parameters for "performance tuning" an what value to use. You may or may not
106 want to change these system parameters, depending on your server/workstation
107 application. Doing so is not warranted in any way by Chelsio Communications,
108 and is done at "YOUR OWN RISK". Chelsio will not be held responsible for loss
109 of data or damage to equipment.
110
111 Your distribution may have a different way of doing things, or you may prefer
112 a different method. These commands are shown only to provide an example of
113 what to do and are by no means definitive.
114
115 Making any of the following system changes will only last until you reboot
116 your system. You may want to write a script that runs at boot-up which
117 includes the optimal settings for your system.
118
119 Setting PCI Latency Timer::
120
121 setpci -d 1425::
122
123 * 0x0c.l=0x0000F800
124
125 Disabling TCP timestamp::
126
127 sysctl -w net.ipv4.tcp_timestamps=0
128
129 Disabling SACK::
130
131 sysctl -w net.ipv4.tcp_sack=0
132
133 Setting large number of incoming connection requests::
134
135 sysctl -w net.ipv4.tcp_max_syn_backlog=3000
136
137 Setting maximum receive socket buffer size::
138
139 sysctl -w net.core.rmem_max=1024000
140
141 Setting maximum send socket buffer size::
142
143 sysctl -w net.core.wmem_max=1024000
144
145 Set smp_affinity (on a multiprocessor system) to a single CPU::
146
147 echo 1 > /proc/irq/<interrupt_number>/smp_affinity
148
149 Setting default receive socket buffer size::
150
151 sysctl -w net.core.rmem_default=524287
152
153 Setting default send socket buffer size::
154
155 sysctl -w net.core.wmem_default=524287
156
157 Setting maximum option memory buffers::
158
159 sysctl -w net.core.optmem_max=524287
160
161 Setting maximum backlog (# of unprocessed packets before kernel drops)::
162
163 sysctl -w net.core.netdev_max_backlog=300000
164
165 Setting TCP read buffers (min/default/max)::
166
167 sysctl -w net.ipv4.tcp_rmem="10000000 10000000 10000000"
168
169 Setting TCP write buffers (min/pressure/max)::
170
171 sysctl -w net.ipv4.tcp_wmem="10000000 10000000 10000000"
172
173 Setting TCP buffer space (min/pressure/max)::
174
175 sysctl -w net.ipv4.tcp_mem="10000000 10000000 10000000"
176
177 TCP window size for single connections:
178
179 The receive buffer (RX_WINDOW) size must be at least as large as the
180 Bandwidth-Delay Product of the communication link between the sender and
181 receiver. Due to the variations of RTT, you may want to increase the buffer
182 size up to 2 times the Bandwidth-Delay Product. Reference page 289 of
183 "TCP/IP Illustrated, Volume 1, The Protocols" by W. Richard Stevens.
184
185 At 10Gb speeds, use the following formula::
186
187 RX_WINDOW >= 1.25MBytes * RTT(in milliseconds)
188 Example for RTT with 100us: RX_WINDOW = (1,250,000 * 0.1) = 125,000
189
190 RX_WINDOW sizes of 256KB - 512KB should be sufficient.
191
192 Setting the min, max, and default receive buffer (RX_WINDOW) size::
193
194 sysctl -w net.ipv4.tcp_rmem="<min> <default> <max>"
195
196 TCP window size for multiple connections:
197 The receive buffer (RX_WINDOW) size may be calculated the same as single
198 connections, but should be divided by the number of connections. The
199 smaller window prevents congestion and facilitates better pacing,
200 especially if/when MAC level flow control does not work well or when it is
201 not supported on the machine. Experimentation may be necessary to attain
202 the correct value. This method is provided as a starting point for the
203 correct receive buffer size.
204
205 Setting the min, max, and default receive buffer (RX_WINDOW) size is
206 performed in the same manner as single connection.
207
208
209 Driver Messages
210 ===============
211
212 The following messages are the most common messages logged by syslog. These
213 may be found in /var/log/messages.
214
215 Driver up::
216
217 Chelsio Network Driver - version 2.1.1
218
219 NIC detected::
220
221 eth#: Chelsio N210 1x10GBaseX NIC (rev #), PCIX 133MHz/64-bit
222
223 Link up::
224
225 eth#: link is up at 10 Gbps, full duplex
226
227 Link down::
228
229 eth#: link is down
230
231
232 Known Issues
233 ============
234
235 These issues have been identified during testing. The following information
236 is provided as a workaround to the problem. In some cases, this problem is
237 inherent to Linux or to a particular Linux Distribution and/or hardware
238 platform.
239
240 1. Large number of TCP retransmits on a multiprocessor (SMP) system.
241
242 On a system with multiple CPUs, the interrupt (IRQ) for the network
243 controller may be bound to more than one CPU. This will cause TCP
244 retransmits if the packet data were to be split across different CPUs
245 and re-assembled in a different order than expected.
246
247 To eliminate the TCP retransmits, set smp_affinity on the particular
248 interrupt to a single CPU. You can locate the interrupt (IRQ) used on
249 the N110/N210 by using ifconfig::
250
251 ifconfig <dev_name> | grep Interrupt
252
253 Set the smp_affinity to a single CPU::
254
255 echo 1 > /proc/irq/<interrupt_number>/smp_affinity
256
257 It is highly suggested that you do not run the irqbalance daemon on your
258 system, as this will change any smp_affinity setting you have applied.
259 The irqbalance daemon runs on a 10 second interval and binds interrupts
260 to the least loaded CPU determined by the daemon. To disable this daemon::
261
262 chkconfig --level 2345 irqbalance off
263
264 By default, some Linux distributions enable the kernel feature,
265 irqbalance, which performs the same function as the daemon. To disable
266 this feature, add the following line to your bootloader::
267
268 noirqbalance
269
270 Example using the Grub bootloader::
271
272 title Red Hat Enterprise Linux AS (2.4.21-27.ELsmp)
273 root (hd0,0)
274 kernel /vmlinuz-2.4.21-27.ELsmp ro root=/dev/hda3 noirqbalance
275 initrd /initrd-2.4.21-27.ELsmp.img
276
277 2. After running insmod, the driver is loaded and the incorrect network
278 interface is brought up without running ifup.
279
280 When using 2.4.x kernels, including RHEL kernels, the Linux kernel
281 invokes a script named "hotplug". This script is primarily used to
282 automatically bring up USB devices when they are plugged in, however,
283 the script also attempts to automatically bring up a network interface
284 after loading the kernel module. The hotplug script does this by scanning
285 the ifcfg-eth# config files in /etc/sysconfig/network-scripts, looking
286 for HWADDR=<mac_address>.
287
288 If the hotplug script does not find the HWADDRR within any of the
289 ifcfg-eth# files, it will bring up the device with the next available
290 interface name. If this interface is already configured for a different
291 network card, your new interface will have incorrect IP address and
292 network settings.
293
294 To solve this issue, you can add the HWADDR=<mac_address> key to the
295 interface config file of your network controller.
296
297 To disable this "hotplug" feature, you may add the driver (module name)
298 to the "blacklist" file located in /etc/hotplug. It has been noted that
299 this does not work for network devices because the net.agent script
300 does not use the blacklist file. Simply remove, or rename, the net.agent
301 script located in /etc/hotplug to disable this feature.
302
303 3. Transport Protocol (TP) hangs when running heavy multi-connection traffic
304 on an AMD Opteron system with HyperTransport PCI-X Tunnel chipset.
305
306 If your AMD Opteron system uses the AMD-8131 HyperTransport PCI-X Tunnel
307 chipset, you may experience the "133-Mhz Mode Split Completion Data
308 Corruption" bug identified by AMD while using a 133Mhz PCI-X card on the
309 bus PCI-X bus.
310
311 AMD states, "Under highly specific conditions, the AMD-8131 PCI-X Tunnel
312 can provide stale data via split completion cycles to a PCI-X card that
313 is operating at 133 Mhz", causing data corruption.
314
315 AMD's provides three workarounds for this problem, however, Chelsio
316 recommends the first option for best performance with this bug:
317
318 For 133Mhz secondary bus operation, limit the transaction length and
319 the number of outstanding transactions, via BIOS configuration
320 programming of the PCI-X card, to the following:
321
322 Data Length (bytes): 1k
323
324 Total allowed outstanding transactions: 2
325
326 Please refer to AMD 8131-HT/PCI-X Errata 26310 Rev 3.08 August 2004,
327 section 56, "133-MHz Mode Split Completion Data Corruption" for more
328 details with this bug and workarounds suggested by AMD.
329
330 It may be possible to work outside AMD's recommended PCI-X settings, try
331 increasing the Data Length to 2k bytes for increased performance. If you
332 have issues with these settings, please revert to the "safe" settings
333 and duplicate the problem before submitting a bug or asking for support.
334
335 .. note::
336
337 The default setting on most systems is 8 outstanding transactions
338 and 2k bytes data length.
339
340 4. On multiprocessor systems, it has been noted that an application which
341 is handling 10Gb networking can switch between CPUs causing degraded
342 and/or unstable performance.
343
344 If running on an SMP system and taking performance measurements, it
345 is suggested you either run the latest netperf-2.4.0+ or use a binding
346 tool such as Tim Hockin's procstate utilities (runon)
347 <http://www.hockin.org/~thockin/procstate/>.
348
349 Binding netserver and netperf (or other applications) to particular
350 CPUs will have a significant difference in performance measurements.
351 You may need to experiment which CPU to bind the application to in
352 order to achieve the best performance for your system.
353
354 If you are developing an application designed for 10Gb networking,
355 please keep in mind you may want to look at kernel functions
356 sched_setaffinity & sched_getaffinity to bind your application.
357
358 If you are just running user-space applications such as ftp, telnet,
359 etc., you may want to try the runon tool provided by Tim Hockin's
360 procstate utility. You could also try binding the interface to a
361 particular CPU: runon 0 ifup eth0
362
363
364 Support
365 =======
366
367 If you have problems with the software or hardware, please contact our
368 customer support team via email at [email protected] or check our website
369 at http://www.chelsio.com
370
371 -------------------------------------------------------------------------------
372
373 ::
374
375 Chelsio Communications
376 370 San Aleso Ave.
377 Suite 100
378 Sunnyvale, CA 94085
379 http://www.chelsio.com
380
381 This program is free software; you can redistribute it and/or modify
382 it under the terms of the GNU General Public License, version 2, as
383 published by the Free Software Foundation.
384
385 You should have received a copy of the GNU General Public License along
386 with this program; if not, write to the Free Software Foundation, Inc.,
387 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
388
389 THIS SOFTWARE IS PROVIDED ``AS IS`` AND WITHOUT ANY EXPRESS OR IMPLIED
390 WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
391 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
392
393 Copyright |copy| 2003-2005 Chelsio Communications. All rights reserved.
394

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

N210 드라이버, 적응형 인터럽트와 TSO

1-100

Chelsio N210 10Gb 이더넷 네트워크 컨트롤러

Linux용 드라이버 릴리스 노트, 버전 2.1.1, 2005년 6월 20일

목차

  • 소개
  • 기능
  • 성능
  • 드라이버 메시지
  • 알려진 문제
  • 지원

소개

이 문서는 Chelsio 10Gb 이더넷 네트워크 컨트롤러용 Linux 드라이버를 설명합니다. 이 드라이버는 Chelsio N210 NIC를 지원하며 Chelsio N110 모델 10Gb NIC와 하위 호환됩니다.

기능

적응형 인터럽트(`adaptive-rx`)

이 기능은 인터럽트 병합 매개변수를 조정하는 적응형 알고리즘을 제공합니다. 드라이버는 여러 형태의 네트워크 부하에서 가장 높은 성능을 내도록 지연 시간 설정을 동적으로 조정할 수 있습니다.

이 기능은 `ethtool` 인터페이스로 제어합니다. 자세한 사용법은 ethtool 매뉴얼 페이지를 참조하십시오.

기본적으로 `adaptive-rx`는 비활성화되어 있습니다. 활성화하려면 다음 명령을 사용합니다.

ethtool -C <interface> adaptive-rx on

`adaptive-rx`를 비활성화하려면 다음 명령을 사용합니다.

ethtool -C <interface> adaptive-rx off

`adaptive-rx`를 비활성화하면 타이머 지연 시간은 50us로 설정됩니다. 비활성화한 뒤 타이머 지연 시간을 직접 지정할 수도 있습니다.

ethtool -C <interface> rx-usecs <microseconds>

다음은 `eth0`의 타이머 지연 시간을 100us로 설정하는 예입니다.

ethtool -C eth0 rx-usecs 100

`adaptive-rx`를 끄는 명령과 타이머 지연 시간 값을 함께 지정할 수도 있습니다.

ethtool -C <interface> adaptive-rx off rx-usecs <microseconds>

`adaptive-rx`가 비활성화된 상태에서 타이머 지연 시간을 지정하면 사용자가 값을 바꾸거나 `adaptive-rx`를 다시 활성화할 때까지 지정한 값이 유지됩니다.

`adaptive-rx` 상태와 타이머 지연 시간 값을 확인하려면 다음 명령을 사용합니다.

ethtool -c <interface>

TCP 세그멘테이션 오프로딩(`TSO`) 지원

"large send"라고도 하는 TSO는 송신 TCP 처리의 일부를 네트워크 인터페이스 카드로 넘깁니다. 그 결과 시스템 CPU 사용률을 낮추고 성능을 높일 수 있습니다.

이 기능은 ethtool 1.8 이상으로 제어합니다. 자세한 사용법은 ethtool 매뉴얼 페이지를 참조하십시오.

기본적으로 TSO는 활성화되어 있습니다. 비활성화하려면 다음 명령을 사용합니다.

ethtool -K <interface> tso off

TSO를 활성화하려면 다음 명령을 사용합니다.

ethtool -K <interface> tso on

TSO 상태를 확인하려면 다음 명령을 사용합니다.

ethtool -k <interface>
.. SPDX-License-Identifier: GPL-2.0
.. include:: <isonum.txt>

=============================================
Chelsio N210 10Gb Ethernet Network Controller
=============================================

Driver Release Notes for Linux

Version 2.1.1

June 20, 2005

.. Contents

 INTRODUCTION
 FEATURES
 PERFORMANCE
 DRIVER MESSAGES
 KNOWN ISSUES
 SUPPORT


Introduction
============

 This document describes the Linux driver for Chelsio 10Gb Ethernet Network
 Controller. This driver supports the Chelsio N210 NIC and is backward
 compatible with the Chelsio N110 model 10Gb NICs.


Features
========

Adaptive Interrupts (adaptive-rx)
---------------------------------

  This feature provides an adaptive algorithm that adjusts the interrupt
  coalescing parameters, allowing the driver to dynamically adapt the latency
  settings to achieve the highest performance during various types of network
  load.

  The interface used to control this feature is ethtool. Please see the
  ethtool manpage for additional usage information.

  By default, adaptive-rx is disabled.
  To enable adaptive-rx::

      ethtool -C <interface> adaptive-rx on

  To disable adaptive-rx, use ethtool::

      ethtool -C <interface> adaptive-rx off

  After disabling adaptive-rx, the timer latency value will be set to 50us.
  You may set the timer latency after disabling adaptive-rx::

      ethtool -C <interface> rx-usecs <microseconds>

  An example to set the timer latency value to 100us on eth0::

      ethtool -C eth0 rx-usecs 100

  You may also provide a timer latency value while disabling adaptive-rx::

      ethtool -C <interface> adaptive-rx off rx-usecs <microseconds>

  If adaptive-rx is disabled and a timer latency value is specified, the timer
  will be set to the specified value until changed by the user or until
  adaptive-rx is enabled.

  To view the status of the adaptive-rx and timer latency values::

      ethtool -c <interface>


TCP Segmentation Offloading (TSO) Support
-----------------------------------------

  This feature, also known as "large send", enables a system's protocol stack
  to offload portions of outbound TCP processing to a network interface card
  thereby reducing system CPU utilization and enhancing performance.

  The interface used to control this feature is ethtool version 1.8 or higher.
  Please see the ethtool manpage for additional usage information.

  By default, TSO is enabled.
  To disable TSO::

      ethtool -K <interface> tso off

  To enable TSO::

      ethtool -K <interface> tso on

  To view the status of TSO::

      ethtool -k <interface>

시스템 성능 조정과 TCP 윈도

101-208

성능

다음 내용은 성능 조정을 위해 시스템 매개변수를 바꾸는 방법과 예시 값을 제시합니다. 서버 또는 워크스테이션의 용도에 따라 이 값을 변경하지 않는 편이 나을 수도 있습니다. Chelsio Communications는 이러한 변경을 보증하지 않으며 변경은 전적으로 사용자 책임으로 수행해야 합니다. Chelsio는 데이터 손실이나 장비 손상에 책임을 지지 않습니다.

배포판에 따라 설정 방법이 다를 수 있고 사용자가 다른 방식을 선호할 수도 있습니다. 다음 명령은 가능한 방법의 예일 뿐 확정적인 권장 설정은 아닙니다.

다음 시스템 변경 사항은 재부팅할 때까지만 유지됩니다. 시스템에 가장 알맞은 값을 부팅할 때 적용하는 스크립트를 작성할 수 있습니다.

PCI 지연 타이머 설정

setpci -d 1425::
0x0c.l=0x0000F800

TCP 타임스탬프 비활성화

sysctl -w net.ipv4.tcp_timestamps=0

SACK 비활성화

sysctl -w net.ipv4.tcp_sack=0

들어오는 연결 요청을 많이 받을 수 있도록 백로그 설정

sysctl -w net.ipv4.tcp_max_syn_backlog=3000

최대 수신 소켓 버퍼 크기 설정

sysctl -w net.core.rmem_max=1024000

최대 송신 소켓 버퍼 크기 설정

sysctl -w net.core.wmem_max=1024000

다중 프로세서 시스템에서 `smp_affinity`를 단일 CPU로 설정

echo 1 > /proc/irq/<interrupt_number>/smp_affinity

기본 수신 소켓 버퍼 크기 설정

sysctl -w net.core.rmem_default=524287

기본 송신 소켓 버퍼 크기 설정

sysctl -w net.core.wmem_default=524287

최대 옵션 메모리 버퍼 설정

sysctl -w net.core.optmem_max=524287

커널이 처리하지 못한 패킷을 버리기 전까지 유지할 최대 백로그 설정

sysctl -w net.core.netdev_max_backlog=300000

TCP 읽기 버퍼의 최솟값, 기본값, 최댓값 설정

sysctl -w net.ipv4.tcp_rmem="10000000 10000000 10000000"

TCP 쓰기 버퍼의 최솟값, 압박 임계값, 최댓값 설정

sysctl -w net.ipv4.tcp_wmem="10000000 10000000 10000000"

TCP 버퍼 공간의 최솟값, 압박 임계값, 최댓값 설정

sysctl -w net.ipv4.tcp_mem="10000000 10000000 10000000"

단일 연결의 TCP 윈도 크기

수신 버퍼(`RX_WINDOW`) 크기는 송신자와 수신자 사이 통신 링크의 대역폭-지연 곱보다 크거나 같아야 합니다. RTT가 달라질 수 있으므로 버퍼 크기를 대역폭-지연 곱의 두 배까지 늘릴 수 있습니다. W. Richard Stevens의 "TCP/IP Illustrated, Volume 1, The Protocols" 289쪽을 참조하십시오.

10Gb 속도에서는 다음 공식을 사용합니다.

RX_WINDOW >= 1.25MBytes * RTT(in milliseconds)
Example for RTT with 100us: RX_WINDOW = (1,250,000 * 0.1) = 125,000

256KB에서 512KB 사이의 `RX_WINDOW` 크기면 충분할 것입니다.

수신 버퍼의 최솟값, 기본값, 최댓값을 설정하려면 다음 명령을 사용합니다.

sysctl -w net.ipv4.tcp_rmem="<min> <default> <max>"

여러 연결의 TCP 윈도 크기

수신 버퍼 크기는 단일 연결과 같은 방식으로 계산하되 연결 수로 나누어야 합니다. 작은 윈도는 혼잡을 방지하고 패킷 전송 속도 조절을 개선합니다. 특히 MAC 계층 흐름 제어가 제대로 작동하지 않거나 시스템에서 지원되지 않을 때 유용합니다. 올바른 값을 찾으려면 실험이 필요할 수 있으며 이 방법은 적절한 수신 버퍼 크기를 찾기 위한 출발점입니다.

수신 버퍼의 최솟값, 기본값, 최댓값은 단일 연결과 같은 방법으로 설정합니다.

Performance
===========

 The following information is provided as an example of how to change system
 parameters for "performance tuning" an what value to use. You may or may not
 want to change these system parameters, depending on your server/workstation
 application. Doing so is not warranted in any way by Chelsio Communications,
 and is done at "YOUR OWN RISK". Chelsio will not be held responsible for loss
 of data or damage to equipment.

 Your distribution may have a different way of doing things, or you may prefer
 a different method. These commands are shown only to provide an example of
 what to do and are by no means definitive.

 Making any of the following system changes will only last until you reboot
 your system. You may want to write a script that runs at boot-up which
 includes the optimal settings for your system.

  Setting PCI Latency Timer::

      setpci -d 1425::

* 0x0c.l=0x0000F800

  Disabling TCP timestamp::

      sysctl -w net.ipv4.tcp_timestamps=0

  Disabling SACK::

      sysctl -w net.ipv4.tcp_sack=0

  Setting large number of incoming connection requests::

      sysctl -w net.ipv4.tcp_max_syn_backlog=3000

  Setting maximum receive socket buffer size::

      sysctl -w net.core.rmem_max=1024000

  Setting maximum send socket buffer size::

      sysctl -w net.core.wmem_max=1024000

  Set smp_affinity (on a multiprocessor system) to a single CPU::

      echo 1 > /proc/irq/<interrupt_number>/smp_affinity

  Setting default receive socket buffer size::

      sysctl -w net.core.rmem_default=524287

  Setting default send socket buffer size::

      sysctl -w net.core.wmem_default=524287

  Setting maximum option memory buffers::

      sysctl -w net.core.optmem_max=524287

  Setting maximum backlog (# of unprocessed packets before kernel drops)::

      sysctl -w net.core.netdev_max_backlog=300000

  Setting TCP read buffers (min/default/max)::

      sysctl -w net.ipv4.tcp_rmem="10000000 10000000 10000000"

  Setting TCP write buffers (min/pressure/max)::

      sysctl -w net.ipv4.tcp_wmem="10000000 10000000 10000000"

  Setting TCP buffer space (min/pressure/max)::

      sysctl -w net.ipv4.tcp_mem="10000000 10000000 10000000"

  TCP window size for single connections:

   The receive buffer (RX_WINDOW) size must be at least as large as the
   Bandwidth-Delay Product of the communication link between the sender and
   receiver. Due to the variations of RTT, you may want to increase the buffer
   size up to 2 times the Bandwidth-Delay Product. Reference page 289 of
   "TCP/IP Illustrated, Volume 1, The Protocols" by W. Richard Stevens.

   At 10Gb speeds, use the following formula::

       RX_WINDOW >= 1.25MBytes * RTT(in milliseconds)
       Example for RTT with 100us: RX_WINDOW = (1,250,000 * 0.1) = 125,000

   RX_WINDOW sizes of 256KB - 512KB should be sufficient.

   Setting the min, max, and default receive buffer (RX_WINDOW) size::

       sysctl -w net.ipv4.tcp_rmem="<min> <default> <max>"

  TCP window size for multiple connections:
   The receive buffer (RX_WINDOW) size may be calculated the same as single
   connections, but should be divided by the number of connections. The
   smaller window prevents congestion and facilitates better pacing,
   especially if/when MAC level flow control does not work well or when it is
   not supported on the machine. Experimentation may be necessary to attain
   the correct value. This method is provided as a starting point for the
   correct receive buffer size.

   Setting the min, max, and default receive buffer (RX_WINDOW) size is
   performed in the same manner as single connection.

드라이버 메시지와 알려진 문제 개요

209-239

드라이버 메시지

다음은 syslog에 가장 자주 기록되는 메시지이며 `/var/log/messages`에서 확인할 수 있습니다.

드라이버 시작

Chelsio Network Driver - version 2.1.1

NIC 감지

eth#: Chelsio N210 1x10GBaseX NIC (rev #), PCIX 133MHz/64-bit

링크 연결

eth#: link is up at 10 Gbps, full duplex

링크 끊김

eth#: link is down

알려진 문제

다음 문제는 시험 과정에서 확인되었습니다. 이어지는 내용은 문제를 피하기 위한 우회 방법입니다. 일부 문제는 Linux 자체, 특정 Linux 배포판 또는 하드웨어 플랫폼의 특성에서 비롯됩니다.

Driver Messages
===============

 The following messages are the most common messages logged by syslog. These
 may be found in /var/log/messages.

  Driver up::

     Chelsio Network Driver - version 2.1.1

  NIC detected::

     eth#: Chelsio N210 1x10GBaseX NIC (rev #), PCIX 133MHz/64-bit

  Link up::

     eth#: link is up at 10 Gbps, full duplex

  Link down::

     eth#: link is down


Known Issues
============

 These issues have been identified during testing. The following information
 is provided as a workaround to the problem. In some cases, this problem is
 inherent to Linux or to a particular Linux Distribution and/or hardware
 platform.

SMP TCP 재전송과 IRQ 친화도

240-276

1. 다중 프로세서(`SMP`) 시스템에서 TCP 재전송이 많이 발생하는 문제

CPU가 여러 개인 시스템에서는 네트워크 컨트롤러의 인터럽트(`IRQ`)가 둘 이상의 CPU에 묶일 수 있습니다. 패킷 데이터가 여러 CPU로 나뉘고 예상과 다른 순서로 재조립되면 TCP 재전송이 발생합니다.

TCP 재전송을 없애려면 해당 인터럽트의 `smp_affinity`를 단일 CPU로 설정합니다. N110/N210이 사용하는 IRQ는 다음 명령으로 찾습니다.

ifconfig <dev_name> | grep Interrupt

`smp_affinity`를 단일 CPU로 설정합니다.

echo 1 > /proc/irq/<interrupt_number>/smp_affinity

`irqbalance` 데몬은 사용자가 적용한 `smp_affinity` 값을 바꾸므로 실행하지 않는 것이 좋습니다. 이 데몬은 10초마다 부하가 가장 낮다고 판단한 CPU에 인터럽트를 다시 배치합니다. 데몬을 비활성화하려면 다음 명령을 사용합니다.

chkconfig --level 2345 irqbalance off

일부 Linux 배포판은 데몬과 같은 기능을 수행하는 커널 `irqbalance` 기능을 기본으로 활성화합니다. 이 기능을 끄려면 부트로더에 `noirqbalance`를 추가합니다.

GRUB 부트로더 설정 예

title Red Hat Enterprise Linux AS (2.4.21-27.ELsmp)
root (hd0,0)
kernel /vmlinuz-2.4.21-27.ELsmp ro root=/dev/hda3 noirqbalance
initrd /initrd-2.4.21-27.ELsmp.img
  1. Large number of TCP retransmits on a multiprocessor (SMP) system.

      On a system with multiple CPUs, the interrupt (IRQ) for the network
      controller may be bound to more than one CPU. This will cause TCP
      retransmits if the packet data were to be split across different CPUs
      and re-assembled in a different order than expected.

      To eliminate the TCP retransmits, set smp_affinity on the particular
      interrupt to a single CPU. You can locate the interrupt (IRQ) used on
      the N110/N210 by using ifconfig::

          ifconfig <dev_name> | grep Interrupt

      Set the smp_affinity to a single CPU::

          echo 1 > /proc/irq/<interrupt_number>/smp_affinity

      It is highly suggested that you do not run the irqbalance daemon on your
      system, as this will change any smp_affinity setting you have applied.
      The irqbalance daemon runs on a 10 second interval and binds interrupts
      to the least loaded CPU determined by the daemon. To disable this daemon::

          chkconfig --level 2345 irqbalance off

      By default, some Linux distributions enable the kernel feature,
      irqbalance, which performs the same function as the daemon. To disable
      this feature, add the following line to your bootloader::

          noirqbalance

          Example using the Grub bootloader::

              title Red Hat Enterprise Linux AS (2.4.21-27.ELsmp)
              root (hd0,0)
              kernel /vmlinuz-2.4.21-27.ELsmp ro root=/dev/hda3 noirqbalance
              initrd /initrd-2.4.21-27.ELsmp.img

2.4 커널 hotplug의 잘못된 인터페이스 활성화

277-302

2. `insmod`를 실행한 뒤 드라이버가 적재되면서 `ifup`을 실행하지 않았는데도 잘못된 네트워크 인터페이스가 활성화되는 문제

RHEL 커널을 포함한 2.4.x 커널은 `hotplug`라는 스크립트를 호출합니다. 이 스크립트는 주로 USB 장치를 연결했을 때 자동으로 활성화하는 데 쓰이지만, 커널 모듈을 적재한 뒤 네트워크 인터페이스도 자동으로 활성화하려 합니다. `/etc/sysconfig/network-scripts`의 `ifcfg-eth#` 설정 파일을 훑어 `HWADDR=<mac_address>`를 찾습니다.

어떤 `ifcfg-eth#` 파일에서도 `HWADDR`를 찾지 못하면 다음으로 사용할 수 있는 인터페이스 이름으로 장치를 활성화합니다. 그 이름이 다른 네트워크 카드에 이미 설정되어 있으면 새 인터페이스에 잘못된 IP 주소와 네트워크 설정이 적용됩니다.

이 문제를 해결하려면 네트워크 컨트롤러의 인터페이스 설정 파일에 `HWADDR=<mac_address>` 키를 추가합니다.

`hotplug` 기능을 끄기 위해 `/etc/hotplug`의 `blacklist` 파일에 드라이버 모듈 이름을 추가할 수 있습니다. 그러나 `net.agent` 스크립트가 이 파일을 사용하지 않으므로 네트워크 장치에는 이 방법이 통하지 않는 것으로 알려져 있습니다. 기능을 끄려면 `/etc/hotplug`의 `net.agent` 스크립트를 제거하거나 이름을 바꿉니다.

  2. After running insmod, the driver is loaded and the incorrect network
     interface is brought up without running ifup.

      When using 2.4.x kernels, including RHEL kernels, the Linux kernel
      invokes a script named "hotplug". This script is primarily used to
      automatically bring up USB devices when they are plugged in, however,
      the script also attempts to automatically bring up a network interface
      after loading the kernel module. The hotplug script does this by scanning
      the ifcfg-eth# config files in /etc/sysconfig/network-scripts, looking
      for HWADDR=<mac_address>.

      If the hotplug script does not find the HWADDRR within any of the
      ifcfg-eth# files, it will bring up the device with the next available
      interface name. If this interface is already configured for a different
      network card, your new interface will have incorrect IP address and
      network settings.

      To solve this issue, you can add the HWADDR=<mac_address> key to the
      interface config file of your network controller.

      To disable this "hotplug" feature, you may add the driver (module name)
      to the "blacklist" file located in /etc/hotplug. It has been noted that
      this does not work for network devices because the net.agent script
      does not use the blacklist file. Simply remove, or rename, the net.agent
      script located in /etc/hotplug to disable this feature.

AMD-8131 PCI-X 데이터 손상 우회 방법

303-339

3. HyperTransport PCI-X Tunnel 칩셋을 사용한 AMD Opteron 시스템에서 다중 연결 트래픽을 과도하게 처리할 때 Transport Protocol(`TP`)이 멈추는 문제

AMD Opteron 시스템이 AMD-8131 HyperTransport PCI-X Tunnel 칩셋을 사용한다면 133MHz PCI-X 카드에서 AMD가 확인한 `133-MHz Mode Split Completion Data Corruption` 버그가 발생할 수 있습니다.

AMD에 따르면 매우 특정한 조건에서 AMD-8131 PCI-X Tunnel은 133MHz로 동작하는 PCI-X 카드에 split completion cycle을 통해 오래된 데이터를 전달할 수 있으며, 이 때문에 데이터가 손상됩니다.

AMD는 세 가지 우회 방법을 제시하지만 Chelsio는 이 버그가 있는 환경에서 최상의 성능을 내기 위해 첫 번째 방법을 권장합니다. 133MHz 보조 버스로 동작할 때 BIOS에서 PCI-X 카드의 트랜잭션 길이와 미완료 트랜잭션 수를 다음과 같이 제한합니다.

  • 데이터 길이: 1KB
  • 허용되는 전체 미완료 트랜잭션 수: 2

버그와 AMD가 제시한 우회 방법의 자세한 내용은 `AMD 8131-HT/PCI-X Errata 26310 Rev 3.08 August 2004`의 56절 `133-MHz Mode Split Completion Data Corruption`을 참조하십시오.

AMD의 권장 PCI-X 설정을 벗어나 동작할 수도 있습니다. 성능을 높이려면 데이터 길이를 2KB로 늘려 시험해 볼 수 있습니다. 이 설정에서 문제가 발생하면 지원을 요청하거나 버그를 제출하기 전에 안전한 설정으로 되돌리고 문제를 재현하십시오.

참고: 대부분의 시스템은 기본적으로 미완료 트랜잭션 8개와 데이터 길이 2KB로 설정되어 있습니다.

  3. Transport Protocol (TP) hangs when running heavy multi-connection traffic
     on an AMD Opteron system with HyperTransport PCI-X Tunnel chipset.

      If your AMD Opteron system uses the AMD-8131 HyperTransport PCI-X Tunnel
      chipset, you may experience the "133-Mhz Mode Split Completion Data
      Corruption" bug identified by AMD while using a 133Mhz PCI-X card on the
      bus PCI-X bus.

      AMD states, "Under highly specific conditions, the AMD-8131 PCI-X Tunnel
      can provide stale data via split completion cycles to a PCI-X card that
      is operating at 133 Mhz", causing data corruption.

      AMD's provides three workarounds for this problem, however, Chelsio
      recommends the first option for best performance with this bug:

        For 133Mhz secondary bus operation, limit the transaction length and
        the number of outstanding transactions, via BIOS configuration
        programming of the PCI-X card, to the following:

           Data Length (bytes): 1k

           Total allowed outstanding transactions: 2

      Please refer to AMD 8131-HT/PCI-X Errata 26310 Rev 3.08 August 2004,
      section 56, "133-MHz Mode Split Completion Data Corruption" for more
      details with this bug and workarounds suggested by AMD.

      It may be possible to work outside AMD's recommended PCI-X settings, try
      increasing the Data Length to 2k bytes for increased performance. If you
      have issues with these settings, please revert to the "safe" settings
      and duplicate the problem before submitting a bug or asking for support.

      .. note::

            The default setting on most systems is 8 outstanding transactions
            and 2k bytes data length.

10Gb 응용 프로그램의 CPU 친화도

340-363

4. 다중 프로세서 시스템에서 10Gb 네트워킹을 처리하는 응용 프로그램이 CPU 사이를 이동해 성능이 저하되거나 불안정해지는 문제

SMP 시스템에서 성능을 측정한다면 최신 `netperf-2.4.0+`을 실행하거나 Tim Hockin의 procstate 유틸리티에 포함된 `runon` 같은 바인딩 도구를 사용하는 것이 좋습니다. 주소는 `http://www.hockin.org/~thockin/procstate/`입니다.

`netserver`와 `netperf` 또는 다른 응용 프로그램을 특정 CPU에 묶으면 성능 측정값이 크게 달라집니다. 시스템에서 최상의 성능을 내는 CPU를 찾기 위해 여러 CPU를 시험해야 할 수 있습니다.

10Gb 네트워킹용 응용 프로그램을 개발한다면 커널 함수 `sched_setaffinity`와 `sched_getaffinity`로 응용 프로그램을 CPU에 묶는 방식을 고려하십시오.

FTP, telnet 같은 사용자 공간 응용 프로그램을 실행한다면 procstate의 `runon` 도구를 사용해 볼 수 있습니다. 다음과 같이 인터페이스를 특정 CPU에 묶는 방법도 있습니다.

runon 0 ifup eth0
  4. On multiprocessor systems, it has been noted that an application which
     is handling 10Gb networking can switch between CPUs causing degraded
     and/or unstable performance.

      If running on an SMP system and taking performance measurements, it
      is suggested you either run the latest netperf-2.4.0+ or use a binding
      tool such as Tim Hockin's procstate utilities (runon)
      <http://www.hockin.org/~thockin/procstate/>.

      Binding netserver and netperf (or other applications) to particular
      CPUs will have a significant difference in performance measurements.
      You may need to experiment which CPU to bind the application to in
      order to achieve the best performance for your system.

      If you are developing an application designed for 10Gb networking,
      please keep in mind you may want to look at kernel functions
      sched_setaffinity & sched_getaffinity to bind your application.

      If you are just running user-space applications such as ftp, telnet,
      etc., you may want to try the runon tool provided by Tim Hockin's
      procstate utility. You could also try binding the interface to a
      particular CPU: runon 0 ifup eth0

지원, GPL과 보증 부인

364-393

지원

소프트웨어 또는 하드웨어에 문제가 있으면 `[email protected]`으로 고객 지원팀에 문의하거나 `http://www.chelsio.com` 웹사이트를 확인하십시오.

Chelsio Communications

370 San Aleso Ave.

Suite 100

Sunnyvale, CA 94085

http://www.chelsio.com

이 프로그램은 자유 소프트웨어입니다. Free Software Foundation이 공표한 GNU General Public License 버전 2의 조건에 따라 재배포하거나 수정할 수 있습니다.

이 프로그램과 함께 GNU General Public License 사본을 받았어야 합니다. 받지 못했다면 Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA로 문의하십시오.

이 소프트웨어는 명시적 또는 묵시적 보증 없이 `AS IS` 상태로 제공됩니다. 상품성 및 특정 목적 적합성에 대한 묵시적 보증을 포함하되 이에 한정되지 않는 모든 보증을 부인합니다.

Copyright © 2003-2005 Chelsio Communications. All rights reserved.

Support
=======

 If you have problems with the software or hardware, please contact our
 customer support team via email at [email protected] or check our website
 at http://www.chelsio.com

-------------------------------------------------------------------------------

::

 Chelsio Communications
 370 San Aleso Ave.
 Suite 100
 Sunnyvale, CA 94085
 http://www.chelsio.com

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.

You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

THIS SOFTWARE IS PROVIDED ``AS IS`` AND WITHOUT ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.

Copyright |copy| 2003-2005 Chelsio Communications. All rights reserved.