Проблема с шейпами когда iope сессий больше 3000

Shaper related questions
rob
Posts: 17
Joined: 22 Jun 2015, 22:14

Проблема с шейпами когда iope сессий больше 3000

Post by rob »

Прошу помощи разобраться с проблемной ситуацией.
У абонентов сильно падает скорость когда ipoe сессий стает больше ~3000.
Версия Accel: accel-cmd 1.11.0
CPU загружен не больше 40%
Остальных системных ресурсов хватает.
Что нужно для решения проблемы?
dimka88
Posts: 866
Joined: 13 Oct 2014, 05:51
Contact:

Re: Проблема с шейпами когда iope сессий больше 3000

Post by dimka88 »

Что за сетевая карта?
Шейпер думаю придется делать хеш-таблицами используя модуль accel-ppp compat (скрипты ip-up), хотя смотря как именно ipoe реализовано.
rob
Posts: 17
Joined: 22 Jun 2015, 22:14

Re: Проблема с шейпами когда iope сессий больше 3000

Post by rob »

Сетевые:
03:00.0 Ethernet controller: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection (rev 01)
03:00.1 Ethernet controller: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection (rev 01)

Авторизация по opt82 через радиус.
Схема - vlan на коммутатор.
на этом же сервере нат в пул IP.
Что именно еще нужно уточнить про схему?

Подскажите как можно реализовать шейпер через хеш-таблицы?
dimka88
Posts: 866
Joined: 13 Oct 2014, 05:51
Contact:

Re: Проблема с шейпами когда iope сессий больше 3000

Post by dimka88 »

Как я понял в вашей схеме создаются интерфейсы вида ipoeXXXX, предлагаю сначала попробовать в момент падения скорости убрать все tc правила добавленные accel-ppp c интерфейса проблемного клиента, посмотреть по скорости, сделать там замеры, или как вы определяете.
Далее навесить правила ручками на интерфейс ipoeXXXX для данного клиента, что то типа

Code: Select all

/sbin/tc qdisc del dev ipoeXXXX root    > /dev/null
/sbin/tc qdisc del dev ipoeXXXX ingress > /dev/null
/sbin/tc qdisc add devipoeXXXX root handle 1: htb default 20 r2q 300
/sbin/tc class add dev ipoeXXXX parent 1: classid 1:1 htb rate 20480kbit
/sbin/tc class add dev ipoeXXXX parent 1:1 classid 1:10 htb rate 20480kbit prio 1
/sbin/tc class add dev ipoeXXXX parent 1:1 classid 1:20 htb rate 20480kbit prio 2
/sbin/tc qdisc add dev ipoeXXXX parent 1:10 handle 10: sfq perturb 10 quantum 1500
/sbin/tc qdisc add dev ipoeXXXX parent 1:20 handle 20: sfq perturb 10 quantum 1500
/sbin/tc filter add dev ipoeXXXX parent 1:0 protocol ip prio 10 u32 match ip tos 0x10 0xff flowid 1:10
/sbin/tc filter add dev ipoeXXXX parent 1:0 protocol ip prio 10 u32 match ip protocol 1 0xff flowid 1:10
#
#               upload policer
#
/sbin/tc qdisc add dev ipoeXXXX handle ffff: ingress
/sbin/tc filter add dev ipoeXXXX parent ffff: protocol ip prio 50 u32 match ip src 0.0.0.0/0 police rate 20480kbit burst 12k action drop flowid :1
Ну и было бы неплохо увидеть вывод perf top, и загляните в dmesg и syslog на предмет чего то необычного.
Про smp_affinity особо спрашивать не буду, думаю там у вас все развешено.
doca
Posts: 12
Joined: 26 Nov 2017, 20:23

Re: Проблема с шейпами когда iope сессий больше 3000

Post by doca »

rob wrote: 23 Nov 2017, 20:12 Прошу помощи разобраться с проблемной ситуацией.
У абонентов сильно падает скорость когда ipoe сессий стает больше ~3000.
Версия Accel: accel-cmd 1.11.0
CPU загружен не больше 40%
Остальных системных ресурсов хватает.
Что нужно для решения проблемы?
Дополнительные данные о проблеме:
1. Падает скорость - имеено uplink от абонентов в сторону сети Интернет. Downlink ( из сети на клиента) - без изменений, все ок.
2. 3000 пользователей не является тригером - переводили > 5000 пользователей ( не в ЧНН) - полет нормальный. Следовательно делаем вывод, что проблема в количестве трафика ( Gbit/s или kpps) , который может переварить сервер.
3. Наблюдаем аналогичную проблему на втором сервере. При загрузке примерно до 3 Gbit/s трафика downlink + 300MBit/s Uplink все ок ( в сумме 3.3 Gbit/s). При повышении этой отметки по трафику - начинает проседает Uplink для всех абонентов.
4. Dmesq / syslog - без явных проблемных сообщений.
5. Сетевая карта имеет 2х10GE интерфейса. 3.3Gbit/s на входящем интерфейсе + 3.3Gbit/s на исходящем интерфейсе 10GE.

Прошу дать дальнейшие рекомендации.
doca
Posts: 12
Joined: 26 Nov 2017, 20:23

Re: Проблема с шейпами когда iope сессий больше 3000

Post by doca »

Во вложении результат работы 2-х серверов за 3 дня. На третий день видна явная "полка на уровне" около 3Gbit/s суммарного трафика ( на двух серверах примерно одинаково).
Attachments
Untitled 2.jpg
Untitled 2.jpg (225.23 KiB) Viewed 6999 times
dimka88
Posts: 866
Joined: 13 Oct 2014, 05:51
Contact:

Re: Проблема с шейпами когда iope сессий больше 3000

Post by dimka88 »

doca, а вы как то тюнили ядро?
1) perf top (в пик)
2) top (в пик)
3) ifconfig ethX
4) ethtool -k ethX
5) ethtool -g ethX
6) cat /proc/interrupts
Давайте смотреть, что там.
doca
Posts: 12
Joined: 26 Nov 2017, 20:23

Re: Проблема с шейпами когда iope сессий больше 3000

Post by doca »

Ниже значения для проблемного сервера (не в ЧНН).

Code: Select all

top - 13:10:52 up 26 days, 36 min,  3 users,  load average: 0.76, 0.79, 0.66
Tasks: 177 total,   1 running, 176 sleeping,   0 stopped,   0 zombie
%Cpu(s):  0.7 us,  0.8 sy,  0.0 ni, 77.6 id,  0.0 wa,  0.0 hi, 21.0 si,  0.0 st
KiB Mem:   8167972 total,  3209300 used,  4958672 free,   152028 buffers
KiB Swap:  2594812 total,        0 used,  2594812 free.  1023412 cached Mem

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
  868 zabbix    20   0   70676   3544   2696 S   5.0  0.0   2434:09 zabbix_agentd
  869 zabbix    20   0   70676   3544   2696 S   5.0  0.0   2432:13 zabbix_agentd
  867 zabbix    20   0   70676   3556   2696 S   4.3  0.0   2434:23 zabbix_agentd
 4345 root      20   0  403920  79084   4276 S   1.0  1.0 889:15.88 accel-pppd
 6766 root      20   0   17796   5032   2752 S   0.7  0.1 146:43.55 htop
    8 root      20   0       0      0      0 S   0.3  0.0  85:09.98 rcu_sched
   24 root      20   0       0      0      0 S   0.3  0.0  49:46.22 ksoftirqd/3
   35 root      20   0       0      0      0 S   0.3  0.0 474:26.76 ksoftirqd/5
   45 root      20   0       0      0      0 S   0.3  0.0 464:08.37 ksoftirqd/7
    1 root      20   0   41964  17056   3100 S   0.0  0.2   0:34.44 systemd







Server1:~# ethtool -k eth1
Features for eth1:
rx-checksumming: on
tx-checksumming: on
        tx-checksum-ipv4: on
        tx-checksum-ip-generic: off [fixed]
        tx-checksum-ipv6: on
        tx-checksum-fcoe-crc: off [fixed]
        tx-checksum-sctp: on
scatter-gather: on
        tx-scatter-gather: on
        tx-scatter-gather-fraglist: off [fixed]
tcp-segmentation-offload: off
        tx-tcp-segmentation: off
        tx-tcp-ecn-segmentation: off [fixed]
        tx-tcp6-segmentation: off
udp-fragmentation-offload: off [fixed]
generic-segmentation-offload: off
generic-receive-offload: off
large-receive-offload: off
rx-vlan-offload: off
tx-vlan-offload: off
ntuple-filters: off
receive-hashing: on
highdma: on [fixed]
rx-vlan-filter: on [fixed]
vlan-challenged: off [fixed]
tx-lockless: off [fixed]
netns-local: off [fixed]
tx-gso-robust: off [fixed]
tx-fcoe-segmentation: off [fixed]
tx-gre-segmentation: off [fixed]
tx-ipip-segmentation: off [fixed]
tx-sit-segmentation: off [fixed]
tx-udp_tnl-segmentation: off [fixed]
fcoe-mtu: off [fixed]
tx-nocache-copy: off
loopback: off [fixed]
rx-fcs: off [fixed]
rx-all: off [fixed]
tx-vlan-stag-hw-insert: off [fixed]
rx-vlan-stag-hw-parse: off [fixed]
rx-vlan-stag-filter: off [fixed]
l2-fwd-offload: off [fixed]
busy-poll: on [fixed]

Server1:~# ethtool -k eth0
Features for eth0:
rx-checksumming: on
tx-checksumming: on
        tx-checksum-ipv4: on
        tx-checksum-ip-generic: off [fixed]
        tx-checksum-ipv6: on
        tx-checksum-fcoe-crc: off [fixed]
        tx-checksum-sctp: on
scatter-gather: on
        tx-scatter-gather: on
        tx-scatter-gather-fraglist: off [fixed]
tcp-segmentation-offload: off
        tx-tcp-segmentation: off
        tx-tcp-ecn-segmentation: off [fixed]
        tx-tcp6-segmentation: off
udp-fragmentation-offload: off [fixed]
generic-segmentation-offload: off
generic-receive-offload: off
large-receive-offload: off
rx-vlan-offload: off
tx-vlan-offload: off
ntuple-filters: off
receive-hashing: on
highdma: on [fixed]
rx-vlan-filter: on [fixed]
vlan-challenged: off [fixed]
tx-lockless: off [fixed]
netns-local: off [fixed]
tx-gso-robust: off [fixed]
tx-fcoe-segmentation: off [fixed]
tx-gre-segmentation: off [fixed]
tx-ipip-segmentation: off [fixed]
tx-sit-segmentation: off [fixed]
tx-udp_tnl-segmentation: off [fixed]
fcoe-mtu: off [fixed]
tx-nocache-copy: off
loopback: off [fixed]
rx-fcs: off [fixed]
rx-all: off [fixed]
tx-vlan-stag-hw-insert: off [fixed]
rx-vlan-stag-hw-parse: off [fixed]
rx-vlan-stag-filter: off [fixed]
l2-fwd-offload: off [fixed]
busy-poll: on [fixed]


Server1:~# ifconfig eth1
eth1      Link encap:Ethernet  HWaddr 00:e0:ed:
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:189838511647 errors:0 dropped:0 overruns:0 frame:0
          TX packets:330460226141 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:10000
          RX bytes:57413235439661 (52.2 TiB)  TX bytes:428736510871764 (389.9 TiB)

Server1:~# ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 00:e0:ed:
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:338651717384 errors:0 dropped:0 overruns:0 frame:0
          TX packets:194441592009 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:10000
          RX bytes:433263879322811 (394.0 TiB)  TX bytes:59685744052943 (54.2 TiB)







          Server1:~#   cat /proc/interrupts
           CPU0       CPU1       CPU2       CPU3       CPU4       CPU5       CPU6       CPU7
  0:  799982367          0          0          0          0          0          0          0   IO-APIC   2-edge      timer
  1:          2          0          0          0          0          0          0          0   IO-APIC   1-edge      i8042
  8:          1          0          0          0          0          0          0          0   IO-APIC   8-edge      rtc0
  9:          0          0          0          0          0          0          0          0   IO-APIC   9-fasteoi   acpi
 12:          4          0          0          0          0          0          0          0   IO-APIC  12-edge      i8042
 16:          0          0          0          0          0          0          0          0   IO-APIC  16-fasteoi   uhci_hcd:usb3
 18:          0          0          0          0          0          0          0          0   IO-APIC  18-fasteoi   ehci_hcd:usb1, uhci_hcd:usb8, i801_smbus
 19:          0          0          0          0          0          0          0          0   IO-APIC  19-fasteoi   uhci_hcd:usb5, uhci_hcd:usb7
 21:          0          0          0          0          0          0          0          0   IO-APIC  21-fasteoi   uhci_hcd:usb4
 23:          0          0          0          0          0          0          0          0   IO-APIC  23-fasteoi   ehci_hcd:usb2, uhci_hcd:usb6
 24:          0          0          0          0          0          0          0          0   PCI-MSI 16384-edge      aerdrv, PCIe PME
 25:          0          0          0          0          0          0          0          0   PCI-MSI 49152-edge      aerdrv, PCIe PME
 26:          0          0          0          0          0          0          0          0   PCI-MSI 114688-edge      aerdrv, PCIe PME
 27:          0          0          0          0          0          0          0          0   PCI-MSI 147456-edge      aerdrv, PCIe PME
 37:    2160814          0          0          0          0          0          0          0   PCI-MSI 512000-edge      0000:00:1f.2
 38:  770571611          0          0          0          0          0          0          0   PCI-MSI 1572864-edge      eth0-TxRx-0
 39:          1  979313428          0          0          0          0          0          0   PCI-MSI 1572865-edge      eth0-TxRx-1
 40:          1          0 1026015757          0          0          0          0          0   PCI-MSI 1572866-edge      eth0-TxRx-2
 41:          1          0          0  482974960          0          0          0          0   PCI-MSI 1572867-edge      eth0-TxRx-3
 42:     441104          0          0          0          0          0          0          0   PCI-MSI 1572868-edge      eth0
 43:          0          0          0          0          0          0          0          0   PCI-MSI 2623488-edge      eth3
 44:    1124556          0          0          0          0          0          0          0   PCI-MSI 2623489-edge      eth3-TxRx-0
 45:    1124556          0          0          0          0          0          0          0   PCI-MSI 2623490-edge      eth3-TxRx-1
 46:    1124556          0          0          0          0          0          0          0   PCI-MSI 2623491-edge      eth3-TxRx-2
 47:    1124556          0          0          0          0          0          0          0   PCI-MSI 2623492-edge      eth3-TxRx-3
 48:    1124556          0          0          0          0          0          0          0   PCI-MSI 2623493-edge      eth3-TxRx-4
 49:    1124556          0          0          0          0          0          0          0   PCI-MSI 2623494-edge      eth3-TxRx-5
 50:    1124556          0          0          0          0          0          0          0   PCI-MSI 2623495-edge      eth3-TxRx-6
 51:    1124556          0          0          0          0          0          0          0   PCI-MSI 2623496-edge      eth3-TxRx-7
 52: 4103598111          0          0          0 1400044951          0          0          0   PCI-MSI 1574912-edge      eth1-TxRx-0
 53:          1   94925765          0          0          0 1407346628          0          0   PCI-MSI 1574913-edge      eth1-TxRx-1
 54:          1          0   16819172          0          0          0 1511066104          0   PCI-MSI 1574914-edge      eth1-TxRx-2
 55:          1          0          0          0   53417606          0          0 1295555550   PCI-MSI 1574915-edge      eth1-TxRx-3
 56:     170369          0          0          0          0          0          0          0   PCI-MSI 1574916-edge      eth1
 57:          2          0          0          0          0          0          0          0   PCI-MSI 360448-edge      ioat-msix
 58:          2          0          0          0          0          0          0          0   PCI-MSI 362496-edge      ioat-msix
 59:          2          0          0          0          0          0          0          0   PCI-MSI 364544-edge      ioat-msix
 60:          2          0          0          0          0          0          0          0   PCI-MSI 366592-edge      ioat-msix
 61:          2          0          0          0          0          0          0          0   PCI-MSI 368640-edge      ioat-msix
 62:          2          0          0          0          0          0          0          0   PCI-MSI 370688-edge      ioat-msix
 63:          2          0          0          0          0          0          0          0   PCI-MSI 372736-edge      ioat-msix
 64:          2          0          0          0          0          0          0          0   PCI-MSI 374784-edge      ioat-msix
NMI:    2090740    2124025    2091250    2025291    1153491     948768     946024     948393   Non-maskable interrupts
LOC: 2122207500 2362475265 2149490830 1409938965 1234129168 1080401393 1080147543 1072800850   Local timer interrupts
SPU:          0          0          0          0          0          0          0          0   Spurious interrupts
PMI:    2090740    2124025    2091250    2025291    1153491     948768     946024     948393   Performance monitoring interrupts
IWI:    2090661    2123934    2091176    2025224    1153457     948734     945986     948349   IRQ work interrupts
RTR:          7          0          0          0          0          0          0          0   APIC ICR read retries
RES:  244313255 2635707719 1989091452 1750191926 2469174213  855034474  766133948  721438322   Rescheduling interrupts
CAL:       3193       3252       3256       3263     108816     166372     180843     177035   Function call interrupts
TLB:     723529     766605     805990     606341     685791     451985     429194     425056   TLB shootdowns
TRM:          0          0          0          0          0          0          0          0   Thermal event interrupts
THR:          0          0          0          0          0          0          0          0   Threshold APIC interrupts
DFR:          0          0          0          0          0          0          0          0   Deferred Error APIC interrupts
MCE:          0          0          0          0          0          0          0          0   Machine check exceptions
MCP:       7499       7499       7499       7499       7499       7499       7499       7499   Machine check polls
ERR:          0
MIS:          0
PIN:          0          0          0          0          0          0          0          0   Posted-interrupt notification event
PIW:          0          0          0          0          0          0          0          0   Posted-interrupt wakeup event




dimka88
Posts: 866
Joined: 13 Oct 2014, 05:51
Contact:

Re: Проблема с шейпами когда iope сессий больше 3000

Post by dimka88 »

ht выключен? Если нет, то попробуйте прерывания прибить на физические ядра.
В каком диапазоне держится показатель si(system interrupt) в top, в проблемное время?
ethtool -g eth0 еще покажите.
ps:// У проекта есть телеграмм чатик https://t.me/joinchat/DS6swRC3DvEWdNijTqaaeA
doca
Posts: 12
Joined: 26 Nov 2017, 20:23

Re: Проблема с шейпами когда iope сессий больше 3000

Post by doca »

ethtool -g ethХ - для двух интерфейсов

Code: Select all

Server1:~# ethtool -g eth0
Ring parameters for eth0:
Pre-set maximums:
RX:             4096
RX Mini:        0
RX Jumbo:       0
TX:             4096
Current hardware settings:
RX:             2048
RX Mini:        0
RX Jumbo:       0
TX:             2048

Server1:~# ethtool -g eth1
Ring parameters for eth1:
Pre-set maximums:
RX:             4096
RX Mini:        0
RX Jumbo:       0
TX:             4096
Current hardware settings:
RX:             2048
RX Mini:        0
RX Jumbo:       0
TX:             2048
Post Reply