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

diskio plugin runs udevadm every time #4288

Closed
propertone opened this issue Jun 14, 2018 · 3 comments
Closed

diskio plugin runs udevadm every time #4288

propertone opened this issue Jun 14, 2018 · 3 comments
Labels
performance problems with decreased performance or enhancements that improve performance
Milestone

Comments

@propertone
Copy link

In #3663, @danielnelson implied that the diskio plugin does NOT run udevadm directly, but it's actually running the udevadm command every interval for each device. We have a system with hundreds of disks/partitions and the diskio plugin takes several seconds to run because of this.

Relevant telegraf.conf:

[[inputs.diskio]]
    # default configuration

System info:

Telegraf: v1.6.1 (git: release-1.6 bf0ab27)
Linux: RedHat 7.5
Kernel: 3.10.0-693.21.1.el7.x86_64

Steps to reproduce:

  1. Run telegraf with the diskio plugin using the default configuration
  2. Use lastcomm to see that it's actually running udevadm every time

Expected behavior:

udevadm is not run at all, or at least cached

Actual behavior:

udevadm command is run every interval for each disk. Its output is not used as #3663 is still an issue.

@danielnelson danielnelson added this to the 1.8.0 milestone Jun 14, 2018
@danielnelson danielnelson added the performance problems with decreased performance or enhancements that improve performance label Jun 14, 2018
@danielnelson
Copy link
Contributor

I think I mentioned this behavior in this comment:

the function we call on each interval in gopsutil already runs this udevadm command for each device found without caching to get the serial number

The good news is this has already been addressed in gopsutil, which should improve the performance quite a bit.

@propertone
Copy link
Author

Oops, I missed that. Thanks!

@danielnelson
Copy link
Contributor

The updated gopsutil release that does not run udevadm has been merged, so this change will be in 1.8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance problems with decreased performance or enhancements that improve performance
Projects
None yet
Development

No branches or pull requests

2 participants