Improve performance of billing poller #3129

merged 1 commit into from Mar 2, 2016


None yet

3 participants


This partly addresses #3115 by adding indexes (non-unique because duplicate data is present) and optimises the queries used by the billing module poller. These changes improved the performance drastically on our installation - the billing poller previously was taking significantly over 5 minutes to run without them, and 40 seconds with these changes.

Please note, adding the indexes can take some time on systems with lots of billing history, so the DB update script might take a few minutes to run.

The unnecessary tables and duplicate data can be dealt with separately.

@richardlawley richardlawley Improve performance of billing poller
laf commented Mar 2, 2016

Total of < 80 seconds with:

7.5m rows for port_in_measurements
7.5m rows for port_out_measurements
3.7m rows for bill_data

Webui and polling/disco unaffected during schema update just bill polling.

Thanks @richardlawley

@laf laf added the Schema label Mar 2, 2016
@laf laf merged commit 73f2035 into librenms:master Mar 2, 2016

2 checks passed

Auto-Deploy Build finished. No test results found.
Scrutinizer No new issues
@richardlawley richardlawley deleted the richardlawley:billing-perf branch Mar 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment