CW Max
CWmax and the Exponential Backoff Ceiling
In a shared-medium wireless network, several radios may want the channel at the same instant. CSMA/CA manages this by forcing each station that finds the medium busy to wait a randomized number of idle slots before it transmits. That random number is drawn from the contention window, an integer range [0, CW]. The contention window starts small at CWmin so that lightly loaded networks have low access delay, then grows after every failed attempt to spread retransmissions out in time. CWmax is the hard ceiling on that growth: once the window reaches CWmax, further collisions no longer widen it.
The backoff procedure is a binary exponential algorithm. After the i-th consecutive failure the window is set to the smaller of CWmax and roughly twice the previous window plus one. Because the window is expressed as an inclusive count of slots, both CWmin and CWmax are always one less than a power of two (15, 31, 63, up to 1023). The station then picks a fresh uniform random backoff counter in [0, CW] and decrements it each time it senses the medium idle for one slot time. When the counter reaches zero, transmission begins. Freezing CW at CWmax prevents the window from diverging under heavy contention, which would otherwise stall the network entirely.
Tuning CWmax is a network-engineering decision. A high CWmax (1023) is appropriate for best-effort data in dense cells because the wide random range minimizes the chance that two stations choose the same slot. A low CWmax (7 to 15) is used for latency-sensitive access categories such as voice and video, where bounded jitter matters more than maximizing collision avoidance. The 802.11e EDCA framework exposes CWmin, CWmax, AIFSN, and TXOP per access category so that operators can shape this trade-off directly.
Backoff and Window Equations
CWi = min( 2i × (CWmin + 1) − 1, CWmax )
Random backoff counter:
Backoff = Uniform[0, CW] × aSlotTime
Mean backoff at the ceiling:
E[Backoff] ≈ (CWmax / 2) × aSlotTime
Where CWmin and CWmax are slot counts (one less than a power of two), i is the retry index, and aSlotTime is the PHY slot duration (9 μs for OFDM, 20 μs for DSSS). Example: CWmax = 1023, 9 μs slot → worst-case mean backoff ≈ 4.6 ms.
Standard CWmin / CWmax Values
| PHY / Access Category | CWmin (slots) | CWmax (slots) | aSlotTime | Typical Use |
|---|---|---|---|---|
| 802.11b (DSSS) | 31 | 1023 | 20 μs | Legacy 2.4 GHz data |
| 802.11a/g/n/ac/ax (OFDM) | 15 | 1023 | 9 μs | Best-effort data |
| EDCA AC_BK (background) | 15 | 1023 | 9 μs | Bulk / background |
| EDCA AC_BE (best effort) | 15 | 1023 | 9 μs | General traffic |
| EDCA AC_VI (video) | 7 | 15 | 9 μs | Streaming video |
| EDCA AC_VO (voice) | 3 | 7 | 9 μs | Latency-critical VoIP |
| 802.15.4 (Zigbee, slotted) | macMinBE 3 → 7 | macMaxBE 5 → 31 | 320 μs symbol-based | Low-rate IoT mesh |
Frequently Asked Questions
What are the default CWmin and CWmax values in 802.11?
Legacy DSSS/HR-DSSS (802.11b) uses CWmin = 31 and CWmax = 1023 slots; OFDM PHYs (a/g/n/ac/ax) use CWmin = 15 and CWmax = 1023. Under EDCA the values vary by access category: voice (AC_VO) uses CWmin = 3, CWmax = 7; video (AC_VI) uses 7 and 15; best-effort and background keep CWmax = 1023. CWmax is always one less than a power of two because the window is the inclusive slot range [0, CW].
How does the backoff window grow from CWmin to CWmax?
After each failed attempt the window roughly doubles via CWi = min(2i(CWmin+1) − 1, CWmax). From CWmin = 15 the sequence is 15, 31, 63, 127, 255, 511, 1023, then it clamps at CWmax = 1023 for every later retry. The station draws a fresh uniform backoff counter from [0, CW] and decrements once per idle slot. Freezing at CWmax bounds the worst-case mean backoff at CWmax/2 slots.
How does CWmax affect latency and throughput in a busy network?
A larger CWmax spreads retransmissions over more slots, cutting the collision probability under heavy contention and protecting aggregate throughput. The cost is higher, more variable access latency: the mean backoff approaches CWmax/2 slots, so at a 9 μs OFDM slot, CWmax = 1023 adds up to roughly 4.6 ms. Voice uses CWmax = 7 to keep jitter low; best-effort uses 1023 to maximize collision resilience.