On 2/11/24 02:26, Linux-Fan wrote:
I wrote a program to automatically generate random bytes in multiple
threads:
https://masysma.net/32/big4.xhtml
Before knowing about `fio` this way my way to benchmark SSDs :)
Example:
| $ big4 -b /dev/null 100 GiB
| Ma_Sys.ma Big 4.0.2, Copyright (c) 2014, 2019, 2020 Ma_Sys.ma.
| For further info send an e-mail to ma_sys...@web.de.
|| 0.00% +0 MiB 0 MiB/s 0/102400 MiB
| 3.48% +3562 MiB 3255 MiB/s 3562/102400 MiB
| 11.06% +7764 MiB 5407 MiB/s 11329/102400 MiB
| 19.31% +8436 MiB 6387 MiB/s 19768/102400 MiB
| 27.71% +8605 MiB 6928 MiB/s 28378/102400 MiB
| 35.16% +7616 MiB 7062 MiB/s 35999/102400 MiB
| 42.58% +7595 MiB 7150 MiB/s 43598/102400 MiB
| 50.12% +7720 MiB 7230 MiB/s 51321/102400 MiB
| 58.57% +8648 MiB 7405 MiB/s 59975/102400 MiB
| 66.96% +8588 MiB 7535 MiB/s 68569/102400 MiB
| 75.11% +8343 MiB 7615 MiB/s 76916/102400 MiB
| 83.38% +8463 MiB 7691 MiB/s 85383/102400 MiB
| 91.74% +8551 MiB 7762 MiB/s 93937/102400 MiB
| 99.97% +8426 MiB 7813 MiB/s 102368/102400 MiB
|| Wrote 102400 MiB in 13 s @ 7812.023 MiB/s
What algorithm did you implement?
Secure Random can be obtained from OpenSSL:
| $ time for i in `seq 1 100`; do openssl rand -out /dev/null $((1024 *
1024 * 1024)); done
|
| real 0m49.288s
| user 0m44.710s
| sys 0m4.579s
Effectively 2078 MiB/s (quite OK for single-threaded operation). It is
not designed to generate large amounts of random data as the size is
limited by integer range...
Thank you for posting the openssl(1) incantation.
Benchmarking my daily driver laptop without Intel Secure Key:
2024-02-11 21:54:04 dpchrist@laalaa ~
$ lscpu | grep 'Model name'
Model name: Intel(R) Core(TM) i7-2720QM CPU @
2.20GHz
2024-02-11 21:54:09 dpchrist@laalaa ~
$ time for i in `seq 1 100`; do openssl rand -out /dev/null $((1024 *
1024 * 1024)); done
real 1m40.149s
user 1m25.174s
sys 0m14.952s
So, ~1.072E+9 bytes per second.
Benchmarking a workstation with Intel Secure Key:
2024-02-11 21:54:40 dpchrist@taz ~
$ lscpu | grep 'Model name'
Model name: Intel(R) Xeon(R) E-2174G CPU @ 3.80GHz
2024-02-11 21:54:46 dpchrist@taz ~
$ time for i in `seq 1 100`; do openssl rand -out /dev/null $((1024 *
1024 * 1024)); done
real 1m14.696s
user 1m0.338s
sys 0m14.353s
So, ~1.437E+09 bytes per second.
David