Skip to content

Document the random behavior of choosing which files are being read? #16

@kwinz

Description

@kwinz

Right now the documentation states:
It then randomly chooses a pair of these and reads them back checking they are the same.

So by reading this I would assume that due to random chance it would be possible that even if I let this run for multiple days one file was already read e.g. 4 times, while another file hasn't been read ever. In practice by looking at the implementation it seems to me that not just stressdisk cycle but also stressdisk run is implemented in rounds. And during each round each file is read exactly twice before progressing to the next round. (Ignoring the unlucky case where one file would be selected to be compared to itself then that check would probably be skipped).
Sorry if I got anything wrong here, I just had a brief glance at the code.

Do we want to document this behaviour? I think sometimes it's useful to make sure that every file has been read at least once if you want to test some hardware. I know stressdisk's main purpose is seems to be to create a lot of seek stress to test the drive this way, but ensuring every file was tried at least once as soon as it prints "Starting round 2" would be a nice additional guarantee.

Or is this implementation detail undocumented on purpose? E.g. so the implementation can change in the future.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions