linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: rate instability in wireless stack
  2009-01-04 16:46 rate instability in wireless stack Andi Kleen
@ 2009-01-04 16:36 ` Michael Buesch
  2009-01-04 17:41   ` Andi Kleen
  0 siblings, 1 reply; 25+ messages in thread
From: Michael Buesch @ 2009-01-04 16:36 UTC (permalink / raw)
  To: Andi Kleen; +Cc: linux-wireless

On Sunday 04 January 2009 17:46:49 Andi Kleen wrote:
[snip]

I guess you're using the minstrel rate control.
Can you switch to PID rate control and retry.

Note that intel uses its own rate control algorithm. so I guess that's
where it breaks.

-- 
Greetings, Michael.

^ permalink raw reply	[flat|nested] 25+ messages in thread

* rate instability in wireless stack
@ 2009-01-04 16:46 Andi Kleen
  2009-01-04 16:36 ` Michael Buesch
  0 siblings, 1 reply; 25+ messages in thread
From: Andi Kleen @ 2009-01-04 16:46 UTC (permalink / raw)
  To: linux-wireless


Hi,

I recently had to switch my desktop over to use wireless to connect
to my DSL line. Unfortunately it was not a entirely happy experience.

I have the following setup:
- One zd1211rw usb stick taped to a desk.
- A wireless antenna next to it, connected to PCI wireless cards

I'm using the zd1211rw stick, which works (54Mbit/s connection
with no apparent packet loss through two walls from a 16Mbit/s DSL line).  
Unfortunately it has horrible queueing behaviour under load: when I have 
multiple download streams going the connection gets extremly laggy. 
The problem seems to be in the client here, when I do the same from a laptop
with Intel wireless there is no significant lag.

To avoid this problem I was trying to switch over to PCI cards.
I tried two different ones:

05:02.0 Network controller: RaLink RT2561/RT61 802.11g PCI

and 

06:02.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8185 IEEE 802.11a/b/g Wireless LAN Controller (rev 20)

in different machines. The reception should be about the same
or better than with the USB stick: they are connected to a real
antenna which is sitting next to the USB stick on a desk.

Unfortunately they both show the same problem. The connection
works, but quickly goes down to 1Mbit/s after setup and is then very slow.
I tried to manually lock it to 54Mbit/s, but then no data
is transferred. When it's set back to auto it quickly goes
down to 1Mbit/s again.

The USB stick happily stays at 54Mbit/s on its own (and works
well except for the lag behaviour). Both to the same AP.

Since I see this with two different chipsets I suppose it's
some general problem in the midlevel layer. There are no special
messages in dmesg. My laptops which have Intel wireless (ipw2200)
don't show this problem. So it must be in some part that 
is used by the RTL and RT drivers, but not by Intel or zd1211rw.

Kernels I tried: 2.6.27, 2.6.28, current 2.6.29-git (now with Larry's
patch). All same behaviour. 

Any ideas?

-Andi

-- 
ak@linux.intel.com

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: rate instability in wireless stack
  2009-01-04 16:36 ` Michael Buesch
@ 2009-01-04 17:41   ` Andi Kleen
  2009-01-05  0:29     ` Larry Finger
  0 siblings, 1 reply; 25+ messages in thread
From: Andi Kleen @ 2009-01-04 17:41 UTC (permalink / raw)
  To: Michael Buesch; +Cc: Andi Kleen, linux-wireless

On Sun, Jan 04, 2009 at 05:36:47PM +0100, Michael Buesch wrote:
> On Sunday 04 January 2009 17:46:49 Andi Kleen wrote:
> [snip]
> 
> I guess you're using the minstrel rate control.
> Can you switch to PID rate control and retry.

I thought i had tried both, but on rechecking it looks like
Kconfig makes it actively hard to do that (grumbl) and probably minstrel
was on all the time.

Anyways with PID i get between 1Mbit/s and 5.5Mbit/s, most of the
time 1Mbit/s. So it's not really much better.

-Andi
-- 
ak@linux.intel.com

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: rate instability in wireless stack
  2009-01-04 17:41   ` Andi Kleen
@ 2009-01-05  0:29     ` Larry Finger
  2009-01-05  2:53       ` Andi Kleen
  0 siblings, 1 reply; 25+ messages in thread
From: Larry Finger @ 2009-01-05  0:29 UTC (permalink / raw)
  To: Andi Kleen; +Cc: Michael Buesch, linux-wireless, John Linville

Andi,

Andi Kleen wrote:
> 
> Anyways with PID i get between 1Mbit/s and 5.5Mbit/s, most of the
> time 1Mbit/s. So it's not really much better.


Does this patch help? Recently mac80211 changed from expecting tries
to retries, and I don't think rtl8180 got changed.

Larry

===============
Index: wireless-testing/drivers/net/wireless/rtl818x/rtl8180_dev.c
===================================================================
--- wireless-testing.orig/drivers/net/wireless/rtl818x/rtl8180_dev.c
+++ wireless-testing/drivers/net/wireless/rtl818x/rtl8180_dev.c
@@ -188,7 +188,7 @@ static void rtl8180_handle_tx(struct iee
 		    (flags & RTL818X_TX_DESC_FLAG_TX_OK))
 			info->flags |= IEEE80211_TX_STAT_ACK;

-		info->status.rates[0].count = (flags & 0xFF) + 1;
+		info->status.rates[0].count = (flags & 0xFF);

 		ieee80211_tx_status_irqsafe(dev, skb);
 		if (ring->entries - skb_queue_len(&ring->queue) == 2)

-------



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: rate instability in wireless stack
  2009-01-05  0:29     ` Larry Finger
@ 2009-01-05  2:53       ` Andi Kleen
  2009-01-05  3:55         ` Larry Finger
  2009-01-05  4:22         ` Larry Finger
  0 siblings, 2 replies; 25+ messages in thread
From: Andi Kleen @ 2009-01-05  2:53 UTC (permalink / raw)
  To: Larry Finger; +Cc: Andi Kleen, Michael Buesch, linux-wireless, John Linville

On Sun, Jan 04, 2009 at 06:29:25PM -0600, Larry Finger wrote:
> Andi,
> 
> Andi Kleen wrote:
> > 
> > Anyways with PID i get between 1Mbit/s and 5.5Mbit/s, most of the
> > time 1Mbit/s. So it's not really much better.
> 
> 
> Does this patch help? Recently mac80211 changed from expecting tries
> to retries, and I don't think rtl8180 got changed.

Same issue with this patch. It fluctuates some time between 11Mbit/s
and 48Mbit/s, but then eventually settles on 1Mbit/s again. That's with PID
now, not Mistrel. I think it takes longer with this patch than
before, but not much.

BTW I see the problem with RT2561 too.

-Andi

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: rate instability in wireless stack
  2009-01-05  2:53       ` Andi Kleen
@ 2009-01-05  3:55         ` Larry Finger
  2009-01-05  5:02           ` Andi Kleen
  2009-01-05  4:22         ` Larry Finger
  1 sibling, 1 reply; 25+ messages in thread
From: Larry Finger @ 2009-01-05  3:55 UTC (permalink / raw)
  To: Andi Kleen; +Cc: Michael Buesch, linux-wireless, John Linville

Andi Kleen wrote:
> 
> Same issue with this patch. It fluctuates some time between 11Mbit/s
> and 48Mbit/s, but then eventually settles on 1Mbit/s again. That's with PID
> now, not Mistrel. I think it takes longer with this patch than
> before, but not much.
> 
> BTW I see the problem with RT2561 too.

Can you retry with mistrel? In my experience, it converges to a lower rate than
does pid, but it doesn't fluctuate as much.

I'll look into RT2561.

What I generally do is start a ping in one window and enter the following line
in another:

while [ 1 ] ; do iwconfig wlan0 | grep Mb ; sleep 1 ; done

and watch the rate.

Larry


^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: rate instability in wireless stack
  2009-01-05  2:53       ` Andi Kleen
  2009-01-05  3:55         ` Larry Finger
@ 2009-01-05  4:22         ` Larry Finger
  1 sibling, 0 replies; 25+ messages in thread
From: Larry Finger @ 2009-01-05  4:22 UTC (permalink / raw)
  To: Andi Kleen; +Cc: linux-wireless, John Linville

Andi Kleen wrote:
> 
> BTW I see the problem with RT2561 too.
> 

This one should fix all of the rt2x00 drivers.

Larry


Index: wireless-testing/drivers/net/wireless/rt2x00/rt2x00dev.c
===================================================================
--- wireless-testing.orig/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ wireless-testing/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -266,7 +266,7 @@ void rt2x00lib_txdone(struct queue_entry
 	tx_info->status.ack_signal = 0;
 	tx_info->status.rates[0].idx = rate_idx;
 	tx_info->status.rates[0].flags = rate_flags;
-	tx_info->status.rates[0].count = txdesc->retry + 1;
+	tx_info->status.rates[0].count = txdesc->retry;
 	tx_info->status.rates[1].idx = -1; /* terminate */

 	if (!(tx_info->flags & IEEE80211_TX_CTL_NO_ACK)) {

---

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: rate instability in wireless stack
  2009-01-05  5:02           ` Andi Kleen
@ 2009-01-05  4:59             ` Larry Finger
  2009-01-05  5:48               ` Andi Kleen
  0 siblings, 1 reply; 25+ messages in thread
From: Larry Finger @ 2009-01-05  4:59 UTC (permalink / raw)
  To: Andi Kleen; +Cc: Michael Buesch, linux-wireless, John Linville

Andi Kleen wrote:
> On Sun, Jan 04, 2009 at 09:55:03PM -0600, Larry Finger wrote:
> 
> Minstrel stays constantly at 1 Mbit/s

Do you have mac80211 debugging turned on? If so, then do a

sudo cat /sys/kernel/debug/ieee80211/phyXX/stations/<MAC ADDR>/rc_stats

and post them.

Thanks,

Larry


^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: rate instability in wireless stack
  2009-01-05  3:55         ` Larry Finger
@ 2009-01-05  5:02           ` Andi Kleen
  2009-01-05  4:59             ` Larry Finger
  0 siblings, 1 reply; 25+ messages in thread
From: Andi Kleen @ 2009-01-05  5:02 UTC (permalink / raw)
  To: Larry Finger; +Cc: Andi Kleen, Michael Buesch, linux-wireless, John Linville

On Sun, Jan 04, 2009 at 09:55:03PM -0600, Larry Finger wrote:
> Andi Kleen wrote:
> > 
> > Same issue with this patch. It fluctuates some time between 11Mbit/s
> > and 48Mbit/s, but then eventually settles on 1Mbit/s again. That's with PID
> > now, not Mistrel. I think it takes longer with this patch than
> > before, but not much.
> > 
> > BTW I see the problem with RT2561 too.
> 
> Can you retry with mistrel? In my experience, it converges to a lower rate than
> does pid, but it doesn't fluctuate as much.

Minstrel stays constantly at 1 Mbit/s

-Andi
-- 
ak@linux.intel.com

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: rate instability in wireless stack
  2009-01-05  4:59             ` Larry Finger
@ 2009-01-05  5:48               ` Andi Kleen
  2009-01-05  5:51                 ` Larry Finger
  2009-01-05 13:32                 ` Felix Fietkau
  0 siblings, 2 replies; 25+ messages in thread
From: Andi Kleen @ 2009-01-05  5:48 UTC (permalink / raw)
  To: Larry Finger; +Cc: Andi Kleen, Michael Buesch, linux-wireless, John Linville

On Sun, Jan 04, 2009 at 10:59:18PM -0600, Larry Finger wrote:
> Andi Kleen wrote:
> > On Sun, Jan 04, 2009 at 09:55:03PM -0600, Larry Finger wrote:
> > 
> > Minstrel stays constantly at 1 Mbit/s
> 
> Do you have mac80211 debugging turned on? If so, then do a
> 
> sudo cat /sys/kernel/debug/ieee80211/phyXX/stations/<MAC ADDR>/rc_stats
> 
> and post them.

Lots of zeroes.

-Andi

rate     throughput  ewma prob   this prob  this succ/attempt   success    attempts
TtP  1         0.0        0.0        0.0          1(  0)          0           0
     2         0.0        0.0        0.0          0(  0)          0           0
     5.5       0.0        0.0        0.0          0(  0)          0           0
    11         0.0        0.0        0.0          0(  0)          0           0
     6         0.0        0.0        0.0          0(  0)          0           0
     9         0.0        0.0        0.0          0(  0)          0           0
    12         0.0        0.0        0.0          0(  0)          0           0
    18         0.0        0.0        0.0          0(  0)          0           0
    24         0.0        0.0        0.0          0(  0)          0           0
    36         0.0        0.0        0.0          0(  0)          0           0
    48         0.0        0.0        0.0          0(  0)          0           0
    54         0.0        0.0        0.0          0(  0)          0           2

Total packet count::    ideal 46      lookaround 2


-- 
ak@linux.intel.com

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: rate instability in wireless stack
  2009-01-05  5:48               ` Andi Kleen
@ 2009-01-05  5:51                 ` Larry Finger
  2009-01-05  8:17                   ` Johannes Berg
  2009-01-05 13:32                 ` Felix Fietkau
  1 sibling, 1 reply; 25+ messages in thread
From: Larry Finger @ 2009-01-05  5:51 UTC (permalink / raw)
  To: Andi Kleen; +Cc: Michael Buesch, linux-wireless, John Linville, Johannes Berg

Andi Kleen wrote:
> On Sun, Jan 04, 2009 at 10:59:18PM -0600, Larry Finger wrote:
>> Andi Kleen wrote:
>>> On Sun, Jan 04, 2009 at 09:55:03PM -0600, Larry Finger wrote:
>>>
>>> Minstrel stays constantly at 1 Mbit/s
>> Do you have mac80211 debugging turned on? If so, then do a
>>
>> sudo cat /sys/kernel/debug/ieee80211/phyXX/stations/<MAC ADDR>/rc_stats
>>
>> and post them.
> 
> Lots of zeroes.

Strange. Mine looks like this.

rate     throughput  ewma prob   this prob  this succ/attempt   success    attempts
     1         0.9       97.7      100.0          1(  1)       2086        2206
     2         0.1        7.0        0.0          0(  0)          1           5
     5.5       0.0        0.0        0.0          0(  0)          0           1
    11         0.0        0.0        0.0          0(  0)          0           4
     6         1.4       25.0      100.0          0(  0)          1           2
     9         0.0        0.0        0.0          0(  0)          0           6
    12         7.6       68.8        0.0          0(  0)        187         192
    18         7.0       43.3        0.0          0(  0)          3           5
    24        10.6       49.8      100.0          0(  0)         20          40
    36         8.5       28.0       50.0          0(  0)       1389        1520
T P 48        15.7       99.9      100.0          1(  1)       3277        3525
 t  54        21.7       50.1        0.0          0(  0)      19282       20028

Total packet count::    ideal 3800      lookaround 422

Johannes,

Any explanation as to why there are no attempts?

Larry



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: rate instability in wireless stack
  2009-01-05  5:51                 ` Larry Finger
@ 2009-01-05  8:17                   ` Johannes Berg
  2009-01-05 12:54                     ` Andi Kleen
  0 siblings, 1 reply; 25+ messages in thread
From: Johannes Berg @ 2009-01-05  8:17 UTC (permalink / raw)
  To: Larry Finger; +Cc: Andi Kleen, Michael Buesch, linux-wireless, John Linville

[-- Attachment #1: Type: text/plain, Size: 1430 bytes --]

On Sun, 2009-01-04 at 23:51 -0600, Larry Finger wrote:

> rate     throughput  ewma prob   this prob  this succ/attempt   success    attempts
>      1         0.9       97.7      100.0          1(  1)       2086        2206
>      2         0.1        7.0        0.0          0(  0)          1           5
>      5.5       0.0        0.0        0.0          0(  0)          0           1
>     11         0.0        0.0        0.0          0(  0)          0           4
>      6         1.4       25.0      100.0          0(  0)          1           2
>      9         0.0        0.0        0.0          0(  0)          0           6
>     12         7.6       68.8        0.0          0(  0)        187         192
>     18         7.0       43.3        0.0          0(  0)          3           5
>     24        10.6       49.8      100.0          0(  0)         20          40
>     36         8.5       28.0       50.0          0(  0)       1389        1520
> T P 48        15.7       99.9      100.0          1(  1)       3277        3525
>  t  54        21.7       50.1        0.0          0(  0)      19282       20028
> 
> Total packet count::    ideal 3800      lookaround 422
> 
> Johannes,
> 
> Any explanation as to why there are no attempts?

It only sent two probe packets? Remember that zd1211 is rather rate
control challenged. I don't know. nbd might be able to tell you more.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: rate instability in wireless stack
  2009-01-05  8:17                   ` Johannes Berg
@ 2009-01-05 12:54                     ` Andi Kleen
  0 siblings, 0 replies; 25+ messages in thread
From: Andi Kleen @ 2009-01-05 12:54 UTC (permalink / raw)
  To: Johannes Berg
  Cc: Larry Finger, Andi Kleen, Michael Buesch, linux-wireless,
	John Linville

> > Any explanation as to why there are no attempts?
> 
> It only sent two probe packets? Remember that zd1211 is rather rate

This was with rtl8180, not zd1211.

> control challenged. I don't know. nbd might be able to tell you more.

What is nbd? 

Anyways I can add printks and try to figure out more.

-Andi

-- 
ak@linux.intel.com

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: rate instability in wireless stack
  2009-01-05  5:48               ` Andi Kleen
  2009-01-05  5:51                 ` Larry Finger
@ 2009-01-05 13:32                 ` Felix Fietkau
  2009-01-05 14:23                   ` Andi Kleen
  1 sibling, 1 reply; 25+ messages in thread
From: Felix Fietkau @ 2009-01-05 13:32 UTC (permalink / raw)
  To: Andi Kleen; +Cc: Larry Finger, Michael Buesch, linux-wireless, John Linville

Andi Kleen wrote:
> Lots of zeroes.
> 
> -Andi
> 
> rate     throughput  ewma prob   this prob  this succ/attempt   success    attempts
> TtP  1         0.0        0.0        0.0          1(  0)          0           0
>      2         0.0        0.0        0.0          0(  0)          0           0
>      5.5       0.0        0.0        0.0          0(  0)          0           0
>     11         0.0        0.0        0.0          0(  0)          0           0
>      6         0.0        0.0        0.0          0(  0)          0           0
>      9         0.0        0.0        0.0          0(  0)          0           0
>     12         0.0        0.0        0.0          0(  0)          0           0
>     18         0.0        0.0        0.0          0(  0)          0           0
>     24         0.0        0.0        0.0          0(  0)          0           0
>     36         0.0        0.0        0.0          0(  0)          0           0
>     48         0.0        0.0        0.0          0(  0)          0           0
>     54         0.0        0.0        0.0          0(  0)          0           2
> 
> Total packet count::    ideal 46      lookaround 2
It looks like mac80211 is not getting proper feedback from the tx
status of the device. Is this with the patch that Larry suggested?
If so, please revert that patch and post an updated version of the
same stats.
The info->status.rates[0].count is supposed to contain the number of
tx attempts, not the number of retransmissions (at least that's what
minstrel expects).

- Felix

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: rate instability in wireless stack
  2009-01-05 13:32                 ` Felix Fietkau
@ 2009-01-05 14:23                   ` Andi Kleen
  2009-01-05 14:41                     ` Felix Fietkau
  0 siblings, 1 reply; 25+ messages in thread
From: Andi Kleen @ 2009-01-05 14:23 UTC (permalink / raw)
  To: Felix Fietkau
  Cc: Andi Kleen, Larry Finger, Michael Buesch, linux-wireless,
	John Linville

On Mon, Jan 05, 2009 at 02:32:21PM +0100, Felix Fietkau wrote:
> It looks like mac80211 is not getting proper feedback from the tx
> status of the device. Is this with the patch that Larry suggested?
> If so, please revert that patch and post an updated version of the
> same stats.

With Larry's patch reverted. Rate is still at 1Mbit/s of course.
This is all only with rtl8180, I didn't try everything on the realtek
card too. 

-Andi

rate     throughput  ewma prob   this prob  this succ/attempt   success    attempts
TtP  1         0.9       99.2      100.0          1(  1)         23          32
     2         0.0        0.0        0.0          0(  0)          0           0
     5.5       0.0        0.0        0.0          0(  0)          0           1
    11         0.0        0.0        0.0          0(  0)          0           0
     6         0.0        0.0        0.0          0(  0)          0           0
     9         0.0        0.0        0.0          0(  0)          0           0
    12         0.0        0.0        0.0          0(  0)          0           0
    18         0.0        0.0        0.0          0(  0)          0           0
    24         0.0        0.0        0.0          0(  0)          0           0
    36         0.0        0.0        0.0          0(  0)          0           0
    48         0.0        0.0        0.0          0(  0)          0           0
    54         0.0        0.0        0.0          0(  0)          0           0

Total packet count::    ideal 25      lookaround 1



-- 
ak@linux.intel.com

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: rate instability in wireless stack
  2009-01-05 14:23                   ` Andi Kleen
@ 2009-01-05 14:41                     ` Felix Fietkau
  2009-01-05 15:24                       ` Andi Kleen
  0 siblings, 1 reply; 25+ messages in thread
From: Felix Fietkau @ 2009-01-05 14:41 UTC (permalink / raw)
  To: Andi Kleen; +Cc: Larry Finger, Michael Buesch, linux-wireless, John Linville

Andi Kleen wrote:
> With Larry's patch reverted. Rate is still at 1Mbit/s of course.
> This is all only with rtl8180, I didn't try everything on the realtek
> card too. 
> 
> -Andi
> 
> rate     throughput  ewma prob   this prob  this succ/attempt   success    attempts
> TtP  1         0.9       99.2      100.0          1(  1)         23          32
>      2         0.0        0.0        0.0          0(  0)          0           0
>      5.5       0.0        0.0        0.0          0(  0)          0           1
>     11         0.0        0.0        0.0          0(  0)          0           0
>      6         0.0        0.0        0.0          0(  0)          0           0
>      9         0.0        0.0        0.0          0(  0)          0           0
>     12         0.0        0.0        0.0          0(  0)          0           0
>     18         0.0        0.0        0.0          0(  0)          0           0
>     24         0.0        0.0        0.0          0(  0)          0           0
>     36         0.0        0.0        0.0          0(  0)          0           0
>     48         0.0        0.0        0.0          0(  0)          0           0
>     54         0.0        0.0        0.0          0(  0)          0           0
> 
> Total packet count::    ideal 25      lookaround 1
OK, that confirms that Larry's patch was wrong - at least the dump
looks consistent now.
Probably the RT2561 and the RTL8180 simply have a lower Tx power and
thus can't get the signal through the walls as easily as the zd1211rw.
If you still think that it's a rate control problem, please try all
the rates individually and see if one of them works better.

- Felix

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: rate instability in wireless stack
  2009-01-05 14:41                     ` Felix Fietkau
@ 2009-01-05 15:24                       ` Andi Kleen
  2009-01-05 15:25                         ` Felix Fietkau
  0 siblings, 1 reply; 25+ messages in thread
From: Andi Kleen @ 2009-01-05 15:24 UTC (permalink / raw)
  To: Felix Fietkau
  Cc: Andi Kleen, Larry Finger, Michael Buesch, linux-wireless,
	John Linville

On Mon, Jan 05, 2009 at 03:41:58PM +0100, Felix Fietkau wrote:
> Andi Kleen wrote:
> > With Larry's patch reverted. Rate is still at 1Mbit/s of course.
> > This is all only with rtl8180, I didn't try everything on the realtek
> > card too. 
> > 
> > -Andi
> > 
> > rate     throughput  ewma prob   this prob  this succ/attempt   success    attempts
> > TtP  1         0.9       99.2      100.0          1(  1)         23          32
> >      2         0.0        0.0        0.0          0(  0)          0           0
> >      5.5       0.0        0.0        0.0          0(  0)          0           1
> >     11         0.0        0.0        0.0          0(  0)          0           0
> >      6         0.0        0.0        0.0          0(  0)          0           0
> >      9         0.0        0.0        0.0          0(  0)          0           0
> >     12         0.0        0.0        0.0          0(  0)          0           0
> >     18         0.0        0.0        0.0          0(  0)          0           0
> >     24         0.0        0.0        0.0          0(  0)          0           0
> >     36         0.0        0.0        0.0          0(  0)          0           0
> >     48         0.0        0.0        0.0          0(  0)          0           0
> >     54         0.0        0.0        0.0          0(  0)          0           0
> > 
> > Total packet count::    ideal 25      lookaround 1
> OK, that confirms that Larry's patch was wrong - at least the dump
> looks consistent now.
> Probably the RT2561 and the RTL8180 simply have a lower Tx power and

> thus can't get the signal through the walls as easily as the zd1211rw.

That surprises me because I use a real antenna on them which the zd1211rw
is just itself. Also some laptops with Intel wireless have no trouble
talking through the walls at full rate when I put them on the same position.

Hmm perhaps I should try to find a Windows box and see if it works
there. That would rule out hardware issues.

> If you still think that it's a rate control problem, please try all

I don't know what it is, i just know that it doesn't work and
from the evidence I gathered so far it looks like a Linux software
problem.

> the rates individually and see if one of them works better.

Forcing the rates works somewhat, but the link quality is very poor
(10-15/100) and fluctuates.

-Andi

-- 
ak@linux.intel.com

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: rate instability in wireless stack
  2009-01-05 15:24                       ` Andi Kleen
@ 2009-01-05 15:25                         ` Felix Fietkau
  2009-01-05 16:35                           ` Andi Kleen
  0 siblings, 1 reply; 25+ messages in thread
From: Felix Fietkau @ 2009-01-05 15:25 UTC (permalink / raw)
  To: Andi Kleen; +Cc: Larry Finger, Michael Buesch, linux-wireless, John Linville

Andi Kleen wrote:
>> Probably the RT2561 and the RTL8180 simply have a lower Tx power and
>> thus can't get the signal through the walls as easily as the zd1211rw.
> 
> That surprises me because I use a real antenna on them which the zd1211rw
> is just itself. Also some laptops with Intel wireless have no trouble
> talking through the walls at full rate when I put them on the same position.
> 
> Hmm perhaps I should try to find a Windows box and see if it works
> there. That would rule out hardware issues.
> 
>> If you still think that it's a rate control problem, please try all
> 
> I don't know what it is, i just know that it doesn't work and
> from the evidence I gathered so far it looks like a Linux software
> problem.
> 
>> the rates individually and see if one of them works better.
> 
> Forcing the rates works somewhat, but the link quality is very poor
> (10-15/100) and fluctuates.
Another possibility is that the tx power is fine, but the
sensitivity of the card is crap, so the packets actually make it,
but the ACKs don't. This is something that's quite hard to detect in
a rate control module that relies on ACKs as the only available
source of feedback (not that using RSSI for that would be any
better, but still).

Even if both cards work fine on Windows, I wouldn't assume that this
is an issue with mac80211. The information that was used to write
these two drivers was derived from very poor vendor codebases and
limited information in datasheets, so it's much more likely that
simply the Baseband/RF tuning is far from optimal on both cards.

Maybe we can see more if you provide some minstrel stats after
you've pushed more traffic through the link - 25-50 packets is not
nearly enough for getting an accurate view of how good the link is.
Try to push through a few megabytes of data...

- Felix

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: rate instability in wireless stack
  2009-01-05 15:25                         ` Felix Fietkau
@ 2009-01-05 16:35                           ` Andi Kleen
  2009-01-05 16:36                             ` Felix Fietkau
  0 siblings, 1 reply; 25+ messages in thread
From: Andi Kleen @ 2009-01-05 16:35 UTC (permalink / raw)
  To: Felix Fietkau
  Cc: Andi Kleen, Larry Finger, Michael Buesch, linux-wireless,
	John Linville

On Mon, Jan 05, 2009 at 04:25:58PM +0100, Felix Fietkau wrote:
> > Forcing the rates works somewhat, but the link quality is very poor
> > (10-15/100) and fluctuates.
> Another possibility is that the tx power is fine, but the
> sensitivity of the card is crap, so the packets actually make it,

Ok, but I see the same thing with two different cards, with different
chipsets (RaLink and RealTek). You think they both have that problem?

> Even if both cards work fine on Windows, I wouldn't assume that this
> is an issue with mac80211. The information that was used to write
> these two drivers was derived from very poor vendor codebases and
> limited information in datasheets, so it's much more likely that
> simply the Baseband/RF tuning is far from optimal on both cards.

Ok I won't try then. Setting up Windows would be quite a lot of
effort and I would prefer to avoid it.

> Maybe we can see more if you provide some minstrel stats after
> you've pushed more traffic through the link - 25-50 packets is not
> nearly enough for getting an accurate view of how good the link is.
> Try to push through a few megabytes of data...

Here are the statistics after a few MB.

rate     throughput  ewma prob   this prob  this succ/attempt   success    attempts
TtP  1         0.9       97.9      100.0          1(  1)      19284       21249
     2         0.0        0.0        0.0          0(  0)          0         101
     5.5       0.0        0.0        0.0          0(  0)          0         104
    11         0.0        0.0        0.0          0(  0)        253         397
     6         0.0        0.0        0.0          0(  0)          0         103
     9         0.0        0.0        0.0          0(  0)          0         106
    12         0.0        0.0        0.0          0(  0)          0         107
    18         0.0        0.0        0.0          0(  0)          0         104
    24         0.0        0.0        0.0          0(  0)          0         111
    36         0.0        0.0        0.0          0(  0)          0         120
    48         0.0        0.0        0.0          0(  0)          0         179
    54         0.0        0.0        0.0          0(  0)          0         253

Total packet count::    ideal 9023      lookaround 474

-Andi
-- 
ak@linux.intel.com

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: rate instability in wireless stack
  2009-01-05 16:35                           ` Andi Kleen
@ 2009-01-05 16:36                             ` Felix Fietkau
  2009-01-05 17:11                               ` Andi Kleen
  0 siblings, 1 reply; 25+ messages in thread
From: Felix Fietkau @ 2009-01-05 16:36 UTC (permalink / raw)
  To: Andi Kleen; +Cc: Larry Finger, Michael Buesch, linux-wireless, John Linville

Andi Kleen wrote:
> Ok, but I see the same thing with two different cards, with different
> chipsets (RaLink and RealTek). You think they both have that problem?
Yes, I think that's not unlikely.

>> Maybe we can see more if you provide some minstrel stats after
>> you've pushed more traffic through the link - 25-50 packets is not
>> nearly enough for getting an accurate view of how good the link is.
>> Try to push through a few megabytes of data...
> 
> Here are the statistics after a few MB.
> 
> rate     throughput  ewma prob   this prob  this succ/attempt   success    attempts
> TtP  1         0.9       97.9      100.0          1(  1)      19284       21249
>      2         0.0        0.0        0.0          0(  0)          0         101
>      5.5       0.0        0.0        0.0          0(  0)          0         104
>     11         0.0        0.0        0.0          0(  0)        253         397
>      6         0.0        0.0        0.0          0(  0)          0         103
>      9         0.0        0.0        0.0          0(  0)          0         106
>     12         0.0        0.0        0.0          0(  0)          0         107
>     18         0.0        0.0        0.0          0(  0)          0         104
>     24         0.0        0.0        0.0          0(  0)          0         111
>     36         0.0        0.0        0.0          0(  0)          0         120
>     48         0.0        0.0        0.0          0(  0)          0         179
>     54         0.0        0.0        0.0          0(  0)          0         253
> 
> Total packet count::    ideal 9023      lookaround 474
According to the rate control's view, only the 1M has a usable
success probability. It's rather insteresting that 11M is the only
other rate that had some successes. With this kind of results, the
only two options that I can think of are either a systematic tx
status reporting error (false negative for the IEEE80211_TX_STAT_ACK
flag), or something PHY related.
I think the latter is more likely.

- Felix

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: rate instability in wireless stack
  2009-01-05 17:11                               ` Andi Kleen
@ 2009-01-05 17:01                                 ` Felix Fietkau
  2009-01-05 19:33                                   ` Hin-Tak Leung
  0 siblings, 1 reply; 25+ messages in thread
From: Felix Fietkau @ 2009-01-05 17:01 UTC (permalink / raw)
  To: Andi Kleen; +Cc: Larry Finger, Michael Buesch, linux-wireless, John Linville

Andi Kleen wrote:
>> According to the rate control's view, only the 1M has a usable
>> success probability. It's rather insteresting that 11M is the only
>> other rate that had some successes. With this kind of results, the
>> only two options that I can think of are either a systematic tx
>> status reporting error (false negative for the IEEE80211_TX_STAT_ACK
>> flag), or something PHY related.
> 
> Ok. Any more data I should provide to help tracking this down?
> Do you want the same from the RaLink?
Yes, It'd be interesting to see if the table looks similar or if
more rates work.

- Felix

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: rate instability in wireless stack
  2009-01-05 16:36                             ` Felix Fietkau
@ 2009-01-05 17:11                               ` Andi Kleen
  2009-01-05 17:01                                 ` Felix Fietkau
  0 siblings, 1 reply; 25+ messages in thread
From: Andi Kleen @ 2009-01-05 17:11 UTC (permalink / raw)
  To: Felix Fietkau
  Cc: Andi Kleen, Larry Finger, Michael Buesch, linux-wireless,
	John Linville

> According to the rate control's view, only the 1M has a usable
> success probability. It's rather insteresting that 11M is the only
> other rate that had some successes. With this kind of results, the
> only two options that I can think of are either a systematic tx
> status reporting error (false negative for the IEEE80211_TX_STAT_ACK
> flag), or something PHY related.

Ok. Any more data I should provide to help tracking this down?
Do you want the same from the RaLink?

-Andi
-- 
ak@linux.intel.com

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: rate instability in wireless stack
  2009-01-05 17:01                                 ` Felix Fietkau
@ 2009-01-05 19:33                                   ` Hin-Tak Leung
  2009-01-05 20:16                                     ` Larry Finger
  0 siblings, 1 reply; 25+ messages in thread
From: Hin-Tak Leung @ 2009-01-05 19:33 UTC (permalink / raw)
  To: Felix Fietkau
  Cc: Andi Kleen, Larry Finger, Michael Buesch, linux-wireless,
	John Linville

This sounds a bit like what is mentioned in this bug report - (no solution yet,
but the symptom seem similiar).
http://bugzilla.kernel.org/show_bug.cgi?id=12131

On Mon, Jan 5, 2009 at 5:01 PM, Felix Fietkau <nbd@openwrt.org> wrote:
> Andi Kleen wrote:
>>> According to the rate control's view, only the 1M has a usable
>>> success probability. It's rather insteresting that 11M is the only
>>> other rate that had some successes. With this kind of results, the
>>> only two options that I can think of are either a systematic tx
>>> status reporting error (false negative for the IEEE80211_TX_STAT_ACK
>>> flag), or something PHY related.
>>
>> Ok. Any more data I should provide to help tracking this down?
>> Do you want the same from the RaLink?
> Yes, It'd be interesting to see if the table looks similar or if
> more rates work.
>
> - Felix
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: rate instability in wireless stack
  2009-01-05 19:33                                   ` Hin-Tak Leung
@ 2009-01-05 20:16                                     ` Larry Finger
  0 siblings, 0 replies; 25+ messages in thread
From: Larry Finger @ 2009-01-05 20:16 UTC (permalink / raw)
  To: Hin-Tak Leung
  Cc: Felix Fietkau, Andi Kleen, Michael Buesch, linux-wireless,
	John Linville

Hin-Tak Leung wrote:
> This sounds a bit like what is mentioned in this bug report - (no solution yet,
> but the symptom seem similiar).
> http://bugzilla.kernel.org/show_bug.cgi?id=12131
> 

I think that one is different. If I read the bug report correctly, that one
cannot even keep a full rate of 1 Mb/s.

Larry


^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: rate instability in wireless stack
@ 2009-01-07  6:46 Martín Ernesto Barreyro
  0 siblings, 0 replies; 25+ messages in thread
From: Martín Ernesto Barreyro @ 2009-01-07  6:46 UTC (permalink / raw)
  To: linux-wireless

Hello, I've rtl8187 usb wifi card on board (at less is inside my laptop=
)
and
I've some problems with the rate control.

When I use the PID algorithm with 2.6.26-1-686(debian) or 2.6.28 kernel=
s
or
minstrel with 2.6.28 it always goes to 54Mb/s, and it doesn't work. If =
I
run
iwconfig wlan0 rate 11M auto, it starts working. Its a little
"optimistic".

This is the rc_stats output
rate     throughput  ewma prob   this prob  this succ/attempt   success
attempts
  P  1         0.9       99.9      100.0          0(  0)        382
382
     2         1.9       99.9      100.0          0(  0)        222
222
     5.5       5.0       99.9      100.0          0(  0)        222
222
    11         9.5       99.9      100.0          4(  4)      48070
48070
     6         1.4       25.0      100.0          0(  0)          1
1
     9         3.6       43.7      100.0          0(  0)          2
2
 t  12        11.0       99.9      100.0          0(  0)        228
228
    18         4.0       25.0      100.0          0(  0)          1
1
    24         5.3       25.0      100.0          0(  0)          1
1
    36         7.6       25.0      100.0          0(  0)          1
1
    48         9.7       25.0      100.0          0(  0)          1
1
T   54        20.0       99.9      100.0          0(  0)         53
53

Total packet count::    ideal 8384      lookaround 441

All the attemps succeed, this is after I use iwconfig wlan0 rate 11M
auto,
otherwhise I couldn't write this, couse it stays at 54Mb/s and doesn't
works.

Today, january 7, I updated the driver with the compat-wireless tarball=
=2E
Now the
driver just stays in 1Mb/s.

rate     throughput  ewma prob   this prob  this succ/attempt   success
attempts
TtP  1         0.0        0.0        0.0          1(  0)          0
0
     2         0.0        0.0        0.0          0(  0)          0
0
     5.5       0.0        0.0        0.0          0(  0)          0
0
    11         0.0        0.0        0.0          0(  0)          0
0
     6         0.0        0.0        0.0          0(  0)          0
0
     9         0.0        0.0        0.0          0(  0)          0
0
    12         0.0        0.0        0.0          0(  0)          0
0
    18         0.0        0.0        0.0          0(  0)          0
0
    24         0.0        0.0        0.0          0(  0)          0
0
    36         0.0        0.0        0.0          0(  0)          0
0
    48         0.0        0.0        0.0          0(  0)          0
0
    54         0.0        0.0        0.0          0(  0)          0
0

Total packet count::    ideal 3546      lookaround 186

I send this problem to Larry, but since someone posted something simila=
r
I
thought it would be useful.

Mart=C3=ADn
--=20
Mart=C3=ADn Ernesto Barreyro <barreyromartin@gmail.com>

--
To unsubscribe from this list: send the line "unsubscribe linux-wireles=
s" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2009-01-07  6:47 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-04 16:46 rate instability in wireless stack Andi Kleen
2009-01-04 16:36 ` Michael Buesch
2009-01-04 17:41   ` Andi Kleen
2009-01-05  0:29     ` Larry Finger
2009-01-05  2:53       ` Andi Kleen
2009-01-05  3:55         ` Larry Finger
2009-01-05  5:02           ` Andi Kleen
2009-01-05  4:59             ` Larry Finger
2009-01-05  5:48               ` Andi Kleen
2009-01-05  5:51                 ` Larry Finger
2009-01-05  8:17                   ` Johannes Berg
2009-01-05 12:54                     ` Andi Kleen
2009-01-05 13:32                 ` Felix Fietkau
2009-01-05 14:23                   ` Andi Kleen
2009-01-05 14:41                     ` Felix Fietkau
2009-01-05 15:24                       ` Andi Kleen
2009-01-05 15:25                         ` Felix Fietkau
2009-01-05 16:35                           ` Andi Kleen
2009-01-05 16:36                             ` Felix Fietkau
2009-01-05 17:11                               ` Andi Kleen
2009-01-05 17:01                                 ` Felix Fietkau
2009-01-05 19:33                                   ` Hin-Tak Leung
2009-01-05 20:16                                     ` Larry Finger
2009-01-05  4:22         ` Larry Finger
  -- strict thread matches above, loose matches on Subject: below --
2009-01-07  6:46 Martín Ernesto Barreyro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).