Change in osmo-bsc[master]: fix performance for chan_counts and all_allocated stats
Attention is currently required from: neels. Hello Jenkins Builder, laforge, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-bsc/+/28205 to look at the new patch set (#2). Change subject: fix performance for chan_counts and all_allocated stats ...................................................................... fix performance for chan_counts and all_allocated stats The all_allocated_update_bsc() does inefficient iterating to count active/inactive lchans, which scales badly for high numbers of TRX managed by osmo-bsc. We need to update the all_allocated flags immediately (periodic counting alone would suffer from undersampling), so, until now, we are calling this inefficient function every time a channel state changes. Instead of iterating all channels for any chan state changes anywhere, keep global state of the current channel counts, and on channel state change only update those ts, trx, bts counts that actually change. A desirable side effect: for connection stats and handover decision 2, we can now also use the globally updated channel counts and save a bunch of inefficient iterations. To get accurate channel counts at all times, spread around some chan_counts_ts_update() calls in pivotal places. It re-counts the given timeslot and cascades counter changes, iff required. Just in case I missed some channel accounting, still run an inefficient iterating count regularly that detects errors, logs them and fixes them. No real harm done if such error appears. None show in ttcn3 BSC_Tests. It is fine to do the inefficient iteration once per second; channel state changes can realistically happen hundreds of times per second. Related: SYS#5976 Change-Id: I580bfae329aac8d4552723164741536af6512011 --- M include/osmocom/bsc/bsc_stats.h M include/osmocom/bsc/bts.h M include/osmocom/bsc/bts_trx.h M include/osmocom/bsc/chan_counts.h M include/osmocom/bsc/gsm_data.h M src/osmo-bsc/abis_rsl.c M src/osmo-bsc/bsc_stats.c M src/osmo-bsc/chan_counts.c M src/osmo-bsc/handover_decision_2.c M src/osmo-bsc/lchan_fsm.c M src/osmo-bsc/osmo_bsc_main.c M src/osmo-bsc/timeslot_fsm.c M tests/handover/handover_test.c 13 files changed, 319 insertions(+), 94 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/05/28205/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/28205 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I580bfae329aac8d4552723164741536af6512011 Gerrit-Change-Number: 28205 Gerrit-PatchSet: 2 Gerrit-Owner: neels <nhofmeyr@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge@osmocom.org> Gerrit-CC: pespin <pespin@sysmocom.de> Gerrit-Attention: neels <nhofmeyr@sysmocom.de> Gerrit-MessageType: newpatchset
participants (1)
-
neels