utcon Posted February 24, 2011 Posted February 24, 2011 (edited) Добрый вечер. Имеем: 8.2-RC2 FreeBSD 8.2-RC2 #0 cat /boot/loader.conf geom_mirror_load=YES [root@gw-151-243 /etc]# cat sysctl.conf kern.ipc.somaxconn=65535 net.inet.ip.portrange.first=6192 net.inet.ip.portrange.hifirst=6192 net.inet.ip.maxfragsperpacket=44 kern.maxfiles=65536 kern.maxfilesperproc=32768 net.inet.tcp.delayed_ack=0 net.inet.ip.fw.one_pass=0 net.graph.maxdgram=256000 net.graph.recvspace=256000 net.inet.ip.fw.dyn_buckets=49152 net.inet.ip.fw.dyn_max=49152 ### net.inet.tcp.blackhole=2 net.inet.udp.blackhole=1 net.inet.icmp.icmplim=2000 net.inet.ip.forwarding=1 net.inet.ip.fastforwarding=1 dev.em.0.rx_int_delay=600 dev.em.1.rx_int_delay=600 dev.em.0.tx_int_delay=600 dev.em.1.tx_int_delay=600 dev.em.0.rx_abs_int_delay=1000 dev.em.1.rx_abs_int_delay=1000 dev.em.0.tx_abs_int_delay=1000 dev.em.1.tx_abs_int_delay=1000 dev.em.0.rx_processing_limit=3000 dev.em.1.rx_processing_limit=3000 net.inet.ip.intr_queue_maxlen=1000 kern.ipc.nmbclusters=262144 net.inet.ip.dummynet.hash_size=16384 net.inet.ip.dummynet.expire=0 net.isr.direct=0 em0@pci0:10:0:0: class=0x020000 card=0x135e8086 chip=0x105e8086 rev=0x06 hdr=0x00 vendor = 'Intel Corporation' device = 'HP NC360T PCIe DP Gigabit Server Adapter (n1e5132)' class = network subclass = ethernet em1@pci0:10:0:1: class=0x020000 card=0x135e8086 chip=0x105e8086 rev=0x06 hdr=0x00 vendor = 'Intel Corporation' device = 'HP NC360T PCIe DP Gigabit Server Adapter (n1e5132)' class = network subclass = ethernet Задачи которые на нем крутятся: Шейпер IPFW DUMMYNET клиенты разбросаны в таблицы и с помощью pipe tablearg загоняются в трубы NAT с помощью netgraph Опять таки таблицы и netgraph tablearg ipv4 from ..... Netflow статистика - тот же нетграф сбрасывает експорт. Ведется статистика пинга с самого сервера. При возростании нагрузки наблюдаю небольшие потери. Проблемы с каналом уже исключил. Нагрузка небольшая [root@gw-151-243 /etc/ipfw]# netstat -w1 -I em1 input (em1) output packets errs idrops bytes packets errs bytes colls 32922 0 0 34538921 27698 0 20385935 0 37058 0 0 39821583 30838 0 21882675 0 37036 0 0 38833974 31588 0 23593679 0 37104 0 0 39352120 31032 0 22333503 0 36235 0 0 38189419 30560 0 22402593 0 36483 0 0 39037205 30131 0 21606306 0 36420 0 0 37921393 31485 0 23956993 0 34324 0 0 33656154 32379 0 26870038 0 36538 0 0 38430446 31394 0 23343891 0 37556 0 0 40794607 29682 0 21966534 0 top -SPHI last pid: 81003; load averages: 1.51, 1.38, 1.29 up 2+13:59:18 22:52:10 98 processes: 6 running, 73 sleeping, 1 zombie, 18 waiting CPU 0: 0.0% user, 0.0% nice, 29.3% system, 12.8% interrupt, 57.9% idle CPU 1: 0.0% user, 0.0% nice, 23.7% system, 14.7% interrupt, 61.7% idle CPU 2: 0.0% user, 0.0% nice, 29.3% system, 4.5% interrupt, 66.2% idle CPU 3: 0.0% user, 0.0% nice, 26.7% system, 1.5% interrupt, 71.8% idle Mem: 22M Active, 282M Inact, 372M Wired, 176K Cache, 213M Buf, 1301M Free Swap: 5243M Total, 5243M Free PID USERNAME PRI NICE SIZE RES STATE C TIME WCPU COMMAND 11 root 171 ki31 0K 64K RUN 3 52.8H 71.58% {idle: cpu3} 11 root 171 ki31 0K 64K RUN 1 47.2H 69.58% {idle: cpu1} 11 root 171 ki31 0K 64K CPU2 2 51.9H 65.77% {idle: cpu2} 11 root 171 ki31 0K 64K CPU0 0 45.9H 63.09% {idle: cpu0} 12 root -44 - 0K 288K WAIT 0 431:00 32.18% {swi1: netisr 0} 13 root 76 - 0K 64K sleep 2 425:27 25.20% {ng_queue3} 13 root 76 - 0K 64K sleep 3 307:27 24.66% {ng_queue2} 13 root 61 - 0K 64K CPU1 0 414:07 20.26% {ng_queue1} 0 root -68 0 0K 144K - 2 430:12 19.78% {em0 taskq} 13 root 76 - 0K 64K sleep 3 405:49 10.99% {ng_queue0} 0 root -68 0 0K 144K - 3 304:45 5.57% {em1 taskq} 12 root -32 - 0K 288K WAIT 3 47:54 1.95% {swi4: clock} 0 root -68 0 0K 144K - 1 206:36 0.10% {dummynet} Что может провоцировать потери при пинге с сервера ? Куда копать ? думминет цпусетом поприбивал к ядрам. Паараметры сетевой после загрузки из sysctl.conf переприменил. Статистика потерь во вложении. Edited February 24, 2011 by utcon Вставить ник Quote
st_re Posted February 26, 2011 Posted February 26, 2011 а в net.inet.icmp.icmplim часом не упираетесь ? hw.em.rxd и hw.em.txd поднять ? /sbin/sysctl dev.em.0.debug=1 /sbin/sysctl dev.em.1.debug=1 Там что (смотреть в /var/log/messages) ? Вставить ник Quote
Dyr Posted February 26, 2011 Posted February 26, 2011 (edited) net.inet.icmp.icmplim оказывает влияние только на ICMP-ответы удалённому requester'у: int badport_bandlim(int which) { #define N(a) (sizeof (a) / sizeof (a[0])) static struct rate { const char *type; struct timeval lasttime; int curpps; } rates[BANDLIM_MAX+1] = { { "icmp unreach response" }, { "icmp ping response" }, { "icmp tstamp response" }, { "closed port RST response" }, { "open port RST response" }, { "icmp6 unreach response" } }; /* * Return ok status if feature disabled or argument out of range. */ if (V_icmplim > 0 && (u_int) which < N(rates)) { struct rate *r = &rates[which]; int opps = r->curpps; if (!ppsratecheck(&r->lasttime, &r->curpps, V_icmplim)) return -1; /* discard packet */ /* * If we've dropped below the threshold after having * rate-limited traffic print the message. This preserves * the previous behaviour at the expense of added complexity. */ if (V_icmplim_output && opps > V_icmplim) log(LOG_NOTICE, "Limiting %s from %d to %d packets/sec\n", r->type, opps, V_icmplim); } return 0; /* okay to send packet */ #undef N } Edited February 26, 2011 by Dyr Вставить ник Quote
utcon Posted February 28, 2011 Author Posted February 28, 2011 Копался кропался и смутил меня вывод команды vmstat -z NetGraph items: 72, 4118, 0, 203, 531, 0 NetGraph data items: 72, 522, 6, 516, 7926717054, 37233172 Добавил в /boot/loader.conf hw.em.rxd=4096 hw.em.txd=4096 kern.ipc.nmbclusters="524288" kern.ipc.maxsockets="524288" net.graph.maxalloc="65536" net.graph.maxdata="4096" Буду смотреть дальше. Но у меня есть предчуствие, что основная проблема в том, что и НАТ и шепинг и netflow export находяться на одном и том же сервере. Может кто нибуть посоветует, как грамотно разносить эти вещи, что бы выжать передачу данных близкую к гигабиту в дублексе и без потерь ? Может ng_nat + ipfw pipes + ng_netflow - на одном сервере плохая идея ? Или сама связка - плохая идея ? Или прокладка плохая ..... Вставить ник 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.