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

Fix chart update ebpf.plugin #13351

Merged
merged 38 commits into from Jul 18, 2022
Merged

Conversation

thiagoftsm
Copy link
Contributor

@thiagoftsm thiagoftsm commented Jul 11, 2022

Summary

Fixes #13346

This PR is bringing the following changes to remove locks that do not allow chart to be updated correctly:

  1. Change else to else if in systemd charts, this will avoid to recreate these charts every iteration
  2. Use secondary mutex only when thread is integrated with apps' and cgroup` will work more independent.
  3. Remove calls to functions broadcast and wait, because they were creating delay to send the messages to netdata on environments tested
Test Plan
  1. Compile current master branch and run netdata with ebpf.plugin enabled during few minutes
  2. Run the following command and verify that you will have value different than 0:
$ grep rrdset_done /var/log/netdata/error.log  | grep ebpf | wc -l
456
  1. Stop netdata
  2. Compile this branch
  3. Run step 2 again:
$ grep rrdset_done /var/log/netdata/error.log  | grep ebpf | wc -l
0
Additional Information

This PR was tested on the following environments:

database branch result
map master Errors appear
dbengine master error appear
dbengine this branch After this commit with all threads not related to apps/cgroup disabled, error did not appear
dbengine this branch All threads enabled, I had only 9 errors, but this happened when parent was overload, and child was a VM
dbengine with 2 Tier this Branch like previous
map this branch All threads enabled.
ram this branch All threads enabled. When I ran on parent I did not have any error.

Map is the memory mode where I had more events, and I still have when my parent was overloaded or updating Tier.

For users: How does this change affect me? Describe the PR affects users: - Which area of Netdata is affected by the change? ebpf.plugin - Can they see the change or is it an under the hood? If they can see it, where? Due the fact netdata interpolates, it was not visible when a data was not stored on dashboard, but this is visible trough our API. - How is the user impacted by the change? All collected data will be stored in the correct time, unless system is overloaded, but this also affects other plugins. - What are there any benefits of the change? Data quality

@thiagoftsm thiagoftsm marked this pull request as draft July 11, 2022 01:39
@github-actions github-actions bot added area/collectors Everything related to data collection collectors/ebpf labels Jul 11, 2022
…al mutex used when it is necessary to work with apps and cgroup
…al mutex used when it is necessary to work with apps and cgroup (dcstat)
…al mutex used when it is necessary to work with apps and cgroup (fd)
…al mutex used when it is necessary to work with apps and cgroup (oomkill)
…al mutex used when it is necessary to work with apps and cgroup (shm)
…al mutex used when it is necessary to work with apps and cgroup (socket)
…al mutex used when it is necessary to work with apps and cgroup (swap)
@thiagoftsm thiagoftsm marked this pull request as ready for review July 12, 2022 23:05
@thiagoftsm thiagoftsm requested review from MrZammler and underhood and removed request for vkalintiris July 12, 2022 23:05
DShreve2
DShreve2 previously approved these changes Jul 13, 2022
Copy link
Contributor

@DShreve2 DShreve2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs approve.

@thiagoftsm thiagoftsm merged commit 7f7225d into netdata:master Jul 18, 2022
@thiagoftsm thiagoftsm deleted the fix_interpolation branch July 18, 2022 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/collectors Everything related to data collection area/docs collectors/ebpf
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: a few collectors collect data more frequently than expected
4 participants