collector/diskstats: fix rotational queue stats scrape regression - #3686
Conversation
|
Hey @ruthwikkakumani overall LGTM, do you mind paste the results of the benchmark as part of the PR description? |
d802087 to
65da987
Compare
|
Hi @nicolastakashi! Thanks for the approval I noticed CI is blocked on "3 workflows awaiting approval" — could you approve the workflow run so the checks can complete? Benchmark ResultsThe go test -bench=BenchmarkDiskstatsUpdate -benchtime=5s -benchmem ./collector/I can't run it locally since the
This ~30× reduction in sysfs I/O directly explains the 10× latency regression reported in #3282. Note on golangci-lint FailuresAll 15 reported lint issues ( golangci-lint run ./collector/...directly on upstream |
|
Hey @SuperQ @discordianfish — could you please approve the workflow runs so CI can complete? The code has been reviewed and approved by @nicolastakashi. Thank you! |
| // file reads to exactly 1, fixing the 10× scrape regression on systems with | ||
| // large numbers of block devices (issue #3282). | ||
| func readRotational(dev string) string { | ||
| data, err := os.ReadFile(sysFilePath(fmt.Sprintf("block/%s/queue/rotational", dev))) |
There was a problem hiding this comment.
We prefer to have these file readers implemented in the procfs library.
I would be fine with an optimized blockdevice.FS.Rotational(dev) function that only reads the one parameter.
The rest of the PR seems fine.
There was a problem hiding this comment.
Understood! I'll add a SysBlockDeviceRotational(device string) (uint64, error) method
to the blockdevice.FS type in prometheus/procfs and update this PR to use it.
The implementation will follow the same pattern as SysBlockDeviceSize() — a targeted
single-file read of /sys/block/<device>/queue/rotational using util.ReadUintFromFile.
I'll open the procfs PR first, then update this one to depend on it.
644b834 to
d3a254d
Compare
|
@SuperQ I've addressed your feedback — the file reader is now in the procfs library as you requested. prometheus/procfs#824 adds blockdevice.FS.SysBlockDeviceRotational(device string) (uint64, error) — a targeted single-file read of /sys/block//queue/rotational following the same pattern as SysBlockDeviceSize(). This PR now calls fs.SysBlockDeviceRotational(dev) via rotationalLabel(). The go.mod uses a replace directive pointing to the procfs fork until procfs#824 merges — at that point it can be replaced with a proper version bump. Could you also approve the workflow runs so CI can complete? Thank you! |
…ometheus#3282) Fix a 10× scrape-latency regression introduced in prometheus#3022 on systems with many block devices. Previously, Update() called SysBlockDeviceQueueStats(dev) for every block device per scrape, reading ~30 sysfs files per device. On systems with 1,000+ devices this resulted in 30,000+ unnecessary file reads per scrape, causing timeouts. Replace the expensive struct call with a targeted rotationalLabel() helper that delegates to blockdevice.FS.SysBlockDeviceRotational(dev) (added in prometheus/procfs#824). This reads exactly 1 sysfs file per device: /sys/block/<device>/queue/rotational Returns "1" for rotational (HDD) and "0" for non-rotational (SSD/NVMe), failing closed to "0" on any error — matching the zero-initialised-struct behaviour of the old code. Also add: - TestRotationalLabel: dynamic t.TempDir()-based tests via blockdevice.FS, covering HDD, SSD, and missing-file cases. - BenchmarkDiskstatsUpdate: measures the full Update() call to catch future per-device sysfs I/O regressions before merge. Fixes prometheus#3282 Signed-off-by: Ruthwik Kakumani <ruthwikkakumani08@gmail.com>
|
@SuperQ procfs#824 has been merged into prometheus:master. I've updated go.mod to drop the replace directive and now point directly to the official github.com/prometheus/procfs@v0.20.2-0.20260618104242-66a9e6ebfb87. The fork dependency is gone. Could you please approve the workflow runs so CI can complete? Thank you! |
|
@SuperQ @nicolastakashi Just a gentle ping on this when you have a moment. The procfs PR is merged and the fork dependency has been removed. Could we get the workflows approved to run? Thanks again for your help reviewing this! |
ArthurSens
left a comment
There was a problem hiding this comment.
Just one nit, that I'll try to commit it myself to unblock this
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
* [FEATURE] mountstats: Add NFS mountpoint info metric #3554 * [FEATURE] nvmesubsystem: Add new collector #3579 * [FEATURE] dmmultipath: Add new collector #3581 * [FEATURE] infiniband: Add device filtering option #3694 * [ENHANCEMENT] hwmon: disambiguate colliding chip labels #3646 * [ENHANCEMENT] cpufreq: Add support for cpuinfo_avg_freq #3712 * [ENHANCEMENT] filesystem: Support ext4 super block emergency_ro flag #3717 * [ENHANCEMENT] edac: Add per-channel error metrics with DIMM labels #3720 * [BUGFIX] diskstats: Only enforce mutual exclusivity for non-empty values #3617 * [BUGFIX] thermal_zone: Handle EINVAL errors gracefully #3657 * [BUGFIX] filesystem: Add comma separator in mount options #3659 * [BUGFIX] diskstats: Fix rotational queue stats scrape regression #3686 * [BUGFIX] filesystem: Prevent panic on mount points with non-UTF-8 names #3687 Signed-off-by: Ben Kochie <superq@gmail.com>
….1 ➔ v1.12.0) (#297) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [quay.io/prometheus/node-exporter](https://github.com/prometheus/node_exporter) | minor | `v1.11.1` → `v1.12.0` | --- ### Release Notes <details> <summary>prometheus/node_exporter (quay.io/prometheus/node-exporter)</summary> ### [`v1.12.0`](https://github.com/prometheus/node_exporter/releases/tag/v1.12.0): 1.12.0 / 2026-07-10 [Compare Source](prometheus/node_exporter@v1.11.1...v1.12.0) - \[FEATURE] mountstats: Add NFS mountpoint info metric [#​3554](prometheus/node_exporter#3554) - \[FEATURE] nvmesubsystem: Add new collector [#​3579](prometheus/node_exporter#3579) - \[FEATURE] dmmultipath: Add new collector [#​3581](prometheus/node_exporter#3581) - \[FEATURE] infiniband: Add device filtering option [#​3694](prometheus/node_exporter#3694) - \[ENHANCEMENT] hwmon: disambiguate colliding chip labels [#​3646](prometheus/node_exporter#3646) - \[ENHANCEMENT] cpufreq: Add support for cpuinfo\_avg\_freq [#​3712](prometheus/node_exporter#3712) - \[ENHANCEMENT] filesystem: Support ext4 super block emergency\_ro flag [#​3717](prometheus/node_exporter#3717) - \[ENHANCEMENT] edac: Add per-channel error metrics with DIMM labels [#​3720](prometheus/node_exporter#3720) - \[BUGFIX] diskstats: Only enforce mutual exclusivity for non-empty values [#​3617](prometheus/node_exporter#3617) - \[BUGFIX] thermal\_zone: Handle EINVAL errors gracefully [#​3657](prometheus/node_exporter#3657) - \[BUGFIX] filesystem: Add comma separator in mount options [#​3659](prometheus/node_exporter#3659) - \[BUGFIX] diskstats: Fix rotational queue stats scrape regression [#​3686](prometheus/node_exporter#3686) - \[BUGFIX] filesystem: Prevent panic on mount points with non-UTF-8 names [#​3687](prometheus/node_exporter#3687) </details> --- ### Configuration 📅 **Schedule**: (in timezone Europe/Warsaw) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yNTcuNCIsInVwZGF0ZWRJblZlciI6IjQzLjI1Ny40IiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbInJlbm92YXRlL2NvbnRhaW5lciIsInR5cGUvbWlub3IiXX0=--> Reviewed-on: https://git.ajgon.casa/deedee/mark13/pulls/297
….1 ➔ v1.12.0) (#1526) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [quay.io/prometheus/node-exporter](https://github.com/prometheus/node_exporter) | minor | `v1.11.1` → `v1.12.0` | --- ### Release Notes <details> <summary>prometheus/node_exporter (quay.io/prometheus/node-exporter)</summary> ### [`v1.12.0`](https://github.com/prometheus/node_exporter/releases/tag/v1.12.0): 1.12.0 / 2026-07-10 [Compare Source](prometheus/node_exporter@v1.11.1...v1.12.0) - \[FEATURE] mountstats: Add NFS mountpoint info metric [#​3554](prometheus/node_exporter#3554) - \[FEATURE] nvmesubsystem: Add new collector [#​3579](prometheus/node_exporter#3579) - \[FEATURE] dmmultipath: Add new collector [#​3581](prometheus/node_exporter#3581) - \[FEATURE] infiniband: Add device filtering option [#​3694](prometheus/node_exporter#3694) - \[ENHANCEMENT] hwmon: disambiguate colliding chip labels [#​3646](prometheus/node_exporter#3646) - \[ENHANCEMENT] cpufreq: Add support for cpuinfo\_avg\_freq [#​3712](prometheus/node_exporter#3712) - \[ENHANCEMENT] filesystem: Support ext4 super block emergency\_ro flag [#​3717](prometheus/node_exporter#3717) - \[ENHANCEMENT] edac: Add per-channel error metrics with DIMM labels [#​3720](prometheus/node_exporter#3720) - \[BUGFIX] diskstats: Only enforce mutual exclusivity for non-empty values [#​3617](prometheus/node_exporter#3617) - \[BUGFIX] thermal\_zone: Handle EINVAL errors gracefully [#​3657](prometheus/node_exporter#3657) - \[BUGFIX] filesystem: Add comma separator in mount options [#​3659](prometheus/node_exporter#3659) - \[BUGFIX] diskstats: Fix rotational queue stats scrape regression [#​3686](prometheus/node_exporter#3686) - \[BUGFIX] filesystem: Prevent panic on mount points with non-UTF-8 names [#​3687](prometheus/node_exporter#3687) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xMDEuMSIsInVwZGF0ZWRJblZlciI6IjQzLjEwMS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZS9jb250YWluZXIiLCJ0eXBlL21pbm9yIl19--> Reviewed-on: https://git.erwanleboucher.dev/eleboucher/homelab/pulls/1526
….12.0 (#511) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [quay.io/prometheus/node-exporter](https://github.com/prometheus/node_exporter) | minor | `v1.11.1` → `v1.12.0` | --- ### Release Notes <details> <summary>prometheus/node_exporter (quay.io/prometheus/node-exporter)</summary> ### [`v1.12.0`](https://github.com/prometheus/node_exporter/releases/tag/v1.12.0): 1.12.0 / 2026-07-10 [Compare Source](prometheus/node_exporter@v1.11.1...v1.12.0) - \[FEATURE] mountstats: Add NFS mountpoint info metric [#​3554](prometheus/node_exporter#3554) - \[FEATURE] nvmesubsystem: Add new collector [#​3579](prometheus/node_exporter#3579) - \[FEATURE] dmmultipath: Add new collector [#​3581](prometheus/node_exporter#3581) - \[FEATURE] infiniband: Add device filtering option [#​3694](prometheus/node_exporter#3694) - \[ENHANCEMENT] hwmon: disambiguate colliding chip labels [#​3646](prometheus/node_exporter#3646) - \[ENHANCEMENT] cpufreq: Add support for cpuinfo\_avg\_freq [#​3712](prometheus/node_exporter#3712) - \[ENHANCEMENT] filesystem: Support ext4 super block emergency\_ro flag [#​3717](prometheus/node_exporter#3717) - \[ENHANCEMENT] edac: Add per-channel error metrics with DIMM labels [#​3720](prometheus/node_exporter#3720) - \[BUGFIX] diskstats: Only enforce mutual exclusivity for non-empty values [#​3617](prometheus/node_exporter#3617) - \[BUGFIX] thermal\_zone: Handle EINVAL errors gracefully [#​3657](prometheus/node_exporter#3657) - \[BUGFIX] filesystem: Add comma separator in mount options [#​3659](prometheus/node_exporter#3659) - \[BUGFIX] diskstats: Fix rotational queue stats scrape regression [#​3686](prometheus/node_exporter#3686) - \[BUGFIX] filesystem: Prevent panic on mount points with non-UTF-8 names [#​3687](prometheus/node_exporter#3687) </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yNTIuMSIsInVwZGF0ZWRJblZlciI6IjQzLjI1Mi4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
….1 ➔ v1.12.0) (#47) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [quay.io/prometheus/node-exporter](https://github.com/prometheus/node_exporter) | minor | `v1.11.1` → `v1.12.0` | --- ### Release Notes <details> <summary>prometheus/node_exporter (quay.io/prometheus/node-exporter)</summary> ### [`v1.12.0`](https://github.com/prometheus/node_exporter/releases/tag/v1.12.0): 1.12.0 / 2026-07-10 [Compare Source](prometheus/node_exporter@v1.11.1...v1.12.0) - \[FEATURE] mountstats: Add NFS mountpoint info metric [#​3554](prometheus/node_exporter#3554) - \[FEATURE] nvmesubsystem: Add new collector [#​3579](prometheus/node_exporter#3579) - \[FEATURE] dmmultipath: Add new collector [#​3581](prometheus/node_exporter#3581) - \[FEATURE] infiniband: Add device filtering option [#​3694](prometheus/node_exporter#3694) - \[ENHANCEMENT] hwmon: disambiguate colliding chip labels [#​3646](prometheus/node_exporter#3646) - \[ENHANCEMENT] cpufreq: Add support for cpuinfo\_avg\_freq [#​3712](prometheus/node_exporter#3712) - \[ENHANCEMENT] filesystem: Support ext4 super block emergency\_ro flag [#​3717](prometheus/node_exporter#3717) - \[ENHANCEMENT] edac: Add per-channel error metrics with DIMM labels [#​3720](prometheus/node_exporter#3720) - \[BUGFIX] diskstats: Only enforce mutual exclusivity for non-empty values [#​3617](prometheus/node_exporter#3617) - \[BUGFIX] thermal\_zone: Handle EINVAL errors gracefully [#​3657](prometheus/node_exporter#3657) - \[BUGFIX] filesystem: Add comma separator in mount options [#​3659](prometheus/node_exporter#3659) - \[BUGFIX] diskstats: Fix rotational queue stats scrape regression [#​3686](prometheus/node_exporter#3686) - \[BUGFIX] filesystem: Prevent panic on mount points with non-UTF-8 names [#​3687](prometheus/node_exporter#3687) </details> --- ### Configuration 📅 **Schedule**: (in timezone America/New_York) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yNjAuMiIsInVwZGF0ZWRJblZlciI6IjQzLjI2MC4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZS9jb250YWluZXIiLCJ0eXBlL21pbm9yIl19--> Reviewed-on: https://git.greyrock.io/greyrock-labs/home-ops/pulls/47
….1 ➔ v1.12.0) (#297) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [quay.io/prometheus/node-exporter](https://github.com/prometheus/node_exporter) | minor | `v1.11.1` → `v1.12.0` | --- ### Release Notes <details> <summary>prometheus/node_exporter (quay.io/prometheus/node-exporter)</summary> ### [`v1.12.0`](https://github.com/prometheus/node_exporter/releases/tag/v1.12.0): 1.12.0 / 2026-07-10 [Compare Source](prometheus/node_exporter@v1.11.1...v1.12.0) - \[FEATURE] mountstats: Add NFS mountpoint info metric [#​3554](prometheus/node_exporter#3554) - \[FEATURE] nvmesubsystem: Add new collector [#​3579](prometheus/node_exporter#3579) - \[FEATURE] dmmultipath: Add new collector [#​3581](prometheus/node_exporter#3581) - \[FEATURE] infiniband: Add device filtering option [#​3694](prometheus/node_exporter#3694) - \[ENHANCEMENT] hwmon: disambiguate colliding chip labels [#​3646](prometheus/node_exporter#3646) - \[ENHANCEMENT] cpufreq: Add support for cpuinfo\_avg\_freq [#​3712](prometheus/node_exporter#3712) - \[ENHANCEMENT] filesystem: Support ext4 super block emergency\_ro flag [#​3717](prometheus/node_exporter#3717) - \[ENHANCEMENT] edac: Add per-channel error metrics with DIMM labels [#​3720](prometheus/node_exporter#3720) - \[BUGFIX] diskstats: Only enforce mutual exclusivity for non-empty values [#​3617](prometheus/node_exporter#3617) - \[BUGFIX] thermal\_zone: Handle EINVAL errors gracefully [#​3657](prometheus/node_exporter#3657) - \[BUGFIX] filesystem: Add comma separator in mount options [#​3659](prometheus/node_exporter#3659) - \[BUGFIX] diskstats: Fix rotational queue stats scrape regression [#​3686](prometheus/node_exporter#3686) - \[BUGFIX] filesystem: Prevent panic on mount points with non-UTF-8 names [#​3687](prometheus/node_exporter#3687) </details> --- ### Configuration 📅 **Schedule**: (in timezone Europe/Warsaw) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yNTcuNCIsInVwZGF0ZWRJblZlciI6IjQzLjI1Ny40IiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbInJlbm92YXRlL2NvbnRhaW5lciIsInR5cGUvbWlub3IiXX0=--> Reviewed-on: https://git.ajgon.casa/deedee/mark13/pulls/297
….12.1 ##### [\`v1.12.1\`](https://github.com/prometheus/node_exporter/releases/tag/v1.12.1) - \[BUGFIX] perf: Fix perf profiler flag handling [#3731](prometheus/node_exporter#3731) - \[BUGFIX] edac: Fix optional csrow ue\_count collection [#3734](prometheus/node_exporter#3734) --- ##### [\`v1.12.0\`](https://github.com/prometheus/node_exporter/releases/tag/v1.12.0) - \[FEATURE] mountstats: Add NFS mountpoint info metric [#3554](prometheus/node_exporter#3554) - \[FEATURE] nvmesubsystem: Add new collector [#3579](prometheus/node_exporter#3579) - \[FEATURE] dmmultipath: Add new collector [#3581](prometheus/node_exporter#3581) - \[FEATURE] infiniband: Add device filtering option [#3694](prometheus/node_exporter#3694) - \[ENHANCEMENT] hwmon: disambiguate colliding chip labels [#3646](prometheus/node_exporter#3646) - \[ENHANCEMENT] cpufreq: Add support for cpuinfo\_avg\_freq [#3712](prometheus/node_exporter#3712) - \[ENHANCEMENT] filesystem: Support ext4 super block emergency\_ro flag [#3717](prometheus/node_exporter#3717) - \[ENHANCEMENT] edac: Add per-channel error metrics with DIMM labels [#3720](prometheus/node_exporter#3720) - \[BUGFIX] diskstats: Only enforce mutual exclusivity for non-empty values [#3617](prometheus/node_exporter#3617) - \[BUGFIX] thermal\_zone: Handle EINVAL errors gracefully [#3657](prometheus/node_exporter#3657) - \[BUGFIX] filesystem: Add comma separator in mount options [#3659](prometheus/node_exporter#3659) - \[BUGFIX] diskstats: Fix rotational queue stats scrape regression [#3686](prometheus/node_exporter#3686) - \[BUGFIX] filesystem: Prevent panic on mount points with non-UTF-8 names [#3687](prometheus/node_exporter#3687) --- ##### [\`v1.11.1\`](https://github.com/prometheus/node_exporter/releases/tag/v1.11.1) - \[BUGFIX] Fix kernel\_hung for no data [#3613](prometheus/node_exporter#3613) --- ##### [\`v1.11.0\`](https://github.com/prometheus/node_exporter/releases/tag/v1.11.0) - \[CHANGE] Adds distroless container image. [#3592](prometheus/node_exporter#3592) - \[FEATURE] infiniband: Add `hw_counters` metrics [#2827](prometheus/node_exporter#2827) - \[FEATURE] kernel\_hung: Add collector for kernel hung tasks [#3470](prometheus/node_exporter#3470) - \[FEATURE] mixin: Add "All" option to cluster variable in dashboards [#3509](prometheus/node_exporter#3509) - \[FEATURE] netlink: Add node\_network\_altnames\_info metric [#3541](prometheus/node_exporter#3541) - \[FEATURE] thermal: Add support for CPU temperature metrics on Apple Silicon [#3547](prometheus/node_exporter#3547) - \[FEATURE] bcachefs: Add new collector for bcachefs [#3523](prometheus/node_exporter#3523) - \[ENHANCEMENT] mixin: Make devices in network graphs configurable [#3525](prometheus/node_exporter#3525) - \[ENHANCEMENT] nvme: Add namespace parameters [#3360](prometheus/node_exporter#3360) - \[BUGFIX] netdev: Respect deviceFilter for `node_network_address_info` metric [#3340](prometheus/node_exporter#3340) - \[BUGFIX] mountstats: Fix multiple transports statistics labeling [#3358](prometheus/node_exporter#3358) - \[BUGFIX] diskstats: Fix panic when using device-include flag only [#3603](prometheus/node_exporter#3603)
….1 ➔ v1.12.0) (#297) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [quay.io/prometheus/node-exporter](https://github.com/prometheus/node_exporter) | minor | `v1.11.1` → `v1.12.0` | --- ### Release Notes <details> <summary>prometheus/node_exporter (quay.io/prometheus/node-exporter)</summary> ### [`v1.12.0`](https://github.com/prometheus/node_exporter/releases/tag/v1.12.0): 1.12.0 / 2026-07-10 [Compare Source](prometheus/node_exporter@v1.11.1...v1.12.0) - \[FEATURE] mountstats: Add NFS mountpoint info metric [#​3554](prometheus/node_exporter#3554) - \[FEATURE] nvmesubsystem: Add new collector [#​3579](prometheus/node_exporter#3579) - \[FEATURE] dmmultipath: Add new collector [#​3581](prometheus/node_exporter#3581) - \[FEATURE] infiniband: Add device filtering option [#​3694](prometheus/node_exporter#3694) - \[ENHANCEMENT] hwmon: disambiguate colliding chip labels [#​3646](prometheus/node_exporter#3646) - \[ENHANCEMENT] cpufreq: Add support for cpuinfo\_avg\_freq [#​3712](prometheus/node_exporter#3712) - \[ENHANCEMENT] filesystem: Support ext4 super block emergency\_ro flag [#​3717](prometheus/node_exporter#3717) - \[ENHANCEMENT] edac: Add per-channel error metrics with DIMM labels [#​3720](prometheus/node_exporter#3720) - \[BUGFIX] diskstats: Only enforce mutual exclusivity for non-empty values [#​3617](prometheus/node_exporter#3617) - \[BUGFIX] thermal\_zone: Handle EINVAL errors gracefully [#​3657](prometheus/node_exporter#3657) - \[BUGFIX] filesystem: Add comma separator in mount options [#​3659](prometheus/node_exporter#3659) - \[BUGFIX] diskstats: Fix rotational queue stats scrape regression [#​3686](prometheus/node_exporter#3686) - \[BUGFIX] filesystem: Prevent panic on mount points with non-UTF-8 names [#​3687](prometheus/node_exporter#3687) </details> --- ### Configuration 📅 **Schedule**: (in timezone Europe/Warsaw) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yNTcuNCIsInVwZGF0ZWRJblZlciI6IjQzLjI1Ny40IiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbInJlbm92YXRlL2NvbnRhaW5lciIsInR5cGUvbWlub3IiXX0=--> Reviewed-on: https://git.ajgon.casa/deedee/mark13/pulls/297
….12.1 ##### [\`v1.12.1\`](https://github.com/prometheus/node_exporter/releases/tag/v1.12.1) - \[BUGFIX] perf: Fix perf profiler flag handling [#3731](prometheus/node_exporter#3731) - \[BUGFIX] edac: Fix optional csrow ue\_count collection [#3734](prometheus/node_exporter#3734) --- ##### [\`v1.12.0\`](https://github.com/prometheus/node_exporter/releases/tag/v1.12.0) - \[FEATURE] mountstats: Add NFS mountpoint info metric [#3554](prometheus/node_exporter#3554) - \[FEATURE] nvmesubsystem: Add new collector [#3579](prometheus/node_exporter#3579) - \[FEATURE] dmmultipath: Add new collector [#3581](prometheus/node_exporter#3581) - \[FEATURE] infiniband: Add device filtering option [#3694](prometheus/node_exporter#3694) - \[ENHANCEMENT] hwmon: disambiguate colliding chip labels [#3646](prometheus/node_exporter#3646) - \[ENHANCEMENT] cpufreq: Add support for cpuinfo\_avg\_freq [#3712](prometheus/node_exporter#3712) - \[ENHANCEMENT] filesystem: Support ext4 super block emergency\_ro flag [#3717](prometheus/node_exporter#3717) - \[ENHANCEMENT] edac: Add per-channel error metrics with DIMM labels [#3720](prometheus/node_exporter#3720) - \[BUGFIX] diskstats: Only enforce mutual exclusivity for non-empty values [#3617](prometheus/node_exporter#3617) - \[BUGFIX] thermal\_zone: Handle EINVAL errors gracefully [#3657](prometheus/node_exporter#3657) - \[BUGFIX] filesystem: Add comma separator in mount options [#3659](prometheus/node_exporter#3659) - \[BUGFIX] diskstats: Fix rotational queue stats scrape regression [#3686](prometheus/node_exporter#3686) - \[BUGFIX] filesystem: Prevent panic on mount points with non-UTF-8 names [#3687](prometheus/node_exporter#3687) --- ##### [\`v1.11.1\`](https://github.com/prometheus/node_exporter/releases/tag/v1.11.1) - \[BUGFIX] Fix kernel\_hung for no data [#3613](prometheus/node_exporter#3613) --- ##### [\`v1.11.0\`](https://github.com/prometheus/node_exporter/releases/tag/v1.11.0) - \[CHANGE] Adds distroless container image. [#3592](prometheus/node_exporter#3592) - \[FEATURE] infiniband: Add `hw_counters` metrics [#2827](prometheus/node_exporter#2827) - \[FEATURE] kernel\_hung: Add collector for kernel hung tasks [#3470](prometheus/node_exporter#3470) - \[FEATURE] mixin: Add "All" option to cluster variable in dashboards [#3509](prometheus/node_exporter#3509) - \[FEATURE] netlink: Add node\_network\_altnames\_info metric [#3541](prometheus/node_exporter#3541) - \[FEATURE] thermal: Add support for CPU temperature metrics on Apple Silicon [#3547](prometheus/node_exporter#3547) - \[FEATURE] bcachefs: Add new collector for bcachefs [#3523](prometheus/node_exporter#3523) - \[ENHANCEMENT] mixin: Make devices in network graphs configurable [#3525](prometheus/node_exporter#3525) - \[ENHANCEMENT] nvme: Add namespace parameters [#3360](prometheus/node_exporter#3360) - \[BUGFIX] netdev: Respect deviceFilter for `node_network_address_info` metric [#3340](prometheus/node_exporter#3340) - \[BUGFIX] mountstats: Fix multiple transports statistics labeling [#3358](prometheus/node_exporter#3358) - \[BUGFIX] diskstats: Fix panic when using device-include flag only [#3603](prometheus/node_exporter#3603)
….1 ➔ v1.12.0) (#297) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [quay.io/prometheus/node-exporter](https://github.com/prometheus/node_exporter) | minor | `v1.11.1` → `v1.12.0` | --- ### Release Notes <details> <summary>prometheus/node_exporter (quay.io/prometheus/node-exporter)</summary> ### [`v1.12.0`](https://github.com/prometheus/node_exporter/releases/tag/v1.12.0): 1.12.0 / 2026-07-10 [Compare Source](prometheus/node_exporter@v1.11.1...v1.12.0) - \[FEATURE] mountstats: Add NFS mountpoint info metric [#​3554](prometheus/node_exporter#3554) - \[FEATURE] nvmesubsystem: Add new collector [#​3579](prometheus/node_exporter#3579) - \[FEATURE] dmmultipath: Add new collector [#​3581](prometheus/node_exporter#3581) - \[FEATURE] infiniband: Add device filtering option [#​3694](prometheus/node_exporter#3694) - \[ENHANCEMENT] hwmon: disambiguate colliding chip labels [#​3646](prometheus/node_exporter#3646) - \[ENHANCEMENT] cpufreq: Add support for cpuinfo\_avg\_freq [#​3712](prometheus/node_exporter#3712) - \[ENHANCEMENT] filesystem: Support ext4 super block emergency\_ro flag [#​3717](prometheus/node_exporter#3717) - \[ENHANCEMENT] edac: Add per-channel error metrics with DIMM labels [#​3720](prometheus/node_exporter#3720) - \[BUGFIX] diskstats: Only enforce mutual exclusivity for non-empty values [#​3617](prometheus/node_exporter#3617) - \[BUGFIX] thermal\_zone: Handle EINVAL errors gracefully [#​3657](prometheus/node_exporter#3657) - \[BUGFIX] filesystem: Add comma separator in mount options [#​3659](prometheus/node_exporter#3659) - \[BUGFIX] diskstats: Fix rotational queue stats scrape regression [#​3686](prometheus/node_exporter#3686) - \[BUGFIX] filesystem: Prevent panic on mount points with non-UTF-8 names [#​3687](prometheus/node_exporter#3687) </details> --- ### Configuration 📅 **Schedule**: (in timezone Europe/Warsaw) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yNTcuNCIsInVwZGF0ZWRJblZlciI6IjQzLjI1Ny40IiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbInJlbm92YXRlL2NvbnRhaW5lciIsInR5cGUvbWlub3IiXX0=--> Reviewed-on: https://git.ajgon.casa/deedee/mark13/pulls/297
….12.1 ##### [\`v1.12.1\`](https://github.com/prometheus/node_exporter/releases/tag/v1.12.1) - \[BUGFIX] perf: Fix perf profiler flag handling [#3731](prometheus/node_exporter#3731) - \[BUGFIX] edac: Fix optional csrow ue\_count collection [#3734](prometheus/node_exporter#3734) --- ##### [\`v1.12.0\`](https://github.com/prometheus/node_exporter/releases/tag/v1.12.0) - \[FEATURE] mountstats: Add NFS mountpoint info metric [#3554](prometheus/node_exporter#3554) - \[FEATURE] nvmesubsystem: Add new collector [#3579](prometheus/node_exporter#3579) - \[FEATURE] dmmultipath: Add new collector [#3581](prometheus/node_exporter#3581) - \[FEATURE] infiniband: Add device filtering option [#3694](prometheus/node_exporter#3694) - \[ENHANCEMENT] hwmon: disambiguate colliding chip labels [#3646](prometheus/node_exporter#3646) - \[ENHANCEMENT] cpufreq: Add support for cpuinfo\_avg\_freq [#3712](prometheus/node_exporter#3712) - \[ENHANCEMENT] filesystem: Support ext4 super block emergency\_ro flag [#3717](prometheus/node_exporter#3717) - \[ENHANCEMENT] edac: Add per-channel error metrics with DIMM labels [#3720](prometheus/node_exporter#3720) - \[BUGFIX] diskstats: Only enforce mutual exclusivity for non-empty values [#3617](prometheus/node_exporter#3617) - \[BUGFIX] thermal\_zone: Handle EINVAL errors gracefully [#3657](prometheus/node_exporter#3657) - \[BUGFIX] filesystem: Add comma separator in mount options [#3659](prometheus/node_exporter#3659) - \[BUGFIX] diskstats: Fix rotational queue stats scrape regression [#3686](prometheus/node_exporter#3686) - \[BUGFIX] filesystem: Prevent panic on mount points with non-UTF-8 names [#3687](prometheus/node_exporter#3687) --- ##### [\`v1.11.1\`](https://github.com/prometheus/node_exporter/releases/tag/v1.11.1) - \[BUGFIX] Fix kernel\_hung for no data [#3613](prometheus/node_exporter#3613) --- ##### [\`v1.11.0\`](https://github.com/prometheus/node_exporter/releases/tag/v1.11.0) - \[CHANGE] Adds distroless container image. [#3592](prometheus/node_exporter#3592) - \[FEATURE] infiniband: Add `hw_counters` metrics [#2827](prometheus/node_exporter#2827) - \[FEATURE] kernel\_hung: Add collector for kernel hung tasks [#3470](prometheus/node_exporter#3470) - \[FEATURE] mixin: Add "All" option to cluster variable in dashboards [#3509](prometheus/node_exporter#3509) - \[FEATURE] netlink: Add node\_network\_altnames\_info metric [#3541](prometheus/node_exporter#3541) - \[FEATURE] thermal: Add support for CPU temperature metrics on Apple Silicon [#3547](prometheus/node_exporter#3547) - \[FEATURE] bcachefs: Add new collector for bcachefs [#3523](prometheus/node_exporter#3523) - \[ENHANCEMENT] mixin: Make devices in network graphs configurable [#3525](prometheus/node_exporter#3525) - \[ENHANCEMENT] nvme: Add namespace parameters [#3360](prometheus/node_exporter#3360) - \[BUGFIX] netdev: Respect deviceFilter for `node_network_address_info` metric [#3340](prometheus/node_exporter#3340) - \[BUGFIX] mountstats: Fix multiple transports statistics labeling [#3358](prometheus/node_exporter#3358) - \[BUGFIX] diskstats: Fix panic when using device-include flag only [#3603](prometheus/node_exporter#3603)
Fixes #3282 - 10x diskstats latency regression on systems with many block devices
This PR resolves a severe performance regression introduced in PR #3022. The collector was previously calling
SysBlockDeviceQueueStats(dev)for every block device, forcing roughly 30 sysfs file reads per device per scrape. On systems with 1,000+ devices, this resulted in 30,000+ unnecessary file operations, causing scrapes to timeout.This fix excises the expensive struct call and replaces it with a targeted
readRotational(dev)function that reads exactly 1 file per device. The new function safely mirrors previous fallback behavior by strictly validating the content and failing closed to"0"on missing or malformed files. Dynamic tests usingt.TempDir()have been added to ensure robust edge-case handling.