Jump to content
Калькуляторы

Проблемы с роутингом на FreeBSD 7.2

Господа, подскажите куда еще можно капнуть, а то уже многое перепробовал, ничего не выходит.

Проблема в следующем, решили поставить в качестве бордер-роутера сервер с Quagga.

Настроили bgp, routing все нормально, пинг проходит без задержек, без проблем. На сам сервер трафик любой проходит нормально,

А вот через сервер udp трафик проходит нормально, а TCP тупит безбожно, http грузит крайне медленно, и профиль трафика какой-то "заборчатый".

uname -a
FreeBSD  7.2-RELEASE FreeBSD 7.2-RELEASE #3

 

на сервере:

CPU: Intel(R) Core(TM)2 Quad CPU    Q8400  @ 2.66GHz (2660.01-MHz 686-class CPU)
real memory  = 3488022528 (3326 MB)
igb0: <Intel(R) PRO/1000 Network Connection version - 1.4.1> port 0x2000-0x201f mem 0xd8200000-0xd821ffff,0xd8400000-0xd87fffff,0xd8240000-0xd8243fff irq 16 at device 0.0 on pci3                                                                                                              
igb0: Using MSIX interrupts with 3 vectors                                                                                                      
igb0: [ITHREAD]                                                                                                                                 
igb0: [ITHREAD]                                                                                                                                 
igb0: [ITHREAD]                                                                                                                                 
igb0: Ethernet address: 00:1b:21:4d:e1:74                                                                                                       
igb1: <Intel(R) PRO/1000 Network Connection version - 1.4.1> port 0x2020-0x203f mem 0xd8220000-0xd823ffff,0xd8800000-0xd8bfffff,0xd8244000-0xd8247fff irq 17 at device 0.1 on pci3                                                                                                              
igb1: Using MSIX interrupts with 3 vectors                                                                                                      
igb1: [ITHREAD]                                                                                                                                 
igb1: [ITHREAD]                                                                                                                                 
igb1: [ITHREAD]                                                                                                                                 
igb1: Ethernet address: 00:1b:21:4d:e1:75 
em0: <Intel(R) PRO/1000 Network Connection 6.9.6.Yandex[$Revision: 1.36.2.17 $]> port 0x3000-0x301f mem 0xd8c00000-0xd8c1ffff irq 16 at device 0.0 on pci13                                                                                                                                     
em0: Using MSI interrupt                                                                                                                        
em0: Using TXD_LOW instead of TXDW                                                                                                              
em0: [FILTER]                                                                                                                                   
em0: Ethernet address: 00:30:48:d5:4b:8e

em1: <Intel(R) PRO/1000 Network Connection 6.9.6.Yandex[$Revision: 1.36.2.17 $]> port 0x4000-0x401f mem 0xd8e00000-0xd8e1ffff irq 17 at device 0.0 on pci15                                                                                                                                     
em1: Using MSI interrupt                                                                                                                        
em1: Using TXD_LOW instead of TXDW                                                                                                              
em1: [FILTER]                                                                                                                                   
em1: Ethernet address: 00:30:48:d5:4b:8f

cat /boot/loader.conf
if_vlan_load="YES"

hw.em.rxd=4096
hw.em.txd=4096

hw.igb.rxd=2048
hw.igb.txd=2048
hw.igb.enable_aim=1
hw.igb.low_latency=1000
hw.igb.ave_latency=2000
hw.igb.bulk_latency=4000

hw.igb.rx_process_limit=400
hw.igb.fc_setting=0
hw.igb.lro=0

sysctl
net.inet.ip.forwarding: 1               
net.inet.ip.redirect: 0                 
net.inet.ip.ttl: 128   
kern.ipc.maxsockbuf: 262144
kern.ipc.sockbuf_waste_factor: 8
kern.ipc.somaxconn: 4096        
kern.ipc.max_linkhdr: 16        
kern.ipc.max_protohdr: 40       
kern.ipc.max_hdr: 56            
kern.ipc.max_datalen: 148       
kern.ipc.nmbjumbo16: 4224       
kern.ipc.nmbjumbo9: 8448        
kern.ipc.nmbjumbop: 16896       
kern.ipc.nmbclusters: 33792     
kern.ipc.piperesizeallowed: 1   
kern.ipc.piperesizefail: 0      
kern.ipc.pipeallocfail: 0       
kern.ipc.pipefragretry: 0       
kern.ipc.pipekva: 65536         
kern.ipc.maxpipekva: 16777216   
kern.ipc.msgseg: 2048           
kern.ipc.msgssz: 8              
kern.ipc.msgtql: 40             
kern.ipc.msgmnb: 2048           
kern.ipc.msgmni: 40             
kern.ipc.msgmax: 16384          
kern.ipc.semaem: 16384          
kern.ipc.semvmx: 32767          
kern.ipc.semusz: 136            
kern.ipc.semume: 10             
kern.ipc.semopm: 100            
kern.ipc.semmsl: 60             
kern.ipc.semmnu: 30             
kern.ipc.semmns: 60             
kern.ipc.semmni: 10             
kern.ipc.semmap: 30             
kern.ipc.shm_allow_removed: 0   
kern.ipc.shm_use_phys: 0        
kern.ipc.shmall: 8192           
kern.ipc.shmseg: 128            
kern.ipc.shmmni: 192            
kern.ipc.shmmin: 1              
kern.ipc.shmmax: 33554432       
kern.ipc.maxsockets: 204800     
kern.ipc.numopensockets: 35     
kern.ipc.nsfbufsused: 0         
kern.ipc.nsfbufspeak: 4         
kern.ipc.nsfbufs: 8704
net.inet.tcp.rfc1323: 1
net.inet.tcp.mssdflt: 512
net.inet.tcp.keepidle: 7200000
net.inet.tcp.keepintvl: 75000 
net.inet.tcp.sendspace: 65536 
net.inet.tcp.recvspace: 65536 
net.inet.tcp.keepinit: 75000  
net.inet.tcp.delacktime: 100  
net.inet.tcp.hostcache.purge: 0
net.inet.tcp.hostcache.prune: 300
net.inet.tcp.hostcache.expire: 3600
net.inet.tcp.hostcache.count: 1    
net.inet.tcp.hostcache.bucketlimit: 30
net.inet.tcp.hostcache.hashsize: 512  
net.inet.tcp.hostcache.cachelimit: 15360
net.inet.tcp.recvbuf_max: 262144        
net.inet.tcp.recvbuf_inc: 16384         
net.inet.tcp.recvbuf_auto: 1            
net.inet.tcp.insecure_rst: 0            
net.inet.tcp.rfc3390: 1                 
net.inet.tcp.rfc3042: 1                 
net.inet.tcp.drop_synfin: 0             
net.inet.tcp.delayed_ack: 1             
net.inet.tcp.blackhole: 2               
net.inet.tcp.log_in_vain: 0             
net.inet.tcp.sendbuf_max: 262144        
net.inet.tcp.sendbuf_inc: 8192          
net.inet.tcp.sendbuf_auto: 1            
net.inet.tcp.tso: 1                     
net.inet.tcp.newreno: 1                 
net.inet.tcp.local_slowstart_flightsize: 4
net.inet.tcp.slowstart_flightsize: 1      
net.inet.tcp.path_mtu_discovery: 1        
net.inet.tcp.reass.overflows: 0           
net.inet.tcp.reass.maxqlen: 48            
net.inet.tcp.reass.cursegments: 0         
net.inet.tcp.reass.maxsegments: 2112      
net.inet.tcp.sack.globalholes: 0          
net.inet.tcp.sack.globalmaxholes: 65536   
net.inet.tcp.sack.maxholes: 128           
net.inet.tcp.sack.enable: 1               
net.inet.tcp.inflight.stab: 20            
net.inet.tcp.inflight.max: 1073725440
net.inet.tcp.inflight.min: 6144
net.inet.tcp.inflight.rttthresh: 10
net.inet.tcp.inflight.debug: 0
net.inet.tcp.inflight.enable: 1
net.inet.tcp.isn_reseed_interval: 0
net.inet.tcp.icmp_may_rst: 1
net.inet.tcp.pcbcount: 20
net.inet.tcp.do_tcpdrain: 1
net.inet.tcp.tcbhashsize: 512
net.inet.tcp.log_debug: 0
net.inet.tcp.minmss: 216
net.inet.tcp.syncache.rst_on_sock_fail: 1
net.inet.tcp.syncache.rexmtlimit: 3
net.inet.tcp.syncache.hashsize: 512
net.inet.tcp.syncache.count: 0
net.inet.tcp.syncache.cachelimit: 15360
net.inet.tcp.syncache.bucketlimit: 30
net.inet.tcp.syncookies_only: 0
net.inet.tcp.syncookies: 1
net.inet.tcp.timer_race: 0
net.inet.tcp.finwait2_timeout: 60000
net.inet.tcp.fast_finwait2_recycle: 0
net.inet.tcp.always_keepalive: 1
net.inet.tcp.rexmit_slop: 200
net.inet.tcp.rexmit_min: 30
net.inet.tcp.msl: 7500
net.inet.tcp.nolocaltimewait: 0
net.inet.tcp.maxtcptw: 8191

 

Играния с параметрами sysctl результатов не дают.

При этом netstat -w1 -h никаких ошибок не дают, процессор не нагружен,

Проходит поток под 30 kpps, внешне выглядит все нормально, НО http и многое другое тупит...

 

Есть какие-нибудь идеи?

Share this post


Link to post
Share on other sites

Если кому будет необходимо, проблема была в данном параметре - hw.igb.lro=0

Есго надо было перенести в sysctl.conf (sysctl -w hw.igb.0.enable_lgo = 0)

Share this post


Link to post
Share on other sites
Если кому будет необходимо, проблема была в данном параметре - hw.igb.lro=0

Есго надо было перенести в sysctl.conf (sysctl -w hw.igb.0.enable_lgo = 0)

у меня аналогичная ситуация, но только сетевые re:

 

re0@pci0:2:0:0: class=0x020000 card=0x84321043 chip=0x816810ec rev=0x06 hdr=0x00
    vendor     = 'Realtek Semiconductor'
    device     = 'Gigabit Ethernet NIC(NDIS 6.0) (RTL8168/8111/8111c)'
    class      = network
    subclass   = ethernet
re1@pci0:3:5:0: class=0x020000 card=0x43001186 chip=0x43001186 rev=0x10 hdr=0x00
    vendor     = 'D-Link System Inc'
    device     = 'Used on DGE-528T Gigabit adaptor (dlg10086)'
    class      = network
    subclass   = ethernet
re2@pci0:3:6:0: class=0x020000 card=0x43001186 chip=0x43001186 rev=0x10 hdr=0x00
    vendor     = 'D-Link System Inc'
    device     = 'Used on DGE-528T Gigabit adaptor (dlg10086)'
    class      = network
    subclass   = ethernet

 

 

у клиента (тоже FreeBSD)

# netstat -s -p tcp

tcp:
        153959 packets sent
                149366 data packets (14542621 bytes)
                271 data packets (173516 bytes) retransmitted
                118 data packets unnecessarily retransmitted
                1 resend initiated by MTU discovery
                3538 ack-only packets (1962 delayed)
                0 URG only packets
                0 window probe packets
                155 window update packets
                629 control packets
        100019 packets received
                86756 acks (for 14536614 bytes)
                337 duplicate acks
                0 acks for unsent data
                11692 packets (3274168 bytes) received in-sequence
                7 completely duplicate packets (778 bytes)
                0 old duplicate packets
                0 packets with some dup. data (0 bytes duped)
                25 out-of-order packets (19338 bytes)
                0 packets (0 bytes) of data after window
                0 window probes
                207 window update packets
                19 packets received after close
                [b]5095 discarded for bad checksums[/b]
                0 discarded for bad header offset fields
                0 discarded because packet too short
                0 discarded due to memory problems
        204 connection requests
        300 connection accepts
        0 bad connection attempts
        0 listen queue overflows
        9 ignored RSTs in the windows
        438 connections established (including accepts)
        580 connections closed (including 30 drops)
                259 connections updated cached RTT on close
                260 connections updated cached RTT variance on close
                57 connections updated cached ssthresh on close
        58 embryonic connections dropped
        67976 segments updated rtt (of 66051 attempts)
        296 retransmit timeouts
                0 connections dropped by rexmit timeout
        0 persist timeouts
                0 connections dropped by persist timeout
        0 Connections (fin_wait_2) dropped because of timeout
        7 keepalive timeouts
                2 keepalive probes sent
                5 connections dropped by keepalive
        385 correct ACK header predictions
        6213 correct data packet header predictions
        332 syncache entries added
                27 retransmitted
                11 dupsyn
                0 dropped
                300 completed
                0 bucket overflow
                0 cache overflow
                26 reset
                6 stale
                0 aborted
                0 badack
                0 unreach
                0 zone failures
        332 cookies sent
        0 cookies received
        3 SACK recovery episodes
        5 segment rexmits in SACK recovery episodes
        5278 byte rexmits in SACK recovery episodes
        77 SACK options (SACK blocks) received
        39 SACK options (SACK blocks) sent
        0 SACK scoreboard overflow
        0 packets with ECN CE bit set
        0 packets with ECN ECT(0) bit set
        0 packets with ECN ECT(1) bit set
        0 successful ECN handshakes
        0 times ECN reduced the congestion window

Edited by vlad11

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this