Change in osmo-bsc[master]: add stat_items for BTS and TRX connection stati
gerrit-no-reply at lists.osmocom.org
Mon Aug 30 16:36:40 UTC 2021
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/25274 )
Change subject: add stat_items for BTS and TRX connection stati
Patch Set 2:
PS1, Line 156: if (trx_is_usable(trx))
> Ah good point, I didn't think about trx_is_usable being a complex function :)
trx_is_usable() is absolutely not worth optimizing to avoid it.
It's just a shallow cascade of plain if()s and checking FSM status.
no point in nano optimisation here at all.
PS2, Line 385: * that should call this and failed to get accurate results; this trivial timer covers all of them. */
@pespin, you've seen this comment, right?
i really tried to find pivotal places in the code where to trigger updating the conn stats, but it's apparently a bit obscure. I spent considerable time on it, and then gave up because it was becoming a waste of time. This periodic check trivially covers all corner cases.
Doing this once a second cannot be considered load. We do much more effort every time we look up a trx, a conn, a subscriber, an unused lchan... on each and every incoming message.
In general, please let's not discuss processor time optimization for algorithms <= O(n), it's plain irrelevant. If we want optimization, the first step should be benchmarked load testing; then we can focus on the actual proven CPU hogs. This is O(n) with n much smaller than 1k, run once every second. I took longer writing this comment than any osmo-bsc will take running this timer cb for the next ten years combined.
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/25274
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-Comment-Date: Mon, 30 Aug 2021 16:36:40 +0000
Comment-In-Reply-To: osmith <osmith at sysmocom.de>
Comment-In-Reply-To: pespin <pespin at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gerrit-log