<p>Harald Welte <strong>merged</strong> this change.</p><p><a href="https://gerrit.osmocom.org/9513">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">bts_agch_enqueue: Decrease queue len hard_limit from 1000 to 100<br><br>In a prod setup, complete channel saturation at the bsc was detected,<br>and Immediate Assignments were not being answered by the MS once sent by<br>the BTS.<br>Further investigation showed that the BTS was all the time printing<br>messages like this:<br>"bts.c:540 AGCH: too many messages in queue, refusing message type 0x3f, length = 1001/10"<br><br>So it seems the AGCH queue was becoming incredibly full (1000, hard<br>limit triggered the log), while acgch_queue.max_length was set to 10.<br><br>As a result, most probably the Immediate Assignments being sent to the<br>MS are super old in time, and the MS doesn't known about them anymore<br>once they are receivied, so no answer is sent back.<br><br>Let's try to avoid that by decreasing the hard limit so we never reach<br>that big queue_len scenario.<br><br>The number 100 is selected from data gatherered in agch_test.c which<br>prints a table of max_length values based on different setups. Some<br>values can reach around 80 messages, so let's use a slightly bigger hard<br>limit.<br><br>Related: SYS#2695<br>Change-Id: I272798c959abec123776d2fa8dad5685ec512fbd<br>---<br>M src/common/bts.c<br>M tests/agch/agch_test.ok<br>2 files changed, 3 insertions(+), 3 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/common/bts.c b/src/common/bts.c</span><br><span>index 55f4b94..4fa916c 100644</span><br><span>--- a/src/common/bts.c</span><br><span>+++ b/src/common/bts.c</span><br><span>@@ -533,7 +533,7 @@</span><br><span> </span><br><span> int bts_agch_enqueue(struct gsm_bts *bts, struct msgb *msg)</span><br><span> {</span><br><span style="color: hsl(0, 100%, 40%);">-       int hard_limit = 1000;</span><br><span style="color: hsl(120, 100%, 40%);">+        int hard_limit = 100;</span><br><span>        struct gsm48_imm_ass_rej *imm_ass_cmd = msgb_l3(msg);</span><br><span> </span><br><span>    if (bts->agch_queue.length > hard_limit) {</span><br><span>diff --git a/tests/agch/agch_test.ok b/tests/agch/agch_test.ok</span><br><span>index 49173a3..4e0a9e1 100644</span><br><span>--- a/tests/agch/agch_test.ok</span><br><span>+++ b/tests/agch/agch_test.ok</span><br><span>@@ -18,6 +18,6 @@</span><br><span> 32     83      28      83      83      83</span><br><span> 50        28      14      28      28      28</span><br><span> Testing AGCH messages queue handling.</span><br><span style="color: hsl(0, 100%, 40%);">-AGCH filled: count 720, imm.ass 80, imm.ass.rej 640 (refs 640), queue limit 32, occupied 240, dropped 0, merged 480, rejected 0, ag-res 0, non-res 0</span><br><span style="color: hsl(0, 100%, 40%);">-AGCH drained: multiframes 32, imm.ass 80, imm.ass.rej 12 (refs 48), queue limit 32, occupied 0, dropped 148, merged 480, rejected 0, ag-res 31, non-res 61</span><br><span style="color: hsl(120, 100%, 40%);">+AGCH filled: count 720, imm.ass 80, imm.ass.rej 640 (refs 640), queue limit 32, occupied 101, dropped 0, merged 198, rejected 421, ag-res 0, non-res 0</span><br><span style="color: hsl(120, 100%, 40%);">+AGCH drained: multiframes 16, imm.ass 34, imm.ass.rej 12 (refs 42), queue limit 32, occupied 0, dropped 56, merged 198, rejected 421, ag-res 15, non-res 30</span><br><span> Success</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/9513">change 9513</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/9513"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-bts </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: I272798c959abec123776d2fa8dad5685ec512fbd </div>
<div style="display:none"> Gerrit-Change-Number: 9513 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Pau Espin Pedrol <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Harald Welte <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>