bmx-routing / bmx7

BMX7 / SEMTOR Securely Entrusted Mesh Routing Protocol
GNU General Public License v2.0
63 stars 15 forks source link

RFC: add expected throughput as reported by minstrel(_ht) #12

Closed dangowrt closed 6 years ago

dangowrt commented 6 years ago

use libiwinfo to acquire the expected throughput with a specific link partner. store that information and make use of it in the bandwidth metrics.

dangowrt commented 6 years ago

@aparcar

aparcar commented 6 years ago

@axn ping

axn commented 6 years ago

I merged and extended your patches. But after several hours of testing I am not yet convenienced that expected throughput from minstrel(_ht) allows a better estimation than based on current tx rate (which also considers current broadcast link loss and a particular efficiency value. Therefore its now supported (by setting --linkThroughputEfficiency=70 or any value greater 0), but not enabled by default. Observed curiosities are:

dangowrt commented 6 years ago

I merged and extended your patches. But after a several hours of testing I not yet convenienced that expected throughput from minstrel(_ht) gives a better estimation than based on current tx rate (which also considers current broadcast link loss and a particular efficiency value. Therefore its now supported (by setting --linkThroughputEfficiency=70 or any value greater 0), but not enabled by default.

I reckon you tried this using a recent OpenWrt snapshot? Which hardware were you using? It only works nicely with ath5k, ath9k and mt76 as all other drivers don't implement rate selection in software. (And in theory rt2x00 as well, but that sucks anyway)

Observed curiosities are:

  • Sometimes (especially in weak link scenarios) obtained values are zero (bmx7 uses last non-zero value)

0 means that there has not been enough traffic for a sane estimation. We should fall back to SNR-based estimates in that case and/or generate some traffic.

  • Estimations are sometimes too optimistic and sometimes too pessimistic

In my experience the estimated throughput is quite precise after some traffic has gone over the link... If not, we should consider that a bug of mac80211, because those wrong estimates will then also affect rate selection and should be fixed.