[FUG-BR] Bge0 e FreeBSD.

Matheus Cucoloto matheuscucoloto em gmail.com
Quarta Janeiro 20 17:58:02 BRST 2010


Pessoal.

Tenho um FreeBSD com media de 80mil pacotes por segundos.

matheus em roteador-borda# netstat -w 1
            input        (Total)           output
   packets  errs      bytes    packets  errs      bytes colls
     77714     0   40611953      77794     0   34537249     0
     78553     0   39770290      78600     0   34404408     0
     77330     0   38124920      77369     0   32487332     0
     81865     0   40502838      81955     0   34069136     0

Trafegando no servidor com duas interfaces de rede, 160 de entrada e 130 de
saida.

matheus em roteador-borda# ifstat -iTb bge0,bge1
       bge0                bge1               Total
 Kbps in  Kbps out   Kbps in  Kbps out   Kbps in  Kbps out
77631.06  105233.8  60638.96  26120.90  138270.0  131354.7
80307.22  105118.0  80196.02  29655.96  160503.2  134774.0
54149.72  72569.36  71107.72  23389.59  125257.4  95958.95
62145.55  83482.63  88952.66  26565.39  151098.2  110048.0
64883.49  88753.50  89008.31  27317.84  153891.8  116071.3
57048.34  75267.31  67671.10  23243.26  124719.4  98510.57
65364.99  88276.10  71921.23  27125.56  137286.2  115401.7
68955.67  94165.80  80414.14  28811.04  149369.8  122976.8

Meu top da a seguinte informação:

last pid:  3827;  load averages:  0.65,  0.22,  0.17
                                                       up 200+10:19:17
16:55:51
121 processes: 5 running, 99 sleeping, 17 waiting
CPU:  0.0% user,  0.0% nice,  2.2% system, 14.8% interrupt, 83.0% idle
Mem: 803M Active, 2112M Inact, 612M Wired, 69M Cache, 399M Buf, 352M Free
Swap: 2048M Total, 2048M Free

  PID USERNAME  THR PRI NICE   SIZE    RES STATE   C   TIME    CPU COMMAND
   12 root        1 171 ki31     0K    16K CPU2    2 4748.6 98.10% idle:
cpu2
   11 root        1 171 ki31     0K    16K RUN     3 4749.1 97.56% idle:
cpu3
   13 root        1 171 ki31     0K    16K CPU1    1 4744.9 84.52% idle:
cpu1
   14 root        1 171 ki31     0K    16K CPU0    0 3555.8 68.16% idle:
cpu0
   29 root        1 -68    -     0K    16K WAIT    0 1232.4 33.25% irq256:
bge0

Meu Vmstat e o limits dão a seguinte informação:

matheus em roteador-borda# vmstat -s
2090964975 cpu context switches
741917513 device interrupts
487968930 software interrupts
892908039 traps
1050964447 system calls
       56 kernel threads created
  5942920  fork() calls
  1052415 vfork() calls
        0 rfork() calls
        0 swap pager pageins
        0 swap pager pages paged in
        0 swap pager pageouts
        0 swap pager pages paged out
     8706 vnode pager pageins
    30026 vnode pager pages paged in
        0 vnode pager pageouts
        0 vnode pager pages paged out
       59 page daemon wakeups
  1510158 pages examined by the page daemon
     6505 pages reactivated
263568394 copy-on-write faults
    61568 copy-on-write optimized faults
377416614 zero fill pages zeroed
     3054 zero fill pages prezeroed
   117104 intransit blocking page faults
909983493 total VM faults taken
        0 pages affected by kernel thread creation
1614176621 pages affected by  fork()
284502348 pages affected by vfork()
        0 pages affected by rfork()
  1481846 pages cached
802316449 pages freed
        0 pages freed by daemon
487828989 pages freed by exiting processes
   205368 pages active
   540569 pages inactive
    17727 pages in VM cache
   156791 pages wired down
    90269 pages free
     4096 bytes per page
622521191 total name lookups
          cache hits (81% pos + 7% neg) system 1% per-directory
          deletions 0%, falsehits 0%, toolong 0%

matheus em roteador-borda# limits
Resource limits (current):
  cputime          infinity secs
  filesize         infinity kB
  datasize         33554432 kB
  stacksize          524288 kB
  coredumpsize     infinity kB
  memoryuse        infinity kB
  memorylocked     infinity kB
  maxprocesses         5547
  openfiles           32768
  sbsize           infinity bytes
  vmemoryuse       infinity kB

matheus em roteador-borda# netstat -m
631/3344/3975 mbufs in use (current/cache/total)
630/2550/3180/85556 mbuf clusters in use (current/cache/total/max)
629/1547 mbuf+clusters out of packet secondary zone in use (current/cache)
0/0/0/12800 4k (page size) jumbo clusters in use (current/cache/total/max)
0/0/0/6400 9k jumbo clusters in use (current/cache/total/max)
0/0/0/3200 16k jumbo clusters in use (current/cache/total/max)
1425K/5936K/7361K bytes allocated to network (current/cache/total)
0/0/0 requests for mbufs denied (mbufs/clusters/mbuf+clusters)
0/0/0 requests for jumbo clusters denied (4k/9k/16k)
0/0/0 sfbufs in use (current/peak/max)
0 requests for sfbufs denied
0 requests for sfbufs delayed
0 requests for I/O initiated by sendfile
0 calls to protocol drain routines

Já fiz dezenas de alterações de buffers,sockets,sendspace e afins

Porém
Nesta situação estou tendo problemas com perdas de pacote, no netstat mostra
erro nos pacotes de entrada.

           input        (Total)           output
   packets  errs      bytes    packets  errs      bytes colls
     79271     0   40815530      79432     0   32898606     0
     62806  2855   25740320      62767     0   25511696     0
     74184     0   32057472      74122     0   31920564     0
     75952     0   34464844      75779     0   34329614     0
     64278  2629   28927986      64233     0   27086522     0
     79004    86   39730322      79066     0   31180000     0
     76016     0   36502590      76034     0   32285930     0


Não posso nem pensar em habilitar o polling que a coisa fica feia.


A Interface é bge, já forcei para ser full duplex no switch e no servidor
mas não tive resultados bons.

Estou com perda de pacotes.

Não tem firewall, apenas roteamento!

Se alguem trabalha nestas condições ou tem alguma diga, por favor ajude-me.


Abraços.

-- 
-----------------------------------------------
Matheus Cucoloto
Unix Expertise
Voip Expertise


Mais detalhes sobre a lista de discussão freebsd