Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 May 2012 14:58:06 +0200
From:      Johann Hugo <jhugo@meraka.csir.co.za>
To:        Adrian Chadd <adrian@freebsd.org>
Cc:        freebsd-wireless@freebsd.org
Subject:   Re: [ath] Degraded throughput - adhoc mode
Message-ID:  <201205211458.06399.jhugo@meraka.csir.co.za>
In-Reply-To: <CAJ-VmonkOozTeC2sGwx5DP76fsxk-SOwe0RuFeNXr2jfw5zZ6g@mail.gmail.com>
References:  <201205181133.57403.jhugo@meraka.csir.co.za> <CAJ-VmonkOozTeC2sGwx5DP76fsxk-SOwe0RuFeNXr2jfw5zZ6g@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Friday 18 May 2012 19:23:51 Adrian Chadd wrote:
> Hi,
> 
> Please check the output of the sample rate module - sysctl
> dev.ath.X.sample_stats=1, then check dmesg.

elardus:~ # sysctl dev.ath.2.sample_stats=1                                                                                                                                                                                       
dev.ath.2.sample_stats: 0 -> 0                                                                                                                                                                                                    
elardus:~ # dmesg                                                                                                                                                                                                                 
                                                                                                                                                                                                                                  
[00:21:a4:32:06:32] refcnt 4 static_rix 0 ratemask 0x0                                                                                                                                                                            
[ 250] cur rix 0 (1 Mb ) since switch: packets 0 ticks 0                                                                                                                                                                          
[ 250] last sample 0 cur sample 0 packets sent 0                                                                                                                                                                                  
[ 250] packets since sample 0 sample tt 0                                                                                                                                                                                         
[1600] cur rix 0 (1 Mb ) since switch: packets 0 ticks 0                                                                                                                                                                          
[1600] last sample 0 cur sample 0 packets sent 0                                                                                                                                                                                  
[1600] packets since sample 0 sample tt 0                                                                                                                                                                                         
                                                                                                                                                                                                                                  
[00:21:a4:32:06:3c] refcnt 3 static_rix -1 ratemask 0xfcf                                                                                                                                                                         
[ 250] cur rix 7 (18 Mb ) since switch: packets 1 ticks 25922949                                                                                                                                                                  
[ 250] last sample 9 cur sample -1 packets sent 674099                                                                                                                                                                            
[ 250] packets since sample 6 sample tt 464                                                                                                                                                                                       
[1600] cur rix 9 (36 Mb ) since switch: packets 1 ticks 25919954                                                                                                                                                                  
[1600] last sample 10 cur sample -1 packets sent 11017718                                                                                                                                                                         
[1600] packets since sample 4 sample tt 672                                                                                                                                                                                       
[ 1 Mb : 250]       31:20       ( 64%) T       57 F    0 avg  4938 last 
6625934                                                                                                                                                   
[ 1 Mb :1600]      123:98       ( 79%) T      198 F    0 avg 16723 last 203098                                                                                                                                                    
[ 2 Mb : 250]        2:2        (100%) T        2 F    0 avg  2064 last 
8563311                                                                                                                                                   
[ 2 Mb :1600]        1:1        (100%) T        2 F    0 avg 15538 last 
17316442                                                                                                                                                  
[ 5 Mb : 250]       59:58       ( 98%) T       96 F    0 avg  4528 last 
4722129                                                                                                                                                   
[ 5 Mb :1600]       21:20       ( 95%) T       38 F    1 avg  6506 last 
8563314                                                                                                                                                   
[11 Mb : 250]       81:78       ( 96%) T      179 F    0 avg  4128 last 93962                                                                                                                                                     
[11 Mb :1600]      355:341      ( 96%) T      547 F    0 avg  4633 last 82599                                                                                                                                                     
[12 Mb : 250]    16399:16353    ( 99%) T    18240 F    0 avg  1359 last 82047                                                                                                                                                     
[12 Mb :1600]    10027:9892     ( 98%) T    13312 F    0 avg  1513 last 19942                                                                                                                                                     
[18 Mb : 250]    51489:51386    ( 99%) T    56048 F    0 avg   578 last 1906                                                                                                                                                      
[18 Mb :1600]    57151:56687    ( 99%) T    69074 F    0 avg  1605 last 19904                                                                                                                                                     
[24 Mb : 250]   103198:103008   ( 99%) T   110475 F    0 avg   947 last 4447                                                                                                                                                      
[24 Mb :1600]   254328:252988   ( 99%) T   298502 F    0 avg   988 last 18101                                                                                                                                                     
[36 Mb : 250]   163897:163690   ( 99%) T   171966 F    0 avg   877 last 3967                                                                                                                                                      
[36 Mb :1600]  1429440:1426539  ( 99%) T  1536544 F    0 avg   942 last 4910                                                                                                                                                      
[48 Mb : 250]   195032:194854   ( 99%) T   204404 F    1 avg  1844 last 82317                                                                                                                                                     
[48 Mb :1600]  5528565:5524701  ( 99%) T  5986172 F    0 avg  1194 last 16940                                                                                                                                                     
[54 Mb : 250]   145001:144812   ( 99%) T   152999 F    2 avg  1614 last 203418                                                                                                                                                    
[54 Mb :1600]  3751938:3747594  ( 99%) T  4223608 F    6 avg  3436 last 203110  

> 
> Which NICs are you using?
dev.ath.2.%desc: Atheros 5413


sysctl with big counters:

dev.ath.2.stats.rx_phy_err.31: 82410
dev.ath.2.stats.ast_rx_crcerr: 812069
dev.ath.2.stats.ast_rx_phyerr: 82480
dev.ath.2.stats.ast_tx_shortpre: 11694060
dev.ath.2.stats.ast_tx_qstop: 1514731
dev.ath.2.stats.ast_tx_longretry: 1151533
dev.ath.2.stats.ast_tx_raw: 15228



Another interesting thing is a rhythmic pattern for ping delays 
(ifconfig down/up fixes it)

16 bytes from fd9c:6829:597c:20:221:a4ff:fe32:63c, icmp_seq=180 hlim=64 
time=2.963 ms
16 bytes from fd9c:6829:597c:20:221:a4ff:fe32:63c, icmp_seq=181 hlim=64 
time=14.267 ms
16 bytes from fd9c:6829:597c:20:221:a4ff:fe32:63c, icmp_seq=182 hlim=64 
time=26.009 ms
16 bytes from fd9c:6829:597c:20:221:a4ff:fe32:63c, icmp_seq=183 hlim=64 
time=49.559 ms
16 bytes from fd9c:6829:597c:20:221:a4ff:fe32:63c, icmp_seq=184 hlim=64 
time=1.763 ms
16 bytes from fd9c:6829:597c:20:221:a4ff:fe32:63c, icmp_seq=185 hlim=64 
time=3.170 ms
16 bytes from fd9c:6829:597c:20:221:a4ff:fe32:63c, icmp_seq=186 hlim=64 
time=81.034 ms
16 bytes from fd9c:6829:597c:20:221:a4ff:fe32:63c, icmp_seq=187 hlim=64 
time=42.084 ms
16 bytes from fd9c:6829:597c:20:221:a4ff:fe32:63c, icmp_seq=188 hlim=64 
time=65.945 ms
16 bytes from fd9c:6829:597c:20:221:a4ff:fe32:63c, icmp_seq=189 hlim=64 
time=1.710 ms
16 bytes from fd9c:6829:597c:20:221:a4ff:fe32:63c, icmp_seq=190 hlim=64 
time=10.702 ms
16 bytes from fd9c:6829:597c:20:221:a4ff:fe32:63c, icmp_seq=191 hlim=64 
time=35.973 ms
16 bytes from fd9c:6829:597c:20:221:a4ff:fe32:63c, icmp_seq=192 hlim=64 
time=59.943 ms
16 bytes from fd9c:6829:597c:20:221:a4ff:fe32:63c, icmp_seq=193 hlim=64 
time=82.535 ms
16 bytes from fd9c:6829:597c:20:221:a4ff:fe32:63c, icmp_seq=194 hlim=64 
time=3.309 ms
16 bytes from fd9c:6829:597c:20:221:a4ff:fe32:63c, icmp_seq=195 hlim=64 
time=27.272 ms
16 bytes from fd9c:6829:597c:20:221:a4ff:fe32:63c, icmp_seq=196 hlim=64 
time=51.926 ms

Johann

> 
> 
> 
> Adrian
> 
> On 18 May 2012 02:33, Johann Hugo <jhugo@meraka.csir.co.za> wrote:
> > Hi
> > 
> > We have an outdoor wifi mesh network with various atheros adapters
> > configured in adhoc mode. (FreeBSD-9)
> > 
> > We sometimes (randomly) get a wifi adapter that goes into a "slow-mo"
> > mode, with degraded throughput, less than half.
> > 
> > A simple ifconfig wlanX down/up fixes the problem.
> > 
> > Before: (slow-mo)
> > [jhugo@jeep] ~> scp /boot/kernel/kernel  zeus.cids.org.za:/dev/null
> > kernel                            100%   15MB 445.7KB/s   00:34
> > 
> > After:
> > [jhugo@jeep] ~> scp /boot/kernel/kernel coin@elardus:/dev/null
> > kernel                            100%   15MB   1.0MB/s   00:15
> > 
> > Here is a list of all the registers (athregs) that changed during the
> > down/up.
> > 
> > Register                        Before          After
> > RXDP                    01200ea0        01200840
> > MIBC                    00000001        00000000
> > SPC_0                   00942a83        000c246a
> > DMADBG0         88888898        88888888
> > DMADBG4         000000a0        00000000
> > DMADBG5         04000000        00000000
> > DMADBG6         00032000        00022000
> > DMADBG7         000140a0        00000000
> > D_SEQ                   0000038a        000008c1
> > TIMER0                  000071d8        00000064
> > TIMER1                  00038eb0        00000310
> > TIMER2                  01bb8c30        000002d0
> > TIMER3                  000071b5        00000065
> > TSF_L32                 ddc5e966        de252332
> > DEF_ANT         00000000        00000001
> > OBSERV1         00002898        00002888
> > LAST_TST                ddc52219        de2473af
> > ACK_FAIL                00000002        00000000
> > FCS_FAIL                00000000        00000001
> > TFCNT                   0d8e4e2f        01e95fea
> > RFCNT                   157c4d09        015d5432
> > RCCNT                   281c998e        03b5a65c
> > CCCNT                   d4782107        0d5b4b5b
> > QUIET1                  0000717c        00000088
> > FILTOFDM                00ffffff                000001b8
> > FILTCCK                 00ffffff                0000015e
> > PHYCNT1         00bffe72        00bffe9f
> > PHYCNT2         00bfff3f                00bfff4a
> > 
> > Is there a wiki/docs on the web that explains what these registers mean ?
> > The only thing I could find was this link.
> > http://madwifi-project.org/wiki/DevDocs/AtherosRegisters
> > 
> > Any other usefull info that I should capture the next time this happens ?
> > 
> > Regards
> > Johann
> > _______________________________________________
> > freebsd-wireless@freebsd.org mailing list
> > http://lists.freebsd.org/mailman/listinfo/freebsd-wireless
> > To unsubscribe, send any mail to
> > "freebsd-wireless-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201205211458.06399.jhugo>