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

Use /dev/zero for disk rate check #829

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

q-wertz
Copy link

@q-wertz q-wertz commented Jan 9, 2025

Pull Request Details

/dev/random is slow by design and probably a bottleneck in the check.
/dev/zero should be faster.

Description

On test we triggered the warning of a too slow disk write speed.
The test internally uses dd to test the disk write speed but with the
if=/dev/random which will be slow as soon as random source is
depleted. See e.g.

~ $ dd if=/dev/zero of=/home/username/Downloads/test.dat bs=8k count=10k
10240+0 records in
10240+0 records out
83886080 bytes (84 MB, 80 MiB) copied, 0,0512609 s, 1,6 GB/s
~ $ dd if=/dev/random of=/home/username/Downloads/test.dat bs=8k count=10k
10240+0 records in
10240+0 records out
83886080 bytes (84 MB, 80 MiB) copied, 0,292775 s, 287 MB/s

This leads to inaccurate test results and warnings that might unsettle
the user.

Related Issue

Which devices/areas does this affect?

All devices.

Testing Done

See above.

Checklist

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project. See CODING.md.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes, and all previous tests pass.
  • I have checked all compat numbers if they need updating (FPGA compat,
    MPM compat, noc_shell, specific RFNoC block, ...)

/dev/random is slow by design and probably a bottleneck in the check. /dev/zero should be faster.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant