2014-09-01 15:38:09

by Dani Camps

[permalink] [raw]
Subject: wmediumd performance penalty

Dear all,

I am testing a simple 1-hop mesh network over wmediumd. The PHY rate I
have configured is 54 Mbps, and there is no loss, however the max
throughput I get is around 14 Mbps. Without wmediumd I get around 30
Mbps, which seems reasonable given the 54 PHY rate. As I noted above
there is no loss probability configured in wmediumd.

My impression is that the performance drop is due to the overhead of
switching between kernel and user space in wmediumd, however it
surprises me that the penalty is so high.

Has anyone had a similar experience? Could there be a way to overcome
this bottleneck?

Best Regards

Daniel


2014-09-02 08:06:30

by Dani Camps

[permalink] [raw]
Subject: Re: wmediumd performance penalty

Hi,

OK, then the results I am getting are indeed surprising. To test
bandwidth I am using an iperf UDP transfer of 100Mbps and around 30
Mbps is all it gets (without wmediumd).

I will further test only mac80211_hwsim (without wmediumd), which I
believe can be used to set up topologies as well with the group
feature as described here:
https://github.com/cozybit/open80211s/wiki/HwsimTestTemplate

Best Regards

Daniel



On Tue, Sep 2, 2014 at 9:55 AM, Johannes Berg <[email protected]> wrote:
> On Tue, 2014-09-02 at 09:31 +0200, Dani Camps wrote:
>> Hi,
>>
>> I am running on a virtual machine with Ubuntu. Does mac80211_hwsim not
>> schedule the packet reception time to the other radio(s) according to
>> the PHY rate in the packet in order to simulate transmission time over
>> the air ?
>
> No, it schedules it immediately.
>
> johannes
>

2014-09-05 13:04:13

by Bob Copeland

[permalink] [raw]
Subject: Re: wmediumd performance penalty

On Tue, Sep 02, 2014 at 10:06:30AM +0200, Dani Camps wrote:
> Hi,
>
> OK, then the results I am getting are indeed surprising. To test
> bandwidth I am using an iperf UDP transfer of 100Mbps and around 30
> Mbps is all it gets (without wmediumd).
>
> I will further test only mac80211_hwsim (without wmediumd), which I
> believe can be used to set up topologies as well with the group
> feature as described here:
> https://github.com/cozybit/open80211s/wiki/HwsimTestTemplate

Indeed you can.

For what it's worth, although I can't speak for wmediumd at the moment,
in the precursor to it that I wrote, I got about 25 Mbps achieved with
a phy rate of 54 Mbps when simulating the physical layer, which I think
is pretty close to real world overhead in non-agg case. With plain old
mac80211_hwsim you can get several Gbps.

--
Bob Copeland %% http://www.bobcopeland.com

2014-09-01 18:52:19

by Johannes Berg

[permalink] [raw]
Subject: Re: wmediumd performance penalty

On Mon, 2014-09-01 at 17:38 +0200, Dani Camps wrote:
> Dear all,
>
> I am testing a simple 1-hop mesh network over wmediumd. The PHY rate I
> have configured is 54 Mbps, and there is no loss, however the max
> throughput I get is around 14 Mbps. Without wmediumd I get around 30
> Mbps, which seems reasonable given the 54 PHY rate. As I noted above
> there is no loss probability configured in wmediumd.
>
> My impression is that the performance drop is due to the overhead of
> switching between kernel and user space in wmediumd, however it
> surprises me that the penalty is so high.
>
> Has anyone had a similar experience? Could there be a way to overcome
> this bottleneck?

What kind of system are you running on? The virtual PHY rate isn't taken
into account at all, so you should see far higher performance.

johannes


2014-09-08 13:03:09

by Bob Copeland

[permalink] [raw]
Subject: Re: wmediumd performance penalty

On Sat, Sep 06, 2014 at 10:17:34AM +0200, Dani Camps wrote:
> Hi Bob,
>
> Our use case is that we have some research code implemented on mac80211,
> and we want to test it over a virtual testbed with wmediumd before going on
> real hw. Being able to have realistic radio capacities would help us in our
> testing.

Ok, I see. Well, I started poking at wmediumd code a bit this weekend,
and I have in mind a rewrite that would do what you want, and also do
it properly unlike my other hack. I'll let you know when I have something
working or you can ping me off-list if you want to talk more about it.

--
Bob Copeland %% http://www.bobcopeland.com

2014-09-02 07:55:21

by Johannes Berg

[permalink] [raw]
Subject: Re: wmediumd performance penalty

On Tue, 2014-09-02 at 09:31 +0200, Dani Camps wrote:
> Hi,
>
> I am running on a virtual machine with Ubuntu. Does mac80211_hwsim not
> schedule the packet reception time to the other radio(s) according to
> the PHY rate in the packet in order to simulate transmission time over
> the air ?

No, it schedules it immediately.

johannes


2014-09-02 07:31:58

by Dani Camps

[permalink] [raw]
Subject: Re: wmediumd performance penalty

Hi,

I am running on a virtual machine with Ubuntu. Does mac80211_hwsim not
schedule the packet reception time to the other radio(s) according to
the PHY rate in the packet in order to simulate transmission time over
the air ?

Best Regards

Daniel

On Mon, Sep 1, 2014 at 8:52 PM, Johannes Berg <[email protected]> wrote:
> On Mon, 2014-09-01 at 17:38 +0200, Dani Camps wrote:
>> Dear all,
>>
>> I am testing a simple 1-hop mesh network over wmediumd. The PHY rate I
>> have configured is 54 Mbps, and there is no loss, however the max
>> throughput I get is around 14 Mbps. Without wmediumd I get around 30
>> Mbps, which seems reasonable given the 54 PHY rate. As I noted above
>> there is no loss probability configured in wmediumd.
>>
>> My impression is that the performance drop is due to the overhead of
>> switching between kernel and user space in wmediumd, however it
>> surprises me that the penalty is so high.
>>
>> Has anyone had a similar experience? Could there be a way to overcome
>> this bottleneck?
>
> What kind of system are you running on? The virtual PHY rate isn't taken
> into account at all, so you should see far higher performance.
>
> johannes
>

2014-09-05 14:11:27

by Bob Copeland

[permalink] [raw]
Subject: Re: wmediumd performance penalty

On Fri, Sep 05, 2014 at 09:03:25AM -0400, Bob Copeland wrote:
> Indeed you can.
>
> For what it's worth, although I can't speak for wmediumd at the moment,
> in the precursor to it that I wrote, I got about 25 Mbps achieved with
> a phy rate of 54 Mbps when simulating the physical layer, which I think
> is pretty close to real world overhead in non-agg case. With plain old
> mac80211_hwsim you can get several Gbps.

Sort of - it relied on a different hwsim interface than what made it
upstream, and was for a one-off investigation, so it's mostly useless.
Code is here though:

http://bobcopeland.com/srcs/wifi_sim.tar.gz

Glancing at the wmediumd code again, it doesn't try to simulate airtime
either, just does some loss reporting. Do you have a use-case which
needs the airtime simulation?

A while ago, I rewrote my PER computations in C instead of pre-generating
them from matlab into a huge lookup table (see per.c):

https://github.com/bcopeland/wmediumd/tree/add_per_model

So, I'd be interested in hooking that up and throwing a scheduler into
wmediumd to optionally simulate airtime.

--
Bob Copeland %% http://www.bobcopeland.com