Thursday, February 2, 2012

Difference between MPDU, MSDU, AMPDU, and AMSDU in 802.11n and 802.11ac

Difference in implementation:
If we see the packet being handed from the IP layer to the MAC layer the following sequence of processing is seen. The packet goes from the IP layer to the MAC-llc (logical link control layer) or the upper MAC. This is also called as the MAC service access point (MAC-SAP).

MSDU: Is the MAC service data unit. This is the unit of transmission used at the MAC layer which is received from the upper layer.

AMSDU: Aggregation of the  MSDUs directly performed at the MAC layer is called an AMSDU [2]. Such AMSDU's are now passed to the lower PHY layer, where they are dealt with as MPDUs. Multiple MSDUs are aggregated at the MAC layer and pushed into a single MPDU (which is pushed to the PHY). They have a single frame header with multiple frames, and they are destined for the same client and the same service class. (Basically they all have the same TiD).
* The main motivation for aggregation at the MSDU layer is that: (1) Ethernet is the native frame format for most clients, (2) since the ethernet header is much smaller than the 802.11 header, we can combine multiple ethernet frames to form a single A-MSDU.

MPDU: MAC protocol data units are the frames passed from the MAC layers into the PHY layer.

AMPDU [1] : These are are the aggregated MPDU units which are pushed into a single PPDU (physical protocol data unit).  All frames will have a single PLCP header and preamble.

** The 802.11n system was designed so that either AMPDU, AMSDU or both aggregation algorithms could be used[3].

When do we want to use an A-MPDU and when do we want to use an A-MSDU:
Rather , the topic of this discussion should be why is AMPDU aggregation preferred over AMSDU aggregation most of the time. Or why most systems use AMPDU aggregation and not AMSDU aggregation.

A-MSDU increases the maximum frame transmission size from 2,304 bytes to almost 8k bytes (7935 to be exact) while A-MPDU allows up to 64k bytes.

However, the main problem with AMSDUs is that the entire blob becomes one MAC frame (or protocol data unit - PDU) and hence has only one CRC check. So as the frame size increase the probability of error increases. Since we have a single CRC check, we cannot retransmit a part of the AMSDU and in most cases this leads to re-transmission at lower rates which nullifies the benefit of aggregation. An AMPDU on the other hand consists of multiple PDUs each with their own CRCs. Hence, in the event of a failure, part of these can be retransmitted resulting in higher efficiency. However, this performance gain comes at a cost since now with every aggregate AMPDU we are sending MAC headers for all of the subframes.

Hence decision of using AMSDU versus AMPDU is a tradeoff between probability of error and retransmission costs in an AMSDU versus MAC frame header overheads in an aggregate with AMPDU. In most real world systems, the later wins, and hence most systems implement AMPDUs.

[1] Ginzburg et. al, "Performance Analysis of A-MPDU and A-MSDU Aggregation in IEEE 802.11n", 2007.
 [2] Gautam Bhanage,"AMSDU vs AMPDU: A Brief Tutorial on WiFi Aggregation Support", Report number: GDB2017-004, arXiv:1704.07015 [cs.NI], April 2017.
[3] IEEE 802.11 standard, "".


Mike said...

Thanks. You have a very interesting discussion on why AMPDU based aggregation is more popular than AMSDUs.

Mike said...

I hope this aggregation logic applies to 802.11ac APs.

Pravin Kumar said...

I feel that A-MSDU and A-MPDU attempt to optimize different overheads.

A-MSDU minimizes the MAC header overheads when the channel conditions are good. When channel conditions are not so good, A-MSDU gets hit (longer frames are more prone to channel errors) due to the need to retransmit the entire MSDUs within.

A-MPDU on the other hand, does not reduce MAC overheads. Instead it reduces the CSMA/CA access-specific overheads; those arising out of IFS, ACKs, DIFS and backoff. Since the MPDUs within an A-MPDU are independent, errors result in retransmission of only those MPDUs. However, the average overheads per MPDU (when using A-MPDU) due to net savings on CSMA/CA overheads (in both transmissions and retransmissions).

The best method would be to combine both A-MSDU and A-MPDU in the following way:
1. Use A-MPDU always to reduce CSMA/CA overheads and
2. A-MSDU only when the channel conditions allow low PERs.

Atmosphere said...

That is a very insight conclusion.
And 11n main achievement was most in killing overhead.

Anonymous said...
This comment has been removed by a blog administrator.
Anonymous said...

Really interesting informations. But what are "low PERs" in percent? I have usually error rates of less than 1% across my wifi devices. Only one or two has an error rate of 6%.

Can it be said that A-MSDU aggregation is only recommended when a direct visual contact between, for example, two WDS access points is guaranteed?

Newnes said...

I agree with the last point that the PERs are not very widely distributed and it may or may not be the best approach of deciding AMSDUs to be packed. However, clearly MSDU packing has a huge advantage when the MSDU sizes are small i.e. like 32bytes

Yipeediipee Doo said...

Interesting discussion and thanks for starting a much needed A-MSPDU and A-MPDU difference and help me understand the basic concept of this. I was using these features in Veriwave while running the throughput tests and wanted to find the basic reason for this. Your insight did help me clear some doubts and shed light in this domain. Thanks for sharing your knowledge !! Thanks !!

Anonymous said...

Thank you for an intuitive explanation of MPDU vs. MSDU and their aggregations!

GagnamStyle Linux said...

Thanks again, it is nice to see that there is a clear differentiation in doing one versus the other. I wonder if they do something similar in cellular networks.

michael huang said...

Thanks for sharing, so based on description above, it is possible to apply AMPDU over AMSDU to increase throughput if channel condition permits, right?

Kiran Babu said...

Is this AMSDU feature not going to contradict segmentation and reassembly feature of 802.11a/b?

Anonymous said...

Thank for the great explanation.

Deepu said...

Really good... Not alone the post but the comments too :)

freebee said...

AMSDU limite the number of mac address associated with me ?.
If not, who work this limit ?.

Anonymous said...

The references are pretty useful too. Thanks!

Post a Comment