A curious statement about a QLC drive made me write this program: The read speed is about 2000MB/sec, but with a full cache, or after about 140GB, the read speed goes down to 185MB/sec. The truth is far more complex, but perhaps this program will come in handy one day.
You may thus find out that depending on the buffer size the read speed is fast in the beginning, but then later drops.
mkspiral s1 1000000 nmodel=40 mkspiral s2 1000000 nmodel=400 mkspiral s3 1000000 nmodel=4000and to time them
/usr/bin/time bigread s1 0.1 0 602.353 1 1706.67 2 1706.67 ... 18 1280 19 1024 20 1470.61 ### nemo Debug Info: End-time 1.73 sec Speed: n=21 min=602.353 max=1706.67 mean=1313.52 median=1280 rms=284.617 0.00user 1.74system 0:02.17elapsed 80%CPU (0avgtext+0avgdata 107296maxresident)k 4375016inputs+0outputs (0major+26364minor)pagefaults 0swapsFor benchmarking sometimes you want to make sure the I/O cache is empty. On linux the following command will do this: (as root)
sync ; sync; sync; sudo echo 1 > /proc/sys/vm/drop_caches sync ; sync; sync;
bigread s1 0.1 cat s1 | bigread - 0.1
Obviously, making bufsize (which is in GB) too large, you can find out how well your swap performs.
For debug=1 the output also contains the timers(3NEMO) , which is much harder to interpret on a mult-tasking system.
11-Jul-20 V0.1 created PJT
Table of Contents