Перейти к содержимому
Калькуляторы

FreeBSD & 10G ixgbe

Уважаемые господа, помогите разобратся с одним вопросом.

 

Есть сервер supermicro на двух 2 6-ядерных Xeon E5-2620 2Ггц, c 10G сетевухой Intel X520-DA2. Карточка сидит на x8 pci-e 5Gbps

Операционка FreeBSD 9.1-RELEASE. Машинка используется как агрегатор vlan-ов (их там порядка 2000), плюс ipfw шейпер.

В ipfw.conf правил всего 76, весь шейпинг реализован на таблицах в четыре строчки.

 

Из настроек:

 

/boot/loader.conf:

 

hw.ixgbe.rxd=4096

hw.ixgbe.txd=4096

hw.ixgbe.num_queues=12

 

/etc/sysctl.conf:

 

net.inet.ip.fastforwarding=1

net.inet.ip.intr_queue_maxlen=4096

 

net.inet.ip.dummynet.io_fast=1

net.inet.ip.dummynet.hash_size=65535

net.inet.ip.dummynet.pipe_slot_limit=2048

 

kern.ipc.nmbclusters=512000

kern.ipc.maxsockbuf=83886080

 

kern.ipc.nmbjumbop=256000

hw.intr_storm_threshold=9000

 

dev.ix.0.rx_processing_limit=4096

dev.ix.1.rx_processing_limit=4096

dev.ix.0.enable_aim=0

dev.ix.0.queue0.interrupt_rate=50000

dev.ix.0.queue1.interrupt_rate=50000

dev.ix.0.queue2.interrupt_rate=50000

dev.ix.0.queue3.interrupt_rate=50000

dev.ix.0.queue4.interrupt_rate=50000

dev.ix.0.queue5.interrupt_rate=50000

dev.ix.0.queue6.interrupt_rate=50000

dev.ix.0.queue7.interrupt_rate=50000

dev.ix.0.queue8.interrupt_rate=50000

dev.ix.0.queue9.interrupt_rate=50000

dev.ix.0.queue10.interrupt_rate=50000

dev.ix.0.queue11.interrupt_rate=50000

 

При трафике около 250Кpps наблюдаются перегрузка по inetrrupt-ам всех 12 ядер и соответственно потери пакетов.

 

Вопрос в следующем - уперся ли я в апаратные ограничения железа, или дело в недостаточной прямизне рук ?

 

Графики прилагаются:

post-83189-076864000 1391516220_thumb.png

post-83189-026316700 1391516228_thumb.png

post-83189-045855900 1391516235_thumb.png

post-83189-020616100 1391516337_thumb.png

Изменено пользователем ramsess

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

Это железо точно вытянет больше.

Во фре вообще ничего не шарю, но спрошу, что у вас с поллингом?

Ну и стандартно ethtool -K eth0 gso off gro off tso off сделано?

Изменено пользователем BETEPAH

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

С большой вероятностью Вы упёрлись в

net.inet.ip.fastforwarding=1

 

Попробуйте значение 0

Ещё можно потюнить в /boot/loader.conf

net.isr.maxthreads=12

net.isr.bindthreads=1

но это если только будет особая нужда и в 'top -SHP' будут перекосы по ядрам

 

можно будет сделать

net.isr.maxthreads=6

net.isr.bindthreads=1

тогда маршрутизацией пакетов будет нагружен только один кристалл из Ваших двух.

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

Что-то не так.

У меня такая же карта на Е3-1270.

Использую оба порта, 30-40% нагрузки на проходящий трафик более 1.5 Гбит в одну сторону.

 

Дамминет прибит к одному ядру?

Очереди от сетевух прибиты жестко?

 

Я бы рекомендовал ограничить hw.ixgbe.num_queues=5. 0-е ядро на дамминет, остальные 5 на очереди.

Для начала прибейте все к одну процессору. Потом можно второй порт будет добавить.

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

ramsess, это явно не железные ограничения, так как на железе (X3440 штука, 4 ядра) на Linux у меня больше трафика, 5G и 700Kpps(роутинг, шэйпинг каждого юзера(а их там более 6000),ipset) и это не предел.

 

Кстати попробуйте прибить все прерывания к одному физическому процессору. Гипертрэдинг отключить.

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

Может вланы дают такой оверхед?

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

Не могут они такого оверхэда давать.

Особенно если сетевуха занимается этим аппаратно.

Но если интересно могу подсказать место в ядре где поменять константу чтобы гарантированно не давали :)

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

Я не пропал. Пока еще не закончил эксперименты. Решил включить второй 10Ж интерфейс и вынести на него аплинки.

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

 

В ipfw.conf правил всего 76, весь шейпинг реализован на таблицах в четыре строчки.

 

 

Покажите, плз.

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

При включении второго интерфейса суммарная нагружка выросла до 2Гбит, потери пропали, что не может не радовать. Но загрузка ядер interrupt-ами осталась на том же уровне.

 

ipfw.conf:

 

add permit udp from any to xxx.xxx.xxx.248 dst-port 53 via vlan10 out

add permit udp from any to xxx.xxx.xxx.253 dst-port 53 via vlan10 out

add permit tcp from any to xxx.xxx.xxx.251 dst-port 80 via vlan10 out

add permit tcp from any to xxx.xxx.xxx.247 dst-port 80 via vlan10 out

add permit tcp from any to xxx.xxx.xxx.248 dst-port 80 via vlan10 out

 

add fwd 127.0.0.1,8003 tcp from table(2) to any dst-port 80 via vlan190 out

add fwd 127.0.0.1,8003 tcp from table(2) to any dst-port 80 via vlan191 out

add fwd 127.0.0.1,8003 tcp from table(2) to any dst-port 80 via vlan195 out

add fwd 127.0.0.1,8003 tcp from table(2) to any dst-port 80 via vlan46 out

add deny ip from table(2) to any via vlan190 out

add deny ip from table(2) to any via vlan191 out

add deny ip from table(2) to any via vlan195 out

add deny ip from table(2) to any via vlan46 out

 

add fwd 127.0.0.1,8004 tcp from table(6) to any dst-port 80 via vlan190 out

add fwd 127.0.0.1,8004 tcp from table(6) to any dst-port 80 via vlan191 out

add fwd 127.0.0.1,8004 tcp from table(6) to any dst-port 80 via vlan195 out

add fwd 127.0.0.1,8004 tcp from table(6) to any dst-port 80 via vlan46 out

add deny ip from table(6) to any via vlan190 out

add deny ip from table(6) to any via vlan191 out

add deny ip from table(6) to any via vlan195 out

add deny ip from table(6) to any via vlan46 out

 

add fwd 127.0.0.1,8002 tcp from table(3) to any dst-port 80 via vlan190 out

add fwd 127.0.0.1,8002 tcp from table(3) to any dst-port 80 via vlan191 out

add fwd 127.0.0.1,8002 tcp from table(3) to any dst-port 80 via vlan195 out

add fwd 127.0.0.1,8002 tcp from table(3) to any dst-port 80 via vlan46 out

add deny ip from table(3) to any via vlan190 out

add deny ip from table(3) to any via vlan191 out

add deny ip from table(3) to any via vlan195 out

add deny ip from table(3) to any via vlan46 out

 

add fwd 127.0.0.1,8008 tcp from table(8) to any dst-port 80 via vlan190 out

add fwd 127.0.0.1,8008 tcp from table(8) to any dst-port 80 via vlan191 out

add fwd 127.0.0.1,8008 tcp from table(8) to any dst-port 80 via vlan195 out

add fwd 127.0.0.1,8008 tcp from table(8) to any dst-port 80 via vlan46 out

add deny ip from table(8) to any via vlan190 out

add deny ip from table(8) to any via vlan191 out

add deny ip from table(8) to any via vlan195 out

add deny ip from table(8) to any via vlan46 out

 

add fwd 127.0.0.1,8005 tcp from table(4) to any dst-port 80 via vlan190 out

add fwd 127.0.0.1,8005 tcp from table(4) to any dst-port 80 via vlan191 out

add fwd 127.0.0.1,8005 tcp from table(4) to any dst-port 80 via vlan195 out

add fwd 127.0.0.1,8005 tcp from table(4) to any dst-port 80 via vlan46 out

 

add fwd 127.0.0.1,8012 tcp from table(9) to any dst-port 80 via vlan190 out

add fwd 127.0.0.1,8012 tcp from table(9) to any dst-port 80 via vlan191 out

add fwd 127.0.0.1,8012 tcp from table(9) to any dst-port 80 via vlan195 out

add fwd 127.0.0.1,8012 tcp from table(9) to any dst-port 80 via vlan46 out

 

add 9000 count ip from xxx.xxx.221.0/24 to any via vlan191 out

add 9010 count ip from any to xxx.xxx.221.0/24 via vlan191 in

 

pipe 60 config bw 512Kbytes mask src-ip 0xffffffff

pipe 61 config bw 5120Kbytes mask dst-ip 0xffffffff

 

pipe 100 config bw 1024Kbytes mask src-ip 0xffffffff

pipe 101 config bw 10240Kbytes mask dst-ip 0xffffffff

 

pipe 110 config bw 10Mbit/s mask src-ip 0xffffffff

pipe 111 config bw 10Mbit/s mask dst-ip 0xffffffff

 

pipe 150 config bw 1536Kbytes mask src-ip 0xffffffff

pipe 151 config bw 10240Kbytes mask dst-ip 0xffffffff

 

pipe 152 config bw 750Kbytes mask src-ip 0xffffffff

pipe 153 config bw 1500Kbytes mask dst-ip 0xffffffff

 

pipe 200 config bw 2560Kbytes mask src-ip 0xffffffff

pipe 201 config bw 10240Kbytes mask dst-ip 0xffffffff

 

pipe 300 config bw 4096Kbytes mask src-ip 0xffffffff

pipe 301 config bw 10240Kbytes mask dst-ip 0xffffffff

 

pipe 302 config bw 1500Kbytes mask src-ip 0xffffffff

pipe 303 config bw 3000Kbytes mask dst-ip 0xffffffff

 

pipe 500 config bw 4096Kbytes mask src-ip 0xffffffff

pipe 501 config bw 10240Kbytes mask dst-ip 0xffffffff

 

pipe 600 config bw 3600Kbytes mask src-ip 0xffffffff

pipe 601 config bw 3000Kbytes mask dst-ip 0xffffffff

 

add 10000 pipe tablearg ip from table(100) to any via vlan190 out

add 10010 pipe tablearg ip from table(100) to any via vlan191 out

add 10020 pipe tablearg ip from any to table(101) via vlan190 in

add 10030 pipe tablearg ip from any to table(101) via vlan191 in

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

Можно попробовать skipto 10000 поставить и поглядеть как будет работать :) Все равно имхо многовато проходов, каждый пакетик матчить по такому списку накладненько.

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

При включении второго интерфейса суммарная нагружка выросла до 2Гбит, потери пропали, что не может не радовать. Но загрузка ядер interrupt-ами осталась на том же уровне.

 

ipfw.conf:

 

add fwd 127.0.0.1,8012 tcp from table(9) to any dst-port 80 via vlan190 out

add fwd 127.0.0.1,8012 tcp from table(9) to any dst-port 80 via vlan191 out

add fwd 127.0.0.1,8012 tcp from table(9) to any dst-port 80 via vlan195 out

add fwd 127.0.0.1,8012 tcp from table(9) to any dst-port 80 via vlan46 out

 

 

Пробовали объединить правила?

add fwd 127.0.0.1,8012 tcp from table(9) to any dst-port 80 via vlan190,vlan191,vlan195,vlan46 out

Поделиться сообщением


Ссылка на сообщение
Поделиться на других сайтах

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Гость
Ответить в тему...

×   Вставлено в виде отформатированного текста.   Вставить в виде обычного текста

  Разрешено не более 75 смайлов.

×   Ваша ссылка была автоматически встроена.   Отобразить как ссылку

×   Ваш предыдущий контент был восстановлен.   Очистить редактор

×   Вы не можете вставить изображения напрямую. Загрузите или вставьте изображения по ссылке.