Use /dev/zero for disk rate check

/dev/random is slow by design and probably a bottleneck in the check. /dev/zero should be faster.
This commit is contained in:
q-wertz 2025-01-09 15:10:26 +01:00 committed by joerg.hofrichter@emerson.com
parent 0a6d5fc934
commit a0a3c3a856

View file

@ -64,7 +64,7 @@ double disk_rate_check(const size_t sample_type_size,
boost::filesystem::path(file).parent_path() / boost::filesystem::unique_path();
std::string disk_check_proc_str =
"dd if=/dev/random of=" + temp_file.native()
"dd if=/dev/zero of=" + temp_file.native()
+ " bs=" + std::to_string(samps_per_buff * channel_count * sample_type_size)
+ " count=100";