Skip to content

Commit

Permalink
Use /dev/zero for disk rate check
Browse files Browse the repository at this point in the history
/dev/random is slow by design and probably a bottleneck in the check. /dev/zero should be faster.
  • Loading branch information
q-wertz authored Jan 9, 2025
1 parent e75629c commit 471cdfd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion host/examples/rx_samples_to_file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down

0 comments on commit 471cdfd

Please sign in to comment.