Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update statistics to address slow queries #16838

Merged
merged 11 commits into from Jan 29, 2024

Conversation

stelfrag
Copy link
Collaborator

@stelfrag stelfrag commented Jan 24, 2024

Summary

Part 1 of addressing slow queries and high CPU usage by the ACLKSYNC thread

  • Run analyze on the database aclk tables (switch to database version 16)
  • Remove unused heath log entry count on startup
  • Adjust index when accessing pending cloud alert transitions
  • Add a -W sqlite-analyze option to update statistics on the entire database
    • To use stop the agent and run netdata -W sqlite-analyze

Fixes #16818

@stelfrag stelfrag marked this pull request as ready for review January 24, 2024 20:09
@stelfrag stelfrag marked this pull request as draft January 24, 2024 20:38
@stelfrag stelfrag marked this pull request as ready for review January 26, 2024 11:44
@netdata-community-bot
Copy link

This pull request has been mentioned on Netdata Community Forums. There might be relevant details there:

https://community.netdata.cloud/t/high-cpu-use-of-netdata/5087/7

@stelfrag stelfrag merged commit 0398c6c into netdata:master Jan 29, 2024
134 of 135 checks passed
@stelfrag stelfrag deleted the health_log_index branch January 29, 2024 13:36
stelfrag added a commit to stelfrag/netdata that referenced this pull request Feb 12, 2024
* Run analyze on aclk_alert tables
Add analyze option -W sqlite-analyze

* Remove empty line

* Remove analyze during runtime

* Remove health_log_entries_written

* Replace index

* Remove forced index skip

* Change version and run database analyze

* Adjust analyze to run on specific tables
Fix previous migration v14 -> v15 typo

* Fix v15 -> v16 migration message

* Fix v15 -> v16 migration message (typo)

* Increase analysis limit

(cherry picked from commit 0398c6c)
@stelfrag stelfrag mentioned this pull request Feb 12, 2024
tkatsoulas pushed a commit that referenced this pull request Feb 12, 2024
* Run analyze on aclk_alert tables
Add analyze option -W sqlite-analyze

* Remove empty line

* Remove analyze during runtime

* Remove health_log_entries_written

* Replace index

* Remove forced index skip

* Change version and run database analyze

* Adjust analyze to run on specific tables
Fix previous migration v14 -> v15 typo

* Fix v15 -> v16 migration message

* Fix v15 -> v16 migration message (typo)

* Increase analysis limit

(cherry picked from commit 0398c6c)
bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this pull request Mar 17, 2024
https://build.opensuse.org/request/show/1158803
by user mia + anag+factory
- Update to 1.44.3 (go.d.plugin 0.58.1)
  See https://github.com/netdata/go.d.plugin/tree/v0.58.1
  and https://github.com/netdata/go.d.plugin/tree/v0.58.0
  * Improved handling of slow queries and CPU usage of the ACLKSYNC
    thread.
    gh#netdata/netdata#16838
  * Improved error handling for listen bind failures. Instead of
    terminating fatally, Netdata now exits gracefully.
    gh#netdata/netdata#16937
  * Fixed invalid alert durations in health log entries.
    gh#netdata/netdata#16931
  * Fixed a race condition during analytics data setup, preventing
    potential Netdata crashes.
    gh#netdata/netdata#16929
  * - Changes in 1.44.2
  * Fixed an inconsistency where the NETDATA_LOG_LEVEL environment
    variable did not affect log level in Docker containers.
    gh#netdata/netdata#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Docker high CPU ACLKSYNC thread
2 participants