* [PATCH] mac80211: use capped prob when computing throughputs
@ 2013-11-20 0:51 Karl Beldan
2013-11-20 7:32 ` Felix Fietkau
0 siblings, 1 reply; 14+ messages in thread
From: Karl Beldan @ 2013-11-20 0:51 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless, Karl Beldan, Felix Fietkau
From: Karl Beldan <karl.beldan@rivierawaves.com>
Commit 3e8b1eb "mac80211/minstrel_ht: improve rate selection stability"
introduced a local capped prob in minstrel_ht_calc_tp but omitted to use
it to compute the rate throughput.
Signed-off-by: Karl Beldan <karl.beldan@rivierawaves.com>
CC: Felix Fietkau <nbd@openwrt.org>
---
net/mac80211/rc80211_minstrel_ht.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c
index 9702d88..341e6f7 100644
--- a/net/mac80211/rc80211_minstrel_ht.c
+++ b/net/mac80211/rc80211_minstrel_ht.c
@@ -333,7 +333,7 @@ minstrel_ht_calc_tp(struct minstrel_ht_sta *mi, int group, int rate)
nsecs = 1000 * mi->overhead / MINSTREL_TRUNC(mi->avg_ampdu_len);
nsecs += minstrel_mcs_groups[group].duration[rate];
- tp = 1000000 * ((mr->probability * 1000) / nsecs);
+ tp = 1000000 * (prob * 1000) / nsecs;
mr->cur_tp = MINSTREL_TRUNC(tp);
}
--
1.8.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH] mac80211: use capped prob when computing throughputs
2013-11-20 0:51 [PATCH] mac80211: use capped prob when computing throughputs Karl Beldan
@ 2013-11-20 7:32 ` Felix Fietkau
2013-11-20 13:56 ` Karl Beldan
2013-11-20 16:57 ` Felix Fietkau
0 siblings, 2 replies; 14+ messages in thread
From: Felix Fietkau @ 2013-11-20 7:32 UTC (permalink / raw)
To: Karl Beldan, Johannes Berg; +Cc: linux-wireless, Karl Beldan
On 2013-11-20 01:51, Karl Beldan wrote:
> From: Karl Beldan <karl.beldan@rivierawaves.com>
>
> Commit 3e8b1eb "mac80211/minstrel_ht: improve rate selection stability"
> introduced a local capped prob in minstrel_ht_calc_tp but omitted to use
> it to compute the rate throughput.
>
> Signed-off-by: Karl Beldan <karl.beldan@rivierawaves.com>
> CC: Felix Fietkau <nbd@openwrt.org>
Nice catch!
Acked-by: Felix Fietkau <nbd@openwrt.org>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] mac80211: use capped prob when computing throughputs
2013-11-20 7:32 ` Felix Fietkau
@ 2013-11-20 13:56 ` Karl Beldan
2013-11-20 14:04 ` Felix Fietkau
2013-11-20 16:57 ` Felix Fietkau
1 sibling, 1 reply; 14+ messages in thread
From: Karl Beldan @ 2013-11-20 13:56 UTC (permalink / raw)
To: Felix Fietkau; +Cc: Johannes Berg, linux-wireless, Karl Beldan
On Wed, Nov 20, 2013 at 08:32:32AM +0100, Felix Fietkau wrote:
> On 2013-11-20 01:51, Karl Beldan wrote:
> > From: Karl Beldan <karl.beldan@rivierawaves.com>
> >
> > Commit 3e8b1eb "mac80211/minstrel_ht: improve rate selection stability"
> > introduced a local capped prob in minstrel_ht_calc_tp but omitted to use
> > it to compute the rate throughput.
> >
> > Signed-off-by: Karl Beldan <karl.beldan@rivierawaves.com>
> > CC: Felix Fietkau <nbd@openwrt.org>
> Nice catch!
> Acked-by: Felix Fietkau <nbd@openwrt.org>
>
Interestingly enough, consecutive coding rates (5/6, 3/4, 2/3) max ratio
is 9/10, did you do it on purpose ? (e.g. (9/10) * (5/6) == 3/4,
(9/10) * (3/4) == 2/3 + 11/120).
Karl
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] mac80211: use capped prob when computing throughputs
2013-11-20 13:56 ` Karl Beldan
@ 2013-11-20 14:04 ` Felix Fietkau
2013-11-20 14:50 ` Karl Beldan
0 siblings, 1 reply; 14+ messages in thread
From: Felix Fietkau @ 2013-11-20 14:04 UTC (permalink / raw)
To: Karl Beldan; +Cc: Johannes Berg, linux-wireless
On 2013-11-20 14:56, Karl Beldan wrote:
> On Wed, Nov 20, 2013 at 08:32:32AM +0100, Felix Fietkau wrote:
>> On 2013-11-20 01:51, Karl Beldan wrote:
>> > From: Karl Beldan <karl.beldan@rivierawaves.com>
>> >
>> > Commit 3e8b1eb "mac80211/minstrel_ht: improve rate selection stability"
>> > introduced a local capped prob in minstrel_ht_calc_tp but omitted to use
>> > it to compute the rate throughput.
>> >
>> > Signed-off-by: Karl Beldan <karl.beldan@rivierawaves.com>
>> > CC: Felix Fietkau <nbd@openwrt.org>
>> Nice catch!
>> Acked-by: Felix Fietkau <nbd@openwrt.org>
>>
> Interestingly enough, consecutive coding rates (5/6, 3/4, 2/3) max ratio
> is 9/10, did you do it on purpose ? (e.g. (9/10) * (5/6) == 3/4,
> (9/10) * (3/4) == 2/3 + 11/120).
The change has nothing to do with coding rates, it's only about
retransmissions caused by collisions under load.
- Felix
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] mac80211: use capped prob when computing throughputs
2013-11-20 14:04 ` Felix Fietkau
@ 2013-11-20 14:50 ` Karl Beldan
2013-11-20 15:49 ` Felix Fietkau
0 siblings, 1 reply; 14+ messages in thread
From: Karl Beldan @ 2013-11-20 14:50 UTC (permalink / raw)
To: Felix Fietkau; +Cc: Johannes Berg, linux-wireless
On Wed, Nov 20, 2013 at 03:04:34PM +0100, Felix Fietkau wrote:
> On 2013-11-20 14:56, Karl Beldan wrote:
> > On Wed, Nov 20, 2013 at 08:32:32AM +0100, Felix Fietkau wrote:
> >> On 2013-11-20 01:51, Karl Beldan wrote:
> >> > From: Karl Beldan <karl.beldan@rivierawaves.com>
> >> >
> >> > Commit 3e8b1eb "mac80211/minstrel_ht: improve rate selection stability"
> >> > introduced a local capped prob in minstrel_ht_calc_tp but omitted to use
> >> > it to compute the rate throughput.
> >> >
> >> > Signed-off-by: Karl Beldan <karl.beldan@rivierawaves.com>
> >> > CC: Felix Fietkau <nbd@openwrt.org>
> >> Nice catch!
> >> Acked-by: Felix Fietkau <nbd@openwrt.org>
> >>
> > Interestingly enough, consecutive coding rates (5/6, 3/4, 2/3) max ratio
> > is 9/10, did you do it on purpose ? (e.g. (9/10) * (5/6) == 3/4,
> > (9/10) * (3/4) == 2/3 + 11/120).
> The change has nothing to do with coding rates, it's only about
> retransmissions caused by collisions under load.
>
I understand this, my point was that along with this comes the following:
let's say my SNR is just not so good to get 5/6 as good as 3/4, and e.g.
case1 htMCS7 has 91%
htMCS6 has 100% success
case2 htMCS7 has 80%
htMCS6 has 100% success
capping at 90% will prefer htMCS7 in case1 and htMCS6 in case2 both
achieving best real throughput.
capping at 80% will prefer htMCS7 in case1 _but_ htMCS7 in case2 the
latter being the worst real throughput(90% of 5/6 == 100% of 3/4 > 80%
of 5/6).
Karl
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] mac80211: use capped prob when computing throughputs
2013-11-20 14:50 ` Karl Beldan
@ 2013-11-20 15:49 ` Felix Fietkau
2013-11-20 16:19 ` Karl Beldan
0 siblings, 1 reply; 14+ messages in thread
From: Felix Fietkau @ 2013-11-20 15:49 UTC (permalink / raw)
To: Karl Beldan; +Cc: Johannes Berg, linux-wireless
On 2013-11-20 15:50, Karl Beldan wrote:
> On Wed, Nov 20, 2013 at 03:04:34PM +0100, Felix Fietkau wrote:
>> On 2013-11-20 14:56, Karl Beldan wrote:
>> > On Wed, Nov 20, 2013 at 08:32:32AM +0100, Felix Fietkau wrote:
>> >> On 2013-11-20 01:51, Karl Beldan wrote:
>> >> > From: Karl Beldan <karl.beldan@rivierawaves.com>
>> >> >
>> >> > Commit 3e8b1eb "mac80211/minstrel_ht: improve rate selection stability"
>> >> > introduced a local capped prob in minstrel_ht_calc_tp but omitted to use
>> >> > it to compute the rate throughput.
>> >> >
>> >> > Signed-off-by: Karl Beldan <karl.beldan@rivierawaves.com>
>> >> > CC: Felix Fietkau <nbd@openwrt.org>
>> >> Nice catch!
>> >> Acked-by: Felix Fietkau <nbd@openwrt.org>
>> >>
>> > Interestingly enough, consecutive coding rates (5/6, 3/4, 2/3) max ratio
>> > is 9/10, did you do it on purpose ? (e.g. (9/10) * (5/6) == 3/4,
>> > (9/10) * (3/4) == 2/3 + 11/120).
>> The change has nothing to do with coding rates, it's only about
>> retransmissions caused by collisions under load.
>>
> I understand this, my point was that along with this comes the following:
> let's say my SNR is just not so good to get 5/6 as good as 3/4, and e.g.
> case1 htMCS7 has 91%
> htMCS6 has 100% success
> case2 htMCS7 has 80%
> htMCS6 has 100% success
> capping at 90% will prefer htMCS7 in case1 and htMCS6 in case2 both
> achieving best real throughput.
> capping at 80% will prefer htMCS7 in case1 _but_ htMCS7 in case2 the
> latter being the worst real throughput(90% of 5/6 == 100% of 3/4 > 80%
> of 5/6).
Not sure if that's a meaningful comparison at all - you're leaving out
the per-packet overhead, which is important for the throughput
calculation as well.
- Felix
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] mac80211: use capped prob when computing throughputs
2013-11-20 15:49 ` Felix Fietkau
@ 2013-11-20 16:19 ` Karl Beldan
2013-11-20 17:32 ` Felix Fietkau
0 siblings, 1 reply; 14+ messages in thread
From: Karl Beldan @ 2013-11-20 16:19 UTC (permalink / raw)
To: Felix Fietkau; +Cc: Johannes Berg, linux-wireless
On Wed, Nov 20, 2013 at 04:49:55PM +0100, Felix Fietkau wrote:
> On 2013-11-20 15:50, Karl Beldan wrote:
> > On Wed, Nov 20, 2013 at 03:04:34PM +0100, Felix Fietkau wrote:
> >> On 2013-11-20 14:56, Karl Beldan wrote:
> >> > On Wed, Nov 20, 2013 at 08:32:32AM +0100, Felix Fietkau wrote:
> >> >> On 2013-11-20 01:51, Karl Beldan wrote:
> >> >> > From: Karl Beldan <karl.beldan@rivierawaves.com>
> >> >> >
> >> >> > Commit 3e8b1eb "mac80211/minstrel_ht: improve rate selection stability"
> >> >> > introduced a local capped prob in minstrel_ht_calc_tp but omitted to use
> >> >> > it to compute the rate throughput.
> >> >> >
> >> >> > Signed-off-by: Karl Beldan <karl.beldan@rivierawaves.com>
> >> >> > CC: Felix Fietkau <nbd@openwrt.org>
> >> >> Nice catch!
> >> >> Acked-by: Felix Fietkau <nbd@openwrt.org>
> >> >>
> >> > Interestingly enough, consecutive coding rates (5/6, 3/4, 2/3) max ratio
> >> > is 9/10, did you do it on purpose ? (e.g. (9/10) * (5/6) == 3/4,
> >> > (9/10) * (3/4) == 2/3 + 11/120).
> >> The change has nothing to do with coding rates, it's only about
> >> retransmissions caused by collisions under load.
> >>
> > I understand this, my point was that along with this comes the following:
> > let's say my SNR is just not so good to get 5/6 as good as 3/4, and e.g.
> > case1 htMCS7 has 91%
> > htMCS6 has 100% success
> > case2 htMCS7 has 80%
> > htMCS6 has 100% success
> > capping at 90% will prefer htMCS7 in case1 and htMCS6 in case2 both
> > achieving best real throughput.
> > capping at 80% will prefer htMCS7 in case1 _but_ htMCS7 in case2 the
> > latter being the worst real throughput(90% of 5/6 == 100% of 3/4 > 80%
> > of 5/6).
> Not sure if that's a meaningful comparison at all - you're leaving out
> the per-packet overhead, which is important for the throughput
> calculation as well.
>
The overhead breaks these numbers but the more we aggregate the more
this math is realistic as then the rates converge to these numbers ..
plus, IMHO using the overhead for throughput is wasteful since
throughputs are ranked and used relatively to each others and overhead
is shared by all rates.
Karl
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] mac80211: use capped prob when computing throughputs
2013-11-20 7:32 ` Felix Fietkau
2013-11-20 13:56 ` Karl Beldan
@ 2013-11-20 16:57 ` Felix Fietkau
2013-11-20 17:03 ` Karl Beldan
2013-11-20 17:04 ` Karl Beldan
1 sibling, 2 replies; 14+ messages in thread
From: Felix Fietkau @ 2013-11-20 16:57 UTC (permalink / raw)
To: Karl Beldan, Johannes Berg; +Cc: linux-wireless, Karl Beldan
On 2013-11-20 08:32, Felix Fietkau wrote:
> On 2013-11-20 01:51, Karl Beldan wrote:
>> From: Karl Beldan <karl.beldan@rivierawaves.com>
>>
>> Commit 3e8b1eb "mac80211/minstrel_ht: improve rate selection stability"
>> introduced a local capped prob in minstrel_ht_calc_tp but omitted to use
>> it to compute the rate throughput.
>>
>> Signed-off-by: Karl Beldan <karl.beldan@rivierawaves.com>
>> CC: Felix Fietkau <nbd@openwrt.org>
> Nice catch!
> Acked-by: Felix Fietkau <nbd@openwrt.org>
Sorry, I need to revoke that ACK - there's a bug in this patch:
> - tp = 1000000 * ((mr->probability * 1000) / nsecs);
> + tp = 1000000 * (prob * 1000) / nsecs;
Removing the outer () is wrong, it leads to overflow that makes all
throughput values 0.
- Felix
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] mac80211: use capped prob when computing throughputs
2013-11-20 16:57 ` Felix Fietkau
@ 2013-11-20 17:03 ` Karl Beldan
2013-11-20 17:04 ` Karl Beldan
1 sibling, 0 replies; 14+ messages in thread
From: Karl Beldan @ 2013-11-20 17:03 UTC (permalink / raw)
To: Felix Fietkau; +Cc: Johannes Berg, linux-wireless, Karl Beldan
On Wed, Nov 20, 2013 at 05:57:06PM +0100, Felix Fietkau wrote:
> On 2013-11-20 08:32, Felix Fietkau wrote:
> > On 2013-11-20 01:51, Karl Beldan wrote:
> >> From: Karl Beldan <karl.beldan@rivierawaves.com>
> >>
> >> Commit 3e8b1eb "mac80211/minstrel_ht: improve rate selection stability"
> >> introduced a local capped prob in minstrel_ht_calc_tp but omitted to use
> >> it to compute the rate throughput.
> >>
> >> Signed-off-by: Karl Beldan <karl.beldan@rivierawaves.com>
> >> CC: Felix Fietkau <nbd@openwrt.org>
> > Nice catch!
> > Acked-by: Felix Fietkau <nbd@openwrt.org>
> Sorry, I need to revoke that ACK - there's a bug in this patch:
>
> > - tp = 1000000 * ((mr->probability * 1000) / nsecs);
> > + tp = 1000000 * (prob * 1000) / nsecs;
> Removing the outer () is wrong, it leads to overflow that makes all
> throughput values 0.
>
Arf, totally, the worst part is that I did know I had to keep them.
Karl
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] mac80211: use capped prob when computing throughputs
2013-11-20 16:57 ` Felix Fietkau
2013-11-20 17:03 ` Karl Beldan
@ 2013-11-20 17:04 ` Karl Beldan
2013-11-20 17:37 ` Felix Fietkau
1 sibling, 1 reply; 14+ messages in thread
From: Karl Beldan @ 2013-11-20 17:04 UTC (permalink / raw)
To: Felix Fietkau; +Cc: Johannes Berg, linux-wireless, Karl Beldan
On Wed, Nov 20, 2013 at 05:57:06PM +0100, Felix Fietkau wrote:
> On 2013-11-20 08:32, Felix Fietkau wrote:
> > On 2013-11-20 01:51, Karl Beldan wrote:
> >> From: Karl Beldan <karl.beldan@rivierawaves.com>
> >>
> >> Commit 3e8b1eb "mac80211/minstrel_ht: improve rate selection stability"
> >> introduced a local capped prob in minstrel_ht_calc_tp but omitted to use
> >> it to compute the rate throughput.
> >>
> >> Signed-off-by: Karl Beldan <karl.beldan@rivierawaves.com>
> >> CC: Felix Fietkau <nbd@openwrt.org>
> > Nice catch!
> > Acked-by: Felix Fietkau <nbd@openwrt.org>
> Sorry, I need to revoke that ACK - there's a bug in this patch:
>
> > - tp = 1000000 * ((mr->probability * 1000) / nsecs);
> > + tp = 1000000 * (prob * 1000) / nsecs;
> Removing the outer () is wrong, it leads to overflow that makes all
> throughput values 0.
>
Do you handle this one or I resend ?
Karl
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] mac80211: use capped prob when computing throughputs
2013-11-20 16:19 ` Karl Beldan
@ 2013-11-20 17:32 ` Felix Fietkau
2013-11-20 17:53 ` Karl Beldan
0 siblings, 1 reply; 14+ messages in thread
From: Felix Fietkau @ 2013-11-20 17:32 UTC (permalink / raw)
To: Karl Beldan; +Cc: Johannes Berg, linux-wireless
On 2013-11-20 17:19, Karl Beldan wrote:
> On Wed, Nov 20, 2013 at 04:49:55PM +0100, Felix Fietkau wrote:
>> On 2013-11-20 15:50, Karl Beldan wrote:
>> > On Wed, Nov 20, 2013 at 03:04:34PM +0100, Felix Fietkau wrote:
>> >> On 2013-11-20 14:56, Karl Beldan wrote:
>> >> > On Wed, Nov 20, 2013 at 08:32:32AM +0100, Felix Fietkau wrote:
>> >> >> On 2013-11-20 01:51, Karl Beldan wrote:
>> >> >> > From: Karl Beldan <karl.beldan@rivierawaves.com>
>> >> >> >
>> >> >> > Commit 3e8b1eb "mac80211/minstrel_ht: improve rate selection stability"
>> >> >> > introduced a local capped prob in minstrel_ht_calc_tp but omitted to use
>> >> >> > it to compute the rate throughput.
>> >> >> >
>> >> >> > Signed-off-by: Karl Beldan <karl.beldan@rivierawaves.com>
>> >> >> > CC: Felix Fietkau <nbd@openwrt.org>
>> >> >> Nice catch!
>> >> >> Acked-by: Felix Fietkau <nbd@openwrt.org>
>> >> >>
>> >> > Interestingly enough, consecutive coding rates (5/6, 3/4, 2/3) max ratio
>> >> > is 9/10, did you do it on purpose ? (e.g. (9/10) * (5/6) == 3/4,
>> >> > (9/10) * (3/4) == 2/3 + 11/120).
>> >> The change has nothing to do with coding rates, it's only about
>> >> retransmissions caused by collisions under load.
>> >>
>> > I understand this, my point was that along with this comes the following:
>> > let's say my SNR is just not so good to get 5/6 as good as 3/4, and e.g.
>> > case1 htMCS7 has 91%
>> > htMCS6 has 100% success
>> > case2 htMCS7 has 80%
>> > htMCS6 has 100% success
>> > capping at 90% will prefer htMCS7 in case1 and htMCS6 in case2 both
>> > achieving best real throughput.
>> > capping at 80% will prefer htMCS7 in case1 _but_ htMCS7 in case2 the
>> > latter being the worst real throughput(90% of 5/6 == 100% of 3/4 > 80%
>> > of 5/6).
>> Not sure if that's a meaningful comparison at all - you're leaving out
>> the per-packet overhead, which is important for the throughput
>> calculation as well.
>>
> The overhead breaks these numbers but the more we aggregate the more
> this math is realistic as then the rates converge to these numbers ..
> plus, IMHO using the overhead for throughput is wasteful since
> throughputs are ranked and used relatively to each others and overhead
> is shared by all rates.
The throughput metric (as displayed in debugfs) is calculated as:
tp = 10 ms * prob / (overhead_time / ampdu_len + packet_tx_time)
When you have two rates that are relatively close to each other, and the
faster rate is less reliable than the slower one, the throughput metric
can prefer the slower rate without aggregation, and the faster one with
aggregation.
The overhead may be shared between all rates, but that doesn't mean it
does not affect the relative comparison between rates.
- Felix
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] mac80211: use capped prob when computing throughputs
2013-11-20 17:04 ` Karl Beldan
@ 2013-11-20 17:37 ` Felix Fietkau
0 siblings, 0 replies; 14+ messages in thread
From: Felix Fietkau @ 2013-11-20 17:37 UTC (permalink / raw)
To: Karl Beldan; +Cc: Johannes Berg, linux-wireless, Karl Beldan
On 2013-11-20 18:04, Karl Beldan wrote:
> On Wed, Nov 20, 2013 at 05:57:06PM +0100, Felix Fietkau wrote:
>> On 2013-11-20 08:32, Felix Fietkau wrote:
>> > On 2013-11-20 01:51, Karl Beldan wrote:
>> >> From: Karl Beldan <karl.beldan@rivierawaves.com>
>> >>
>> >> Commit 3e8b1eb "mac80211/minstrel_ht: improve rate selection stability"
>> >> introduced a local capped prob in minstrel_ht_calc_tp but omitted to use
>> >> it to compute the rate throughput.
>> >>
>> >> Signed-off-by: Karl Beldan <karl.beldan@rivierawaves.com>
>> >> CC: Felix Fietkau <nbd@openwrt.org>
>> > Nice catch!
>> > Acked-by: Felix Fietkau <nbd@openwrt.org>
>> Sorry, I need to revoke that ACK - there's a bug in this patch:
>>
>> > - tp = 1000000 * ((mr->probability * 1000) / nsecs);
>> > + tp = 1000000 * (prob * 1000) / nsecs;
>> Removing the outer () is wrong, it leads to overflow that makes all
>> throughput values 0.
>>
> Do you handle this one or I resend ?
Please resend.
- Felix
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] mac80211: use capped prob when computing throughputs
2013-11-20 17:32 ` Felix Fietkau
@ 2013-11-20 17:53 ` Karl Beldan
2013-11-20 18:24 ` Felix Fietkau
0 siblings, 1 reply; 14+ messages in thread
From: Karl Beldan @ 2013-11-20 17:53 UTC (permalink / raw)
To: Felix Fietkau; +Cc: Johannes Berg, linux-wireless
On Wed, Nov 20, 2013 at 06:32:57PM +0100, Felix Fietkau wrote:
> On 2013-11-20 17:19, Karl Beldan wrote:
> > On Wed, Nov 20, 2013 at 04:49:55PM +0100, Felix Fietkau wrote:
> >> On 2013-11-20 15:50, Karl Beldan wrote:
> >> > On Wed, Nov 20, 2013 at 03:04:34PM +0100, Felix Fietkau wrote:
> >> >> On 2013-11-20 14:56, Karl Beldan wrote:
> >> >> > On Wed, Nov 20, 2013 at 08:32:32AM +0100, Felix Fietkau wrote:
> >> >> >> On 2013-11-20 01:51, Karl Beldan wrote:
> >> >> >> > From: Karl Beldan <karl.beldan@rivierawaves.com>
> >> >> >> >
> >> >> >> > Commit 3e8b1eb "mac80211/minstrel_ht: improve rate selection stability"
> >> >> >> > introduced a local capped prob in minstrel_ht_calc_tp but omitted to use
> >> >> >> > it to compute the rate throughput.
> >> >> >> >
> >> >> >> > Signed-off-by: Karl Beldan <karl.beldan@rivierawaves.com>
> >> >> >> > CC: Felix Fietkau <nbd@openwrt.org>
> >> >> >> Nice catch!
> >> >> >> Acked-by: Felix Fietkau <nbd@openwrt.org>
> >> >> >>
> >> >> > Interestingly enough, consecutive coding rates (5/6, 3/4, 2/3) max ratio
> >> >> > is 9/10, did you do it on purpose ? (e.g. (9/10) * (5/6) == 3/4,
> >> >> > (9/10) * (3/4) == 2/3 + 11/120).
> >> >> The change has nothing to do with coding rates, it's only about
> >> >> retransmissions caused by collisions under load.
> >> >>
> >> > I understand this, my point was that along with this comes the following:
> >> > let's say my SNR is just not so good to get 5/6 as good as 3/4, and e.g.
> >> > case1 htMCS7 has 91%
> >> > htMCS6 has 100% success
> >> > case2 htMCS7 has 80%
> >> > htMCS6 has 100% success
> >> > capping at 90% will prefer htMCS7 in case1 and htMCS6 in case2 both
> >> > achieving best real throughput.
> >> > capping at 80% will prefer htMCS7 in case1 _but_ htMCS7 in case2 the
> >> > latter being the worst real throughput(90% of 5/6 == 100% of 3/4 > 80%
> >> > of 5/6).
> >> Not sure if that's a meaningful comparison at all - you're leaving out
> >> the per-packet overhead, which is important for the throughput
> >> calculation as well.
> >>
> > The overhead breaks these numbers but the more we aggregate the more
> > this math is realistic as then the rates converge to these numbers ..
> > plus, IMHO using the overhead for throughput is wasteful since
> > throughputs are ranked and used relatively to each others and overhead
> > is shared by all rates.
> The throughput metric (as displayed in debugfs) is calculated as:
> tp = 10 ms * prob / (overhead_time / ampdu_len + packet_tx_time)
>
> When you have two rates that are relatively close to each other, and the
> faster rate is less reliable than the slower one, the throughput metric
> can prefer the slower rate without aggregation, and the faster one with
> aggregation.
>
> The overhead may be shared between all rates, but that doesn't mean it
> does not affect the relative comparison between rates.
>
I did not say the overhead doesn't affect the relative comparison.
ampdu_len and overhead_time are shared by all the rates, what's the
purpose of computing overhead_time then ? since the rate selection is
only mere comparison of the said computed tps.
Karl
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] mac80211: use capped prob when computing throughputs
2013-11-20 17:53 ` Karl Beldan
@ 2013-11-20 18:24 ` Felix Fietkau
0 siblings, 0 replies; 14+ messages in thread
From: Felix Fietkau @ 2013-11-20 18:24 UTC (permalink / raw)
To: Karl Beldan; +Cc: Johannes Berg, linux-wireless
On 2013-11-20 18:53, Karl Beldan wrote:
> On Wed, Nov 20, 2013 at 06:32:57PM +0100, Felix Fietkau wrote:
>> On 2013-11-20 17:19, Karl Beldan wrote:
>> > On Wed, Nov 20, 2013 at 04:49:55PM +0100, Felix Fietkau wrote:
>> >> On 2013-11-20 15:50, Karl Beldan wrote:
>> >> > On Wed, Nov 20, 2013 at 03:04:34PM +0100, Felix Fietkau wrote:
>> >> >> On 2013-11-20 14:56, Karl Beldan wrote:
>> >> >> > On Wed, Nov 20, 2013 at 08:32:32AM +0100, Felix Fietkau wrote:
>> >> >> >> On 2013-11-20 01:51, Karl Beldan wrote:
>> >> >> >> > From: Karl Beldan <karl.beldan@rivierawaves.com>
>> >> >> >> >
>> >> >> >> > Commit 3e8b1eb "mac80211/minstrel_ht: improve rate selection stability"
>> >> >> >> > introduced a local capped prob in minstrel_ht_calc_tp but omitted to use
>> >> >> >> > it to compute the rate throughput.
>> >> >> >> >
>> >> >> >> > Signed-off-by: Karl Beldan <karl.beldan@rivierawaves.com>
>> >> >> >> > CC: Felix Fietkau <nbd@openwrt.org>
>> >> >> >> Nice catch!
>> >> >> >> Acked-by: Felix Fietkau <nbd@openwrt.org>
>> >> >> >>
>> >> >> > Interestingly enough, consecutive coding rates (5/6, 3/4, 2/3) max ratio
>> >> >> > is 9/10, did you do it on purpose ? (e.g. (9/10) * (5/6) == 3/4,
>> >> >> > (9/10) * (3/4) == 2/3 + 11/120).
>> >> >> The change has nothing to do with coding rates, it's only about
>> >> >> retransmissions caused by collisions under load.
>> >> >>
>> >> > I understand this, my point was that along with this comes the following:
>> >> > let's say my SNR is just not so good to get 5/6 as good as 3/4, and e.g.
>> >> > case1 htMCS7 has 91%
>> >> > htMCS6 has 100% success
>> >> > case2 htMCS7 has 80%
>> >> > htMCS6 has 100% success
>> >> > capping at 90% will prefer htMCS7 in case1 and htMCS6 in case2 both
>> >> > achieving best real throughput.
>> >> > capping at 80% will prefer htMCS7 in case1 _but_ htMCS7 in case2 the
>> >> > latter being the worst real throughput(90% of 5/6 == 100% of 3/4 > 80%
>> >> > of 5/6).
>> >> Not sure if that's a meaningful comparison at all - you're leaving out
>> >> the per-packet overhead, which is important for the throughput
>> >> calculation as well.
>> >>
>> > The overhead breaks these numbers but the more we aggregate the more
>> > this math is realistic as then the rates converge to these numbers ..
>> > plus, IMHO using the overhead for throughput is wasteful since
>> > throughputs are ranked and used relatively to each others and overhead
>> > is shared by all rates.
>> The throughput metric (as displayed in debugfs) is calculated as:
>> tp = 10 ms * prob / (overhead_time / ampdu_len + packet_tx_time)
>>
>> When you have two rates that are relatively close to each other, and the
>> faster rate is less reliable than the slower one, the throughput metric
>> can prefer the slower rate without aggregation, and the faster one with
>> aggregation.
>>
>> The overhead may be shared between all rates, but that doesn't mean it
>> does not affect the relative comparison between rates.
>>
> I did not say the overhead doesn't affect the relative comparison.
> ampdu_len and overhead_time are shared by all the rates, what's the
> purpose of computing overhead_time then ? since the rate selection is
> only mere comparison of the said computed tps.
Right, I guess we could add a mi->overhead_ampdu that gets adjusted
based on the average ampdu length before recalculating all rates.
- Felix
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2013-11-20 18:24 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-20 0:51 [PATCH] mac80211: use capped prob when computing throughputs Karl Beldan
2013-11-20 7:32 ` Felix Fietkau
2013-11-20 13:56 ` Karl Beldan
2013-11-20 14:04 ` Felix Fietkau
2013-11-20 14:50 ` Karl Beldan
2013-11-20 15:49 ` Felix Fietkau
2013-11-20 16:19 ` Karl Beldan
2013-11-20 17:32 ` Felix Fietkau
2013-11-20 17:53 ` Karl Beldan
2013-11-20 18:24 ` Felix Fietkau
2013-11-20 16:57 ` Felix Fietkau
2013-11-20 17:03 ` Karl Beldan
2013-11-20 17:04 ` Karl Beldan
2013-11-20 17:37 ` Felix Fietkau
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox