Skip to content

Performance regression in diskstats collector #3282

@wjordan

Description

@wjordan

#3022 adds the rotational label to the info metric for devices through an extra call to SysBlockDeviceQueueStats, which reads a large number of of queue sysfs files and causes a significant performance regression in the diskstats collector.

On a system with a large number (thousands) of block devices, the diskstats collector now takes ~10x longer to scrape (~400ms -> ~4s) in version 1.9 because of this change.

Given the added overhead of this new collection, I think the new rotational label should be removed, or controlled by a config flag, so that it can be selectively enabled/disabled when not needed.

Or an alternative implementation that just reads+parses the rotational file directly (and not all other ones in the /queue sysfs directory) could have much less of a performance impact.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions