aboutsummaryrefslogtreecommitdiffstats
path: root/src/gprs_ms.h
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-07-17 16:39:09 +0200
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-07-21 19:22:36 +0200
commitd4ad731baecb1993481941b0cbb6b6d512708572 (patch)
tree1f2b8ecc13a1dd0462fb4a60187a396b009b377b /src/gprs_ms.h
parent4f666bc1136eb581d11dc47741928725c76b09c6 (diff)
llc: Use CoDel to drop packages from the LLC queue
Currently packets are only dropped if they have reached their maximum life time. This leads to LLC queues being constantly filled under load, increasing the latency up to the maximum life time. This kind of bufferbloat hinders TCP's congestion avoidance algorithms. To keep the queues short, the CoDel active queue management algorithm can be used. This commit changes to llc_dequeue method to apply the CoDel algorithm to selectively drop LLC frames before they passed to the TBF layer to be encoded in BSNs. This feature is currently disabled by default. The CoDel state is managed per MS since the LLC queues are also kept in the MS objects. Note that there is still some buffering in the TBF objects, in the worst case (CS4) 3.5kByte + LLC-MTU octets are stored there. The resulting additional packet delay is not (yet) taken into account for CoDel. Also note that configuration changes are applied to new MS objects only. The following VTY commands are added to the 'pcu' node: - queue codel activates CoDel, the interval is selected by the implementation - queue codel interval <1-1000> activates CoDel with a fixed interval given in centiseconds (10ms-10s) - no queue codel deactivates CoDel Which interval value to use is still an open issue. For high speed links (e.g. Ethernet), CoDel suggests 100ms. For slower links, the expected RTT is recommended. The current implementation uses a default value of 2000ms. Measurements: Note that the following measurements depend on several other factors, most notably the interaction with the SGSN's flow control. They are just examples to give an idea how CoDel might influence some parameters. The measurements have been done with a single E71, first with a running ping only (Idle), then with an additional TCP download of a 360k file (Busy). The CoDel interval was set to 1s. - Idle : ping ~400ms, avg queue delay 0ms, dropped 0 - Busy, No CoDel: ping ~6s, avg queue delay 4-6s, dropped 0, scheduled 948, duration 54s - Busy, CoDel: ping 500-1500ms, avg queue delay ~600ms, dropped 77, scheduled 1040, duration 60s More measurements with two MS downloading in parallel (two independant measurements per case). - Busy, No CoDel: dropped 0, scheduled 1883, duration 121s dropped 19, scheduled 2003, duration 133s - Busy, CoDel: dropped 22, scheduled 1926, duration 116s dropped 22, scheduled 1955, duration 108s Sponsored-by: On-Waves ehf
Diffstat (limited to 'src/gprs_ms.h')
-rw-r--r--src/gprs_ms.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gprs_ms.h b/src/gprs_ms.h
index 1a135cbb..185ffd23 100644
--- a/src/gprs_ms.h
+++ b/src/gprs_ms.h
@@ -23,6 +23,7 @@
struct gprs_rlcmac_tbf;
struct gprs_rlcmac_dl_tbf;
struct gprs_rlcmac_ul_tbf;
+struct gprs_codel;
#include "cxx_linuxlist.h"
#include "llc.h"
@@ -92,6 +93,7 @@ public:
gprs_llc_queue *llc_queue();
const gprs_llc_queue *llc_queue() const;
+ gprs_codel *codel_state() const;
void set_timeout(unsigned secs);
@@ -157,6 +159,8 @@ private:
uint8_t m_reserved_dl_slots;
uint8_t m_reserved_ul_slots;
gprs_rlcmac_trx *m_current_trx;
+
+ struct gprs_codel *m_codel_state;
};
inline uint32_t GprsMs::tlli() const
@@ -207,6 +211,11 @@ inline const gprs_llc_queue *GprsMs::llc_queue() const
return &m_llc_queue;
}
+inline gprs_codel *GprsMs::codel_state() const
+{
+ return m_codel_state;
+}
+
inline unsigned GprsMs::nack_rate_dl() const
{
return m_nack_rate_dl;