2014-05-19 7 views
2

Intel 10G NIC에서 사용되는 RX/TX 대기열 수를 설정하고 싶습니다. 이유를 설명해 드리겠습니다 :ixgbe : RX/TX 대기열 수 설정

Dell R720 시스템에서 X520 유형의 Intel 10G NIC를 사용하고 있습니다. 3.6.7-k 버전의 ixgbe를 사용하고 있습니다. 우분투 3.2.0-59의 커널.

시스템의 24 개 코어 중 4 개에서 네트워크 응용 프로그램을 실행하고 있습니다. 현재 NIC는 플로우 디렉터를 사용하고 있으므로 24 개의 TX 및 RX 대기열이 있으며 대부분의 IRQ는 마침내 4 코어에서 실행됩니다.

그러나 일부 IRQ가 다른 20 개의 대기열에서 실행되고있는 것을 볼 수 있습니다 (흐름 검색기에서 트래픽의 약 20 %를 차지하므로 정기적 인 RSS를 통해 트래픽이 발생 함). 이제 다른 IRQ가 실행 중일 때 손상된 다른 작업을 수행하면서 다른 20 개의 코어에서 어떤 IRQ도 실행되지 않도록해야합니다.

내가 사용하는 4 개의 코어에만 인터럽트의 친화력을 설정하려고했지만 flow-director와는 잘 작동하지 않습니다. 나는 4 개의 RX/TX 큐를 사용하고 그것들을 전용 코어에 할당하는 것이 더 나은 방법이라고 생각한다. 하지만 ixgbe 드라이버에서 RX/TX 대기열의 수를 설정하는 방법을 찾을 수 없었습니다 (Broadcom의 bnx2x와 같은 익숙한 다른 10G 드라이버에서는 상당히 간단 함에도 불구하고).

아이디어가 있으십니까?

답변

3

최신 Linux 커널 소스 (3.18.0-rc1 기준)의 ixgbe (현재 3.19.1-k) 버전에서는 불가능합니다.

RSS 매개 변수를 지원하는 최신 ixgbe 드라이버 (현재 3.22.3)를 e1000.sf.net에서 가져와야합니다. 에서을의 ixgbe에는 modinfo :

PARM을 : RSS : 수의 배율 설명자 대기열, 기본 0 = CPU 수 (INT의 배열) 그래서 당신은 하나 개의 ixgbe NIC하고있는 경우

측 수신 4 큐를 원하는, 당신은 modprobe.conf에이 같은 라인을 추가해야합니다 (또는 배포판에 상응하는) 것 :

options ixgbe RSS=4 

이 그럼 당신은/proc 디렉토리/IRQ/*/smp_affinity의 CPU 마스크를 설정하는 것이 좋습니다/proc/interrupts에있는 irq가 무엇이든간에 NIC와 일치해야합니다.

+0

실제로 커널 3.9 버전 (2013) 및 ixgbe 드라이버 "3.11.33-k"버전이 커널 (e1000 sf net이 아님)에서 가능합니다. 'ethtool -L eth1 combined 4'는 대기열 번호를 변경할 것입니다 (내가 알고있는 것처럼 카드의 부분 재 초기화가 있습니다). – osgx

0

Linux 커널에 포함 된 일부 버전의 ixgbe 드라이버 (2013 년부터 3.9 커널, "3.11.33-k"버전의 ixgbe)는 RSS 모듈 옵션 없이도 런타임시 RSS (대기열) 수를 변경할 수 있습니다. 네트워크 카드의 매개 변수를 변경 ethtool tool있어,이 채널을 변경할 수있는 옵션은 다음과 같습니다 ethtool -l eth1

ethtool -l|--show-channels devname 

    ethtool -L|--set-channels devname [rx N] [tx N] [other N] 
      [combined N] 


    -l --show-channels 
      Queries the specified network device for the numbers of 
      channels it has. A channel is an IRQ and the set of queues 
      that can trigger that IRQ. 

    -L --set-channels 
      Changes the numbers of channels of the specified network 
      device. 

     rx N Changes the number of channels with only receive queues. 

     tx N Changes the number of channels with only transmit queues. 

     other N 
       Changes the number of channels used only for other 
       purposes e.g. link interrupts or SR-IOV co-ordination. 

     combined N 
       Changes the number of multi-purpose channels. 

테스트 현재 채널 (RSS, 큐)의 ixgbe의 eth1의 수는 및 ethtool -L eth1 combined 4 또는 ethtool -L eth1 rx 2 tx 2로 변경합니다. net/ethernet/intel/ixgbe/ixgbe_ethtool.c로 구현

: http://elixir.free-electrons.com/linux/v4.12/source/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c#L3442 const 정적 구조체 ethtool_ops ixgbe_ethtool_ops = {... .get_channels = 용의 ixgbe_get_channels, .set_channels 용의 ixgbe_set_channels = ...}

ixgbe_get_channels : http://elixir.free-electrons.com/linux/v4.12/source/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c#L3127

ixgbe_set_channelsadapter->ring_feature[RING_F_RSS].limit을 변경 : http://elixir.free-electrons.com/linux/v4.12/source/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c#L3164

은 (2013 정도) 리눅스 커널 3.9 버전 이후 구현 : * http://elixir.free-electrons.com/linux/v3.9/ident/ixgbe_get_channels * https://patchwork.ozlabs.org/patch/211119/ "[RFC, v2,09/10] ixgbe : Tx/Rx 채널 수 표시에 대한 지원 추가 " * https://patchwork.ozlabs.org/patch/211120/"[RFC, v2,10/10] ixgbe : set_channels ethtool 작업 diffmbox에 대한 지원 추가 "