G@riK Posted January 20, 2013 Posted January 20, 2013 Всем доброго времени суток. Есть софтовый бридж: linux debian 6.0.4 kernel 2.6.33.20 проц core-i5 шейпер на tc Сетевая 4-портовая, по 2 интерфейса объединены в бонды. auto eth0 iface eth0 inet manual bond-master bond0 auto eth1 iface eth1 inet manual bond-master bond0 auto eth2 iface eth2 inet manual bond-master bond1 auto eth3 iface eth3 inet manual bond-master bond1 auto bond0 allow-hotplug bond0 iface bond0 inet manual bond_mode 802.3ad bond_miimon 100 bond_downdelay 200 bond_updelay 200 bond_primary eth0 eth1 auto bond1 allow-hotplug bond1 iface bond1 inet manual bond_mode 802.3ad bond_miimon 100 bond_downdelay 200 bond_updelay 200 bond_primary eth2 eth3 auto br0 allow-hotplug br0 iface br0 inet static address 192.168.1.123 netmask 255.255.255.0 network 192.168.1.0 broadcast 192.168.1.255 gateway 192.168.1.254 bridge_ports bond0 bond1 bridge_maxwait 0 Небольшой тюнинг сетевухи: echo 'Привязка очередей сетевых интерфейсов к ядрам' ifconfig eth0 up echo 1 > /proc/irq/`cat /proc/interrupts | grep 'eth0-TxRx-0' | awk -F \: '{printf $1}'| tr -d ' '`/smp_affinity echo 2 > /proc/irq/`cat /proc/interrupts | grep 'eth0-TxRx-1' | awk -F \: '{printf $1}'| tr -d ' '`/smp_affinity echo 4 > /proc/irq/`cat /proc/interrupts | grep 'eth0-TxRx-2' | awk -F \: '{printf $1}'| tr -d ' '`/smp_affinity echo 8 > /proc/irq/`cat /proc/interrupts | grep 'eth0-TxRx-3' | awk -F \: '{printf $1}'| tr -d ' '`/smp_affinity ifconfig eth1 up echo 8 > /proc/irq/`cat /proc/interrupts | grep 'eth1-TxRx-0' | awk -F \: '{printf $1}'| tr -d ' '`/smp_affinity echo 4 > /proc/irq/`cat /proc/interrupts | grep 'eth1-TxRx-1' | awk -F \: '{printf $1}'| tr -d ' '`/smp_affinity echo 2 > /proc/irq/`cat /proc/interrupts | grep 'eth1-TxRx-2' | awk -F \: '{printf $1}'| tr -d ' '`/smp_affinity echo 1 > /proc/irq/`cat /proc/interrupts | grep 'eth1-TxRx-3' | awk -F \: '{printf $1}'| tr -d ' '`/smp_affinity ifconfig eth2 up echo 1 > /proc/irq/`cat /proc/interrupts | grep 'eth2-TxRx-0' | awk -F \: '{printf $1}'| tr -d ' '`/smp_affinity echo 2 > /proc/irq/`cat /proc/interrupts | grep 'eth2-TxRx-1' | awk -F \: '{printf $1}'| tr -d ' '`/smp_affinity echo 4 > /proc/irq/`cat /proc/interrupts | grep 'eth2-TxRx-2' | awk -F \: '{printf $1}'| tr -d ' '`/smp_affinity echo 8 > /proc/irq/`cat /proc/interrupts | grep 'eth2-TxRx-3' | awk -F \: '{printf $1}'| tr -d ' '`/smp_affinity ifconfig eth3 up echo 8 > /proc/irq/`cat /proc/interrupts | grep 'eth3-TxRx-0' | awk -F \: '{printf $1}'| tr -d ' '`/smp_affinity echo 4 > /proc/irq/`cat /proc/interrupts | grep 'eth3-TxRx-1' | awk -F \: '{printf $1}'| tr -d ' '`/smp_affinity echo 2 > /proc/irq/`cat /proc/interrupts | grep 'eth3-TxRx-2' | awk -F \: '{printf $1}'| tr -d ' '`/smp_affinity echo 1 > /proc/irq/`cat /proc/interrupts | grep 'eth3-TxRx-3' | awk -F \: '{printf $1}'| tr -d ' '`/smp_affinity echo 'Установка дополнительных параметров сетевых интерфейсов' ethtool -G eth0 rx 2048 ethtool -G eth0 tx 2048 ethtool -G eth1 rx 2048 ethtool -G eth1 tx 2048 ethtool -G eth2 rx 2048 ethtool -G eth2 tx 2048 ethtool -G eth3 rx 2048 ethtool -G eth3 tx 2048 ethtool -A eth0 autoneg off rx off tx off ethtool -A eth1 autoneg off rx off tx off ethtool -A eth2 autoneg off rx off tx off ethtool -A eth3 autoneg off rx off tx off ifconfig eth0 txqueuelen 10000 ifconfig eth1 txqueuelen 10000 ifconfig eth2 txqueuelen 10000 ifconfig eth3 txqueuelen 10000 Параметры sysctl: #Увеличиваем максимальный размер памяти отводимой для TCP буферов net.core.wmem_max = 16777216 net.core.rmem_max = 16777216 #Тюнинг буферов для TCP и UDP соединений (min, default, max bytes) net.ipv4.tcp_rmem = 8192 8388608 16777216 net.ipv4.tcp_wmem = 8192 4194394 16777216 #Запрещаем кеширование статуса ssthresh net.ipv4.tcp_no_metrics_save = 1 #размер backlog net.core.netdev_max_backlog = 1000 #Увеличиваем число входящих соединений, которые могут стоять в очереди, прежде чем будут отброшены net.core.somaxconn = 262144 #Размер буферов по умолчанию для приема и отправки данных через сокеты net.core.wmem_default = 4194394 net.core.rmem_default = 8388608 net.ipv4.tcp_max_tw_buckets = 1440000 Сервак прогоняет около 1.5ГБ трафика. Сегодня столкнулись со странной проблемой: сервак начал тупить (при этом процессор и память в норме), и периодически перестал пропускать через себя трафик. Пустил трафик в обход бриджа, но тормоза остались. При этом также тупил SSH-доступ и JAVA-консоль через KVM При этом в логах есть такое: Jan 20 20:04:09 linbridge2 kernel: [ 1141.059747] CE: hpet2 increasing min_delta_ns to 33750 nsec Jan 20 20:11:06 linbridge2 kernel: [ 1557.132790] tail D ffff880203a90de0 0 13883 13851 0x00000004 Jan 20 20:11:06 linbridge2 kernel: [ 1557.132793] ffff880008e75840 0000000000000046 0000000000000000 0000000000000002 Jan 20 20:11:06 linbridge2 kernel: [ 1557.132795] 0000000000000000 0000000000000000 ffff880203a90de0 ffff88021f076f00 Jan 20 20:11:06 linbridge2 kernel: [ 1557.132819] 0000000100113f47 0000000000015840 0000000000015840 000000000000fa10 Jan 20 20:11:06 linbridge2 kernel: [ 1557.132821] Call Trace: Jan 20 20:11:06 linbridge2 kernel: [ 1557.132827] [<ffffffff812f4cc5>] ? schedule_timeout+0x2d/0xd7 Jan 20 20:11:06 linbridge2 kernel: [ 1557.132829] [<ffffffff812f4b48>] ? wait_for_common+0xd1/0x14e Jan 20 20:11:06 linbridge2 kernel: [ 1557.132832] [<ffffffff8103e83f>] ? default_wake_function+0x0/0xe Jan 20 20:11:06 linbridge2 kernel: [ 1557.132835] [<ffffffff810901bc>] ? synchronize_sched+0x0/0x52 Jan 20 20:11:06 linbridge2 kernel: [ 1557.132836] [<ffffffff81090208>] ? synchronize_sched+0x4c/0x52 Jan 20 20:11:06 linbridge2 kernel: [ 1557.132839] [<ffffffff8105aa60>] ? wakeme_after_rcu+0x0/0x10 Jan 20 20:11:06 linbridge2 kernel: [ 1557.132842] [<ffffffff8106050e>] ? __synchronize_srcu+0x2d/0xaa Jan 20 20:11:06 linbridge2 kernel: [ 1557.132845] [<ffffffff8110fd14>] ? fsnotify_put_group+0x6a/0x8d Jan 20 20:11:06 linbridge2 kernel: [ 1557.132846] [<ffffffff81111999>] ? inotify_release+0x24/0x2f Jan 20 20:11:06 linbridge2 kernel: [ 1557.132849] [<ffffffff810e94b1>] ? __fput+0x100/0x1b4 Jan 20 20:11:06 linbridge2 kernel: [ 1557.132851] [<ffffffff810e68ad>] ? filp_close+0x5f/0x6a Jan 20 20:11:06 linbridge2 kernel: [ 1557.132853] [<ffffffff81045b02>] ? put_files_struct+0x67/0xbf Jan 20 20:11:06 linbridge2 kernel: [ 1557.132854] [<ffffffff810473b6>] ? do_exit+0x24a/0x6f4 Jan 20 20:11:06 linbridge2 kernel: [ 1557.132857] [<ffffffff810075c8>] ? __switch_to+0x12f/0x21b Jan 20 20:11:06 linbridge2 kernel: [ 1557.132858] [<ffffffff810478d3>] ? do_group_exit+0x73/0x9b Jan 20 20:11:06 linbridge2 kernel: [ 1557.132860] [<ffffffff810551b7>] ? get_signal_to_deliver+0x353/0x375 Jan 20 20:11:06 linbridge2 kernel: [ 1557.132862] [<ffffffff81007f4b>] ? do_signal+0x6c/0x68b Jan 20 20:11:06 linbridge2 kernel: [ 1557.132863] [<ffffffff81112362>] ? inotify_read+0x26d/0x297 Jan 20 20:11:06 linbridge2 kernel: [ 1557.132865] [<ffffffff8105ca39>] ? autoremove_wake_function+0x0/0x2a Jan 20 20:11:06 linbridge2 kernel: [ 1557.132867] [<ffffffff8100858f>] ? do_notify_resume+0x25/0x67 Jan 20 20:11:06 linbridge2 kernel: [ 1557.132868] [<ffffffff810e89bc>] ? sys_read+0x5f/0x6b Jan 20 20:11:06 linbridge2 kernel: [ 1557.132870] [<ffffffff81008cce>] ? int_signal+0x12/0x17 Jan 20 20:17:59 linbridge2 kernel: [ 1969.431662] CE: hpet5 increasing min_delta_ns to 33750 nsec С чем может быть связано такое поведение? Есть аналогичный сервак (но на core-i7), который обрабатывает чуть больше трафика, с ним таких проблем нет. Вставить ник Quote
G@riK Posted January 21, 2013 Author Posted January 21, 2013 Это может помочь от Jan 20 20:04:09 linbridge2 kernel: [ 1141.059747] CE: hpet2 increasing min_delta_ns to 33750 nsec Но в инете не нашёл информацию, чтобы эта "ошибка" приводила к таким симптомам. И остаётся еще куча других ошибок, которые пока не понятно как исправлять. Вставить ник Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.