Benchmark: Difference between revisions
(→hdparm) |
(→hdparm) |
||
Line 234: | Line 234: | ||
hdparm -I /dev/sda # show information about disk | hdparm -I /dev/sda # show information about disk | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Example: [https://www.silicon-power.com/web/category/SSD Silicon-power] 512GB ssd. | Example: [https://www.silicon-power.com/web/category/SSD Silicon-power] 512GB ssd. The box says it can read up to 560MB/s & write up to 530MB/s. Below is a test result running on NUC Pentium Silver J5005 CPU. | ||
<pre> | <pre> | ||
$ sudo hdparm -t --direct /dev/sdb1 | $ sudo hdparm -t --direct /dev/sdb1 | ||
Line 242: | Line 242: | ||
Timing O_DIRECT disk reads: 1068 MB in 3.01 seconds = 355.34 MB/sec | Timing O_DIRECT disk reads: 1068 MB in 3.01 seconds = 355.34 MB/sec | ||
</pre> | </pre> | ||
On | On UDOO x86, the SSD is 341.77MB/s. The eMMC speed on UDOO x86 is 130MB/s. | ||
On phenom server, the HDD speed is 150MB/s (WD black WD4003FZEX 4TB, 2013) and 68MB/s (ST ST3640323as 640GB, 2014). | |||
On Raspberry Pi 3B, the microSD speed is 22MB/s only. The same SSD plugged to a USB2 port has a speed 34MB/s only. | |||
= Website loading = | = Website loading = |
Revision as of 15:11, 28 November 2019
Geekbench
Geekbench is a cross-platform benchmark that measures the performance of your computer's processor and memory.
Sysbench
sudo apt-get update sudo apt-get install sysbench sysbench --num-threads=1 --test=cpu --cpu-max-prime=20000 --validate run # sysbench version is 0.4.12 sysbench --threads=1 --test=cpu --cpu-max-prime=20000 --validate run # sysbench version 1.0.11
The following one was used to benchmark Raspberry Pi 32-bit vs 64-bit.
sysbench --threads=4 --test=cpu --cpu-max-prime=300000 run && 7za b
Device | Total time (1-thread) | Total time (all threads) | Average CPU Mark |
---|---|---|---|
Intel Core i7-8750H @ 2.20GHz Macbook Pro 2018 (6 cores) | 12407 | ||
Xeon E5-1650 (12 threads) | 23s | 2.5s | 11808 |
Intel i3-4590T (4-core) Dell Optiplex 3020M | 5622 | ||
AMD Phenom II X6 1055T (6-core) | 28s | 5.5s | 5058 |
Intel Core2 Quad Q9500 @2.8GHz (4-core) | 3542 | ||
Intel Core2 Duo E8400 @3.0GHz (2-core) | 21.5s | 11.5s | 2178 |
Intel Core i3-4010U @ 1.7GHz (4-core) | 47.2s | 13.4s | 2437 |
Core(TM) i3-3110M @ 2.40GHz (4-core) | 35s | 10s | 3049 |
Core(TM) i7-2640M CPU @ 2.80GHz (Lenovo T420s) | 10s | 10s | 3933 |
Atom(TM) z3735G @ 1.33GHz (hp stream 8 2-core) | 918 | ||
Atom(TM) z2760 @ 1.8GHz (lenovo lynx 2-core) | 576 | ||
Atom(TM) N270 @ 1.60GHz (EEE PC 2-core) | 192s | 120s | 272 |
RPi1 (1-core) | 1412s | ||
RPi2 (4-core) | 768s | 191s | |
RPi2 (4-core) | 768s | 191s | |
RPi0-W (1-core) | 624s | ||
BeagleBlack (1-core) | 673s | ||
UDoo (2-core) | 603s | 302s | |
UDoo X86 Advanced Celeron N3160 2.24 GHZ turbo speed (2-core) | 1472 | ||
ODroid xu4 (8-core) | 372s | 60s |
Note that
- The /proc/cpuinfo shows only the current CPU freq. If we specify all threads when we ran the sysbench, we will be able to see the CPU MHz changed when we run watch.
watch -n1 "cat /proc/cpuinfo | grep \"MHz\""
- To get the maximum freq, follow this
sudo cat /sys/devices/system/cpu/*/cpufreq/cpuinfo_max_freq
- for the Xeon(R) E5-1650 @ 3.2GHz,
brb@T3600 ~ $ cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 45 model name : Intel(R) Xeon(R) CPU E5-1650 0 @ 3.20GHz stepping : 7 microcode : 0x70d cpu MHz : 1229.125 cache size : 12288 KB physical id : 0 siblings : 12 core id : 0 cpu cores : 6 apicid : 0 initial apicid : 0 fpu : yes fpu_exception : yes cpuid level : 13 wp : yes brb@T3600 ~ $ lscpu Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 12 On-line CPU(s) list: 0-11 Thread(s) per core: 2 Core(s) per socket: 6 Socket(s): 1 NUMA node(s): 1 Vendor ID: GenuineIntel CPU family: 6 Model: 45 Stepping: 7 CPU MHz: 1221.625 BogoMIPS: 6384.41 Virtualization: VT-x L1d cache: 32K L1i cache: 32K L2 cache: 256K L3 cache: 12288K NUMA node0 CPU(s): 0-11
nbench
wget http://www.tux.org/~mayer/linux/nbench-byte-2.2.3.tar.gz tar xzvf nbench-byte-2.2.3.tar.gz cd nbench-byte-2.2.3 make ./nbench
Simple C program
See Time the iterations from 0 to_2147483647
R program
Gross inefficiency in influence.lm, r-source on github
Videos
Raspberry Pi 4B vs Jetson Nano
Disk speed test
- Disk Speed Test (Read/Write): HDD, SSD Performance in Linux
- GUI method: use the 'disks' (gnome-disks) utility in Ubuntu
dd
Linux and Unix Test Disk I/O Performance With dd Command
- Test write speed
$ sync; dd if=/dev/zero of=tempfile bs=1M count=1024; sync # External storage $ sync; dd if=/dev/zero of=/media/user/MyUSB/tempfile bs=1M count=1024; sync
- Test read speed
$ dd if=tempfile of=/dev/null bs=1M count=1024 # do not use this # Clear the cache $ sudo /sbin/sysctl -w vm.drop_caches=3 $ dd if=tempfile of=/dev/null bs=1M count=1024 # consistent with 'disks' utility
hdparm
hdparm is a Linux command line utility that allows to set and view hardware parameters of hard disk drives. -t and --direct measures data transfer rate but bypassing hard drive's buffer cache memory thus reading directly from the disk.
sudo hdparm -t --direct /dev/mmcblk0p1 # eg internal sudo hdparm -t --direct /dev/mmcblk0p2 # eg sd card sudo hdparm -t --direct /dev/sda1 # eg USB sudo hdparm -Tt /dev/sda sudo hdparm -t /dev/vdb # Measure Hard Disk Device Read Speed sudo hdparm -T /dev/vdb # Measure Hard Disk Cache Read Speed # Reading cache will give more higher performance than reading # from disk because only the cached data will be used and tested. hdparm -I /dev/sda # show information about disk
Example: Silicon-power 512GB ssd. The box says it can read up to 560MB/s & write up to 530MB/s. Below is a test result running on NUC Pentium Silver J5005 CPU.
$ sudo hdparm -t --direct /dev/sdb1 [sudo] password for brb: /dev/sdb1: Timing O_DIRECT disk reads: 1068 MB in 3.01 seconds = 355.34 MB/sec
On UDOO x86, the SSD is 341.77MB/s. The eMMC speed on UDOO x86 is 130MB/s.
On phenom server, the HDD speed is 150MB/s (WD black WD4003FZEX 4TB, 2013) and 68MB/s (ST ST3640323as 640GB, 2014).
On Raspberry Pi 3B, the microSD speed is 22MB/s only. The same SSD plugged to a USB2 port has a speed 34MB/s only.
Website loading
Network speed
- 4.5MB/s wifi on raspberry pi 3B+ at home (tested using scp)