-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Linux IOCounters() performance with many disks #341
Comments
The current API does not provide a way to request a subset of disks, or to lazily get the serial number. @shirou Do you have any suggestion for the best course of action? |
I think it happens passing specific device path to |
This seems like it could work. @beheerderdag, could you time this call on your monster drive system? |
Around 2 seconds.
|
Another proposal is to directly read udev data files using the major,minor numbers. I assume this is what
This makes me wonder if we can pull the value directly from sysfs, best I have found is:
I really have no idea if how reliable this is, I know it does not work with partitions. |
@beheerderdag Could you tell me how it takes when you invoke with specific device path such as |
It is quite fast:
|
Okey, so |
I think it is fixed by #347. If you some problem, feel free to re-open or create new issue. Thanks |
On Linux systems with many entries in
/proc/diskstats
, callingdisk.IOCounters()
can take upwards of 10 seconds to complete. Since IOCounters returns stats for all disks, they all get checked even if you only want to read counters for a single drive.The results of testing by @beheerderdag has indicated that it is primarily the call to
udevadm
to obtain the serial number. (influxdata/telegraf#2197)I'm available to work on this issue if we can determine the right fix.
The text was updated successfully, but these errors were encountered: