Benchmark: Difference between revisions
Tags: mobile edit mobile web edit |
|||
(54 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
= [http://www.geekbench.com/ Geekbench] | = Geekbench and Geekbench browser = | ||
[http://www.geekbench.com/ Geekbench] is a cross-platform benchmark that measures the performance of your computer's processor and memory. | |||
* Download Geekbench 5. https://www.geekbench.com/download/, [https://www.geekbench.com/blog/2021/03/geekbench-54/ ARM]. | |||
* How to run geekbench on the raspberry pi | |||
* Some testing results from running GeekBench 6 on Android devices (gpu benchmark is based on [https://browser.geekbench.com/opencl-benchmarks OpenCL]) | |||
** Unisoc t820 on anbernic rg556: [https://nanoreview.net/en/soc-compare/unisoc-t820-vs-qualcomm-snapdragon-778g-5g cpu 872/2349, gpu 2248] | |||
** RK3588 on Orange Pi 5+: cpu 738/2243, '''gpu 3496''' [https://gadgetversus.com/processor/unisoc-tiger-t820-vs-rockchip-rk3588/ Unisoc Tiger T820 vs Rockchip RK3588] | |||
** Snapdragon 720G on Galaxy s6 lite SM-P613 2022 : cpu 735/1641, gpu 1211 | |||
** Snapdragon 662 on moto g power 2021: cpu 337/1184, gpu 301 | |||
* [https://write.corbpie.com/how-to-install-and-run-geekbench-on-ubuntu/ How to install and run Geekbench on Ubuntu] | |||
<pre> | |||
wget https://cdn.geekbench.com/Geekbench-5.3.1-Linux.tar.gz | |||
tar xf Geekbench-5.3.1-Linux.tar.gz | |||
cd Geekbench-5.3.1-Linux/ | |||
./geekbench5 | |||
</pre> | |||
= Sysbench = | = Sysbench = | ||
<syntaxhighlight lang='bash'> | <syntaxhighlight lang='bash'> | ||
# Enable 'Universe' first | |||
sudo apt-get update | sudo apt-get update | ||
sudo apt-get install sysbench | sudo apt-get install sysbench | ||
sysbench --num-threads=1 --test=cpu --cpu-max-prime=20000 | sysbench --num-threads=1 --test=cpu --cpu-max-prime=20000 run | ||
# sysbench version is 0.4.12, Ubuntu 16.04 | # sysbench version is 0.4.12, Ubuntu 16.04, 10000 events | ||
sysbench --threads=1 | sysbench cpu --threads=1 --cpu-max-prime=20000 --time=0 --events=10000 run | ||
# sysbench version 1.0.11, Ubuntu 18.04 | # sysbench version 1.0.11, Ubuntu 18.04 | ||
</syntaxhighlight> | </syntaxhighlight> | ||
See [https://youtu.be/G-w7ycyd8tA?t=535 Odroid C4 vs Raspberry Pi 4] (ExplainingComputers) for a video demonstration. See [https://youtu.be/0kr_yS9OhLM?t=1158 Raspberry Pi OS Bullseye Update: New Features & Camera Issues] for a comparison of the syntax of version 0.4.12 and 1.0.x. | |||
Two websites have a database for benchmarks. | Two websites have a database for benchmarks. | ||
Line 27: | Line 40: | ||
! Average CPU Mark | ! Average CPU Mark | ||
|- | |- | ||
| [https://everymac.com/systems/apple/macbook_pro/specs/macbook-pro-core-i7-2. | | Intel i7-11850H @ 2.5GHz (Dell Latitude 5521, 8 cores, 16 threads) | ||
| | | 6.42s | ||
| | | 1.1s | ||
| | |||
|- | |||
| [https://everymac.com/systems/apple/macbook_pro/specs/macbook-pro-core-i7-2.6-15-mid-2018-true-tone-display-touch-bar-specs.html Intel Core i7-8850H @ 2.6GHz Macbook Pro 2018 (6 cores, 12 threads)] brew install sysbench | |||
| 0.0028s (not reliable on macOS) | |||
| 0.0008s | |||
| [https://www.cpubenchmark.net/compare/Intel-Core-i7-8750H-vs-Intel-Core-i7-7700HQ/3237vs2906 12407] | | [https://www.cpubenchmark.net/compare/Intel-Core-i7-8750H-vs-Intel-Core-i7-7700HQ/3237vs2906 12407] | ||
|- | |- | ||
| [http://ark.intel.com/products/64601/Intel-Xeon-Processor-E5-1650-12M-Cache-3_20-GHz-0_0-GTs-Intel-QPI Xeon E5-1650 (12 threads)] | | [http://ark.intel.com/products/64601/Intel-Xeon-Processor-E5-1650-12M-Cache-3_20-GHz-0_0-GTs-Intel-QPI Xeon E5-1650 Dell Precision T3600 (6 cores, 12 threads)] | ||
| 23s | | 23s | ||
| 2.5s | | 2.5s | ||
Line 42: | Line 60: | ||
| [https://www.cpubenchmark.net/cpu.php?cpu=Intel+Core+i5-4590T+%40+2.00GHz&id=2276 5622] | | [https://www.cpubenchmark.net/cpu.php?cpu=Intel+Core+i5-4590T+%40+2.00GHz&id=2276 5622] | ||
|- | |- | ||
| Intel i5 8259U (4-core) NUC8i5BEH 4-core 8-thread | | Intel i5 8259U (4-core) [https://www.intel.com/content/dam/support/us/en/documents/mini-pcs/NUC8i3BE_NUC8i5BE_NUC8i7BE_TechProdSpec.pdf NUC8i5BEH] 4-core 8-thread | ||
| | | 20.7s | ||
| | | 3.2s | ||
| | | | ||
|- | |- | ||
Line 52: | Line 70: | ||
| [http://www.cpubenchmark.net/cpu.php?cpu=AMD+Phenom+II+X6+1055T&id=390 5058] | | [http://www.cpubenchmark.net/cpu.php?cpu=AMD+Phenom+II+X6+1055T&id=390 5058] | ||
|- | |- | ||
| Intel Core2 Quad Q9500 @2.8GHz (4-core) | | Intel [https://www.intel.com/content/www/us/en/products/sku/37159/intel-core2-quad-processor-q9500-6m-cache-2-83-ghz-1333-mhz-fsb/specifications.html Core2 Quad Q9500] @2.8GHz (4-core) Yorkfield | ||
| | | 23.8s | ||
| | | 6.1s | ||
| [https://www.cpubenchmark.net/cpu.php?cpu=Intel+Core2+Quad+Q9500+%40+2.83GHz 3542] | | [https://www.cpubenchmark.net/cpu.php?cpu=Intel+Core2+Quad+Q9500+%40+2.83GHz 3542] | ||
|- | |- | ||
| Intel Pentium J5005 4-core 4-thread | | Intel [https://ark.intel.com/content/www/us/en/ark/products/128984/intel-pentium-silver-j5005-processor-4m-cache-up-to-2-80-ghz.html Pentium J5005] 4-core 4-thread (Gemini Lake) [https://www.intel.com/content/dam/support/us/en/documents/mini-pcs/nuc-kits/NUC7xJY_TechProdSpec.pdf NUC7PJYH] | ||
| | | 16 | ||
| | | 4.3s | ||
| | | | ||
|- | |- | ||
Line 78: | Line 96: | ||
|- | |- | ||
| Core(TM) i7-2640M CPU @ 2.80GHz (Lenovo T420s) | | Core(TM) i7-2640M CPU @ 2.80GHz (Lenovo T420s) | ||
| | | | ||
| | | | ||
| [https://www.cpubenchmark.net/cpu.php?cpu=Intel+Core+i7-2640M+%40+2.80GHz&id=876 3933] | | [https://www.cpubenchmark.net/cpu.php?cpu=Intel+Core+i7-2640M+%40+2.80GHz&id=876 3933] | ||
|- | |- | ||
Line 108: | Line 126: | ||
|- | |- | ||
| RPi3B BCM2837 SoC @ 1.2Ghz (4-core) | | RPi3B BCM2837 SoC @ 1.2Ghz (4-core) | ||
| | | 382s | ||
| | | 100s | ||
| | | | ||
|- | |- | ||
Line 132: | Line 150: | ||
| | | | ||
|- | |- | ||
| [[Udoo#Benchmark|UDoo X86 Advanced Celeron N3160 2.24 GHZ turbo speed (2-core) ]] | | [[Udoo#Benchmark|UDoo X86 Advanced Celeron N3160 2.24 GHZ turbo speed (2-core, 4 threads) ]] | ||
| | | 52s | ||
| | | 13s | ||
| 1472 | | 1472 | ||
|- | |- | ||
| [[Odroid#Benchmark|ODroid xu4 (8-core)]] | | [[Odroid#Benchmark|ODroid xu4 (8-core)]] | ||
| 372s | | 372s | ||
| | | 40s | ||
| | |||
|- | |||
| [[Jetson#Benchmark|Jetson nano (4-core)]] | |||
| 21.4s | |||
| 5s | |||
| | | | ||
|} | |} | ||
Line 175: | Line 198: | ||
</pre> | </pre> | ||
== Run | == Run using Docker == | ||
Odroid xu4 | |||
{{Pre}} | {{Pre}} | ||
$ docker run -it --rm ubuntu:16.04 bash | |||
# apt update | |||
$ | # apt-get install sysbench | ||
# sysbench --num-threads=8 --test=cpu --cpu-max-prime=20000 run | |||
sysbench 0.4.12: multi-threaded system evaluation benchmark | |||
Running the test with following options: | |||
Number of threads: 8 | |||
Additional request validation enabled. | |||
Doing CPU performance benchmark | |||
Threads started! | |||
Done. | |||
Maximum prime number checked in CPU test: 20000 | |||
Test execution summary: | |||
total time: 39.5979s | |||
total number of events: 10000 | |||
total time taken by event execution: 316.5830 | |||
per-request statistics: | |||
min: 23.31ms | |||
avg: 31.66ms | |||
max: 73.12ms | |||
approx. 95 percentile: 37.96ms | |||
Threads fairness: | |||
events (avg/stddev): 1250.0000/201.36 | |||
execution time (avg/stddev): 39.5729/0.01 | |||
# sysbench --help | |||
Usage: | |||
sysbench [general-options]... --test=<test-name> [test-options]... command | |||
General options: | |||
--num-threads=N number of threads to use [1] | |||
--max-requests=N limit for total number of requests [10000] | |||
--max-time=N limit for total execution time in seconds [0] | |||
--forced-shutdown=STRING amount of time to wait after --max-time before forcing shutdown [off] | |||
--thread-stack-size=SIZE size of stack per thread [32K] | |||
--init-rng=[on|off] initialize random number generator [off] | |||
--test=STRING test to run | |||
--debug=[on|off] print more debugging info [off] | |||
--validate=[on|off] perform validation checks where possible [off] | |||
--help=[on|off] print help and exit | |||
--version=[on|off] print version and exit | |||
CPU speed | Compiled-in tests: | ||
fileio - File I/O test | |||
cpu - CPU performance test | |||
memory - Memory functions speed test | |||
threads - Threads subsystem performance test | |||
mutex - Mutex performance test | |||
oltp - OLTP test | |||
Commands: prepare run cleanup help version | |||
See 'sysbench --test=<name> help' for a list of options for each test. | |||
</pre> | |||
Directly | |||
{{Pre}} | |||
$ cat /etc/os-release | |||
NAME="Ubuntu" | |||
VERSION="18.04.5 LTS (Bionic Beaver)" | |||
$ apt install sysbench # 1.0.11 | |||
$ sysbench cpu --threads=8 --cpu-max-prime=20000 --time=0 --events=10000 run | |||
$ | |||
sysbench 1.0.11 (using system LuaJIT 2.1.0-beta3) | sysbench 1.0.11 (using system LuaJIT 2.1.0-beta3) | ||
Running the test with following options: | Running the test with following options: | ||
Number of threads: | Number of threads: 8 | ||
Initializing random number generator from current time | Initializing random number generator from current time | ||
Line 273: | Line 287: | ||
CPU speed: | CPU speed: | ||
events per second: | events per second: 221.17 | ||
General statistics: | General statistics: | ||
total time: | total time: 45.2074s | ||
total number of events: | total number of events: 10000 | ||
Latency (ms): | Latency (ms): | ||
min: | min: 25.98 | ||
avg: | avg: 36.14 | ||
max: | max: 69.89 | ||
95th percentile: | 95th percentile: 44.98 | ||
sum: | sum: 361398.71 | ||
Threads fairness: | Threads fairness: | ||
events (avg/stddev): | events (avg/stddev): 1250.0000/246.26 | ||
execution time (avg/stddev): | execution time (avg/stddev): 45.1748/0.01 | ||
</pre> | |||
== Run sysbench 0.4.12 using singularity == | |||
# Install singularity either from pre-build binary or source (See the 'Docs' under https://sylabs.io/singularity/) | |||
# Create a new sub and build a container | |||
# 'Execute' the container | |||
{{Pre}} | |||
# step 1: the following method installed an old version (2.6.1) of singularity | |||
# | |||
$ wget -O- http://neuro.debian.net/lists/bionic.us-nh.libre | sudo tee /etc/apt/sources.list.d/neurodebian.sources.list | |||
$ sudo apt-key adv --recv-keys --keyserver hkp://pool.sks-keyservers.net:80 0xA5D32F012649A5A9 | |||
$ sudo apt update | |||
$ sudo apt-get install singularity-container | |||
$ singularity --version | |||
# step 2 | |||
$ mkdir sysbench; cd sysbench | |||
$ nano sysbench.def | |||
$ sudo singularity build sysbench0412 sysbench.def | |||
# step 3 | |||
$ singularity exec sysbench0412 sysbench --num-threads=1 --test=cpu --cpu-max-prime=20000 --validate run | |||
$ singularity exec sysbench0412 sysbench --num-threads=4 --test=cpu --cpu-max-prime=20000 --validate run | |||
</pre> | </pre> | ||
where the definition file <Singularity> (recall Ubuntu 16.04 still has the old version of sysbench) is | |||
<pre> | |||
$ cat sysbench.def | |||
Bootstrap: docker | |||
From: ubuntu:16.04 | |||
%post | |||
apt-get -y update | |||
apt-get -y install sysbench | |||
%environment | |||
export LC_ALL=C | |||
export PATH=/usr/games:$PATH | |||
</pre> | </pre> | ||
Interestingly, the container build using singularity 2.6.1 also works on singularity 3.5.0 (compile from source). | |||
= [http://www.tux.org/~mayer/linux/bmark.html nbench] = | = [http://www.tux.org/~mayer/linux/bmark.html nbench] = | ||
Line 312: | Line 351: | ||
./nbench | ./nbench | ||
</syntaxhighlight> | </syntaxhighlight> | ||
= CPU stress test = | = CPU stress test = | ||
Line 337: | Line 371: | ||
</li> | </li> | ||
</ul> | </ul> | ||
= CPU/GPU overlock = | = GPU = | ||
[https://www.howtogeek.com/how-to-understand-gpu-benchmarks/ How To Understand GPU Benchmarks] | |||
== iGPU == | |||
* You can find the number of '''cores''' in an iGPU by looking up the specifications of the CPU that contains the iGPU. This information can be found on the manufacturer’s website or through a web search. For example, if you search for [https://ark.intel.com/content/www/us/en/ark/products/208664/intel-core-i71185g7-processor-12m-cache-up-to-4-80-ghz-with-ipu.html Intel Core i7-1185G7] specifications” you will find that this CPU has an integrated Intel Iris Xe Graphics with 96 '''Execution Units (EUs)''', which are equivalent to cores in a GPU. | |||
* [https://www.makeuseof.com/amd-radeon-igpu-vs-intel-iris-xe/ AMD Radeon iGPU vs. Intel Iris Xe: What's the Best Integrated Graphics?] | |||
== CPU/GPU overlock == | |||
[https://www.makeuseof.com/ways-to-check-if-cpu-gpu-overclocked/ 3 Ways to Check If Your CPU or GPU Is Overclocked] | [https://www.makeuseof.com/ways-to-check-if-cpu-gpu-overclocked/ 3 Ways to Check If Your CPU or GPU Is Overclocked] | ||
== NVIDIA GPU == | |||
<ul> | |||
<li>The main difference between NVIDIA '''GeForce GTX''' and '''Quadro''' GPUs is their target audience and intended use. | |||
* '''GeForce GTX''' series is primarily designed for gaming and consumer-level applications. These graphics cards are optimized for high performance, which reduces latency in online games. GeForce GTX cards are designed specifically for gaming and consumer-level applications. They are optimized for high performance, which '''reduces latency''' in online games. | |||
* '''Quadro''' series is designed for professional applications such as computer-aided design (CAD), digital content creation (DCC), and scientific simulations. Quadro cards are designed for very specific render tasks like CAD design and professional video rendering. They also '''support double precision computations''' which are used in scientific research and digital content creation (DCC) 12. This makes them more suitable for scientific simulations than GTX cards. | |||
<li>Monitor GPU in real-time | |||
<syntaxhighlight lang='sh'> | |||
$ nvidia-smi -l 1 | |||
</syntaxhighlight> | |||
<li>[https://hub.docker.com/r/nvidia/cuda/ Docker nvidia/cuda] | |||
<li>[https://www.howtogeek.com/devops/how-to-use-an-nvidia-gpu-with-docker-containers/ How to Use an NVIDIA GPU with Docker Containers] | |||
</ul> | |||
== Glmark2 == | |||
* It requires X11 (not wayland) | |||
* https://github.com/glmark2/glmark2. Ubuntu 24.04 using X11 still works. | |||
* [https://www.youtube.com/watch?v=dljAxpjyRVc Raspberry Pi 5 vs Intel N100 Mini PC - Which Is Right For You] | |||
* [https://askubuntu.com/a/1452081 How can I run glmark2 on the dedicated GPU?] | |||
* [https://readmedium.com/opengl-and-cuda-applications-in-docker-af0eece000f1 OpenGL and CUDA Applications in Docker]. Use host's X server. | |||
= Hardinfo (GUI) = | = Hardinfo (GUI) = | ||
Line 358: | Line 419: | ||
* sudo lshw -C display | * sudo lshw -C display | ||
* lspci | grep -i --color 'vga\|3d\|2d' | * lspci | grep -i --color 'vga\|3d\|2d' | ||
== webgl == | |||
http://webglsamples.org/aquarium/aquarium.html | |||
* Macbook Pro A1990 (2018) @2.6GHz. 60fps 1000 fish, 44fps 5000 fish, 27fps 10000 fish | |||
* NUC7PJYH Pentium J5005 @2.8GHz. 60fps 1000 fish, 42fps 5000 fish, 26fps 10000 fish | |||
* Jetson nano 2G, 60fps 1000 fish, 26fps 5000 fish, 14fps 10000 fish | |||
* Macbook Pro M1 2021, 120fps 5000 fish, 120fps 10000 fish, 65fps 20000 fish, 45fps 30000 fish. | |||
= USB, SATA and PCIe = | |||
* [https://www.makeuseof.com/raspberry-pi-4-vs-raspberry-pi-5-key-differences/ Raspberry Pi 4 vs. Raspberry Pi 5: 14 Key Differences] | |||
** the PCIe on the Raspberry Pi 5 is a single-line PCI Express 2.0 x1 connector. This has a maximum bandwidth of 500MBps (Bytes, not bits). The latest PCIe 4.0 SSDs can do 8000Mbps (1000MBps). | |||
** Whether a SATA SSD connected to USB 3.0 is a better choice then an M.2 SSD connected to PCIe: USB 3.0 in the Pi 5 is 5Gbps, which is 625MBps. SATA 3 adapters can handle 6Gbps. '''PCIe''' 2.0 x1 is limited to 500MBps. So, it will be similar speeds for both '''SATA''' and '''PCIe''' SSDs on the Pi 5. The advantage with SATA adapters is that you do not need to use the HAT. | |||
= Disk speed test = | = Disk speed test = | ||
<ul> | |||
<li>[https://www.shellhacks.com/disk-speed-test-read-write-hdd-ssd-perfomance-linux/ Disk Speed Test (Read/Write): HDD, SSD Performance in Linux] | |||
<li>GUI method: use the 'disks' (gnome-disks) utility in Ubuntu | |||
<li>[https://www.tech21century.com/hdd-ssd-drive-speed-test/ 14 Hard Drive Speed Test & Benchmark Tools for SSD/HDD] such as [https://crystalmark.info/en/software/crystaldiskmark/ CrystalDiskMark] | |||
<li>http://www.cyberciti.biz/faq/freebsd-command-to-find-sata-link-speed/ | |||
{{Pre}} | |||
$ dmesg | grep -i SATA | |||
[ 0.311173] pci 0000:00:11.0: set SATA to AHCI mode | |||
[ 1.510881] ahci 0000:00:11.0: AHCI 0001.0200 32 slots 4 ports 6 Gbps 0xf impl SATA mode | |||
[ 1.512669] ata1: SATA max UDMA/133 abar m1024@0xfe02f000 port 0xfe02f100 irq 19 | |||
[ 1.512672] ata2: SATA max UDMA/133 abar m1024@0xfe02f000 port 0xfe02f180 irq 19 | |||
[ 1.512675] ata3: SATA max UDMA/133 abar m1024@0xfe02f000 port 0xfe02f200 irq 19 | |||
[ 1.512677] ata4: SATA max UDMA/133 abar m1024@0xfe02f000 port 0xfe02f280 irq 19 | |||
[ 1.832349] ata4: SATA link down (SStatus 0 SControl 300) | |||
[ 1.832418] ata2: SATA link down (SStatus 0 SControl 300) | |||
[ 2.004290] ata3: SATA link up 6.0 Gbps (SStatus 133 SControl 300) | |||
[ 2.004313] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300) | |||
</pre> | |||
<li>[https://www.makeuseof.com/ways-test-ssd-speed-performance/ 3 Ways to Test SSD Speed & Performance] (windows, mac, linux) | |||
</ul> | |||
== KDiskMark (GUI) == | == KDiskMark (GUI) == | ||
Line 372: | Line 462: | ||
* Test write speed | * Test write speed | ||
:<syntaxhighlight lang='bash'> | :<syntaxhighlight lang='bash'> | ||
$ sync; dd if=/dev/zero of=tempfile bs=1M count=1024; sync | $ sync; dd if=/dev/zero of=tempfile bs=1M count=1024; sync; rm tempfile | ||
# External storage | # External storage | ||
Line 387: | Line 477: | ||
== hdparm == | == hdparm == | ||
''' | To test the disk performance, follow [http://www.cyberciti.biz/faq/howto-linux-unix-test-disk-performance-with-dd-command/ cyberciti.biz]. Note that the parameter '''oflag=dsync''' makes a difference. '''-t and --direct''' measures data transfer rate but bypassing hard drive's buffer cache memory thus reading directly from the disk. | ||
Here I have a 7200rpm Seagate (ST2000DM001-1CH164) and a 5400rpm WD-blue (WD30EZRZ-00WN9B0) | |||
{{Pre}} | |||
# Hard disk info https://en.wikipedia.org/wiki/Hdparm | |||
sudo hdparm -I /dev/sda | |||
sudo hdparm -I /dev/sdb | |||
# Writing speed, where /tmp is a directory from the disk | |||
dd if=/dev/zero of=/tmp/test1.img bs=2G count=1; rm /tmp/test1.img | |||
# 1.4 GB/s from either 5400 or 7200 rpm | |||
$ dd if=/dev/zero of=/media/brb/My\ Passport/test1.img bs=2G count=1 | |||
# 2147479552 bytes (2.1 GB, 2.0 GiB) copied, 12.0418 s, 178 MB/s. --- WD 2T HDD | |||
dd if=/dev/zero of=/tmp/test1.img bs=2G count=1 oflag=dsync; rm /tmp/test1.img | |||
# 115 MB/s from 5400 rpm | |||
# 166 MB/s from 7200 rpm | |||
# Latency | |||
dd if=/dev/zero of=/tmp/test2.img bs=512 count=1000 oflag=dsync; rm /tmp/test2.img | |||
# 27.7 kB/s from 5400 rpm <==== This is interesting | |||
# 12.5 kB/s from 7200 rpm | |||
# Read speed | |||
dd if=/dev/zero of=/tmp/test3.img bs=1G count=1 oflag=direct; rm /tmp/test3.img | |||
# 122 MB/s from 5400 rpm | |||
# 180 MB/s from 7200 rpm | |||
</pre> | |||
Note | |||
* [http://man7.org/linux/man-pages/man1/dd.1.html dd manual] | |||
* oflag=dsync: Use synchronized I/O for data. Do not skip this option. This option get rid of caching and gives you good and accurate results | |||
<syntaxhighlight lang='bash'> | <syntaxhighlight lang='bash'> | ||
lsblk # find the root "/" device | lsblk # find the root "/" device, look at the "NAME" column | ||
sudo hdparm -t [DEVICE NAME] # real world scenario | |||
# Using a partition name may work | |||
</syntaxhighlight> | |||
<syntaxhighlight lang='bash'> | |||
# The --direct option bypasses the operating system's caches. | |||
sudo hdparm -t --direct /dev/mmcblk0p1 # eg internal | sudo hdparm -t --direct /dev/mmcblk0p1 # eg internal | ||
sudo hdparm -t --direct /dev/mmcblk0p2 # eg sd card | sudo hdparm -t --direct /dev/mmcblk0p2 # eg sd card | ||
sudo hdparm -t --direct /dev/ | sudo hdparm -t --direct /dev/sda # eg USB | ||
sudo hdparm -t /dev/vdb # Measure Hard Disk Device Read Speed | sudo hdparm -t /dev/vdb # Measure Hard Disk Device Read Speed | ||
sudo hdparm -T /dev/vdb # Measure Hard Disk Cache Read Speed | sudo hdparm -T /dev/vdb # Measure Hard Disk Cache Read Speed | ||
# Reading cache will give more higher performance than reading | # Reading cache will give more higher performance than reading | ||
# from disk because only the cached data will be used and tested. | # from disk because only the cached data will be used and tested. | ||
sudo hdparm -Tt /dev/mmcblk1 # emmc on beaglebone black | |||
# -t timing test for device reads. | |||
# -T timing test for cache reads. | |||
# /dev/mmcblk1: | |||
# Timing cached reads: 376 MB in 2.01 seconds = 187.22 MB/sec | |||
# Timing buffered disk reads: 60 MB in 3.03 seconds = 19.83 MB/sec | |||
sudo hdparm -t --direct /dev/mmcblk0 # SD on beaglebone black | |||
# /dev/mmcblk0: | |||
# Timing O_DIRECT disk reads: 60 MB in 3.02 seconds = 19.88 MB/sec | |||
hdparm -I /dev/sda # show information about disk | hdparm -I /dev/sda # show information about disk | ||
</syntaxhighlight> | </syntaxhighlight> | ||
NB: hdparm does not have the ability to find the write speed. You will have to use another command line utility called '''dd''' to find the write speed. | |||
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. | 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/ | $ sudo hdparm -t --direct /dev/sdb | ||
/dev/sdb: | |||
/dev/ | |||
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> | ||
Line 413: | Line 551: | ||
On ODroid x4, the eMMC is 150MB/s. | On ODroid x4, the eMMC is 150MB/s. | ||
On Zimablade, the eMMC is 115MB/s, the SSD is 442MB/s. | |||
On phenom server, Samsung SSD 860 EVO 500GB is 235 MB/s, the HDD speed is 150MB/s (WD black WD4003FZEX 4TB, 2013) and 68MB/s (ST ST3640323as 640GB, 2014). | On phenom server, Samsung SSD 860 EVO 500GB is 235 MB/s, the HDD speed is 150MB/s (WD black WD4003FZEX 4TB, 2013) and 68MB/s (ST ST3640323as 640GB, 2014). | ||
Line 421: | Line 561: | ||
[https://youtu.be/G-w7ycyd8tA?t=962 Odroid C4 vs Raspberry Pi 4] Micro SD Card, USB 3.0 SSD, eMMC module. | [https://youtu.be/G-w7ycyd8tA?t=962 Odroid C4 vs Raspberry Pi 4] Micro SD Card, USB 3.0 SSD, eMMC module. | ||
== SLC cache in SSD == | |||
* [https://www.atpinc.com/blog/what-is-SLC-cache-difference-between-Dynamic-Static-SLC-cache SLC Cache vs. Direct TLC Write] | |||
* [https://www.reddit.com/r/hardware/comments/kn7can/how_does_slc_cache_work_in_ssds/ How does SLC cache work in ssd's?] | |||
* [https://www.windowscentral.com/best-ssd-nas Best SSD for NAS 2022] | |||
== SMART data == | |||
<ul> | |||
<li>https://en.wikipedia.org/wiki/S.M.A.R.T. | |||
<li>[https://www.crucial.com/articles/about-ssd/smart-and-ssds S.M.A.R.T. and SSDs] from crucial.com | |||
<li>[https://www.backblaze.com/blog/what-smart-stats-indicate-hard-drive-failures/ What SMART Stats Tell Us About Hard Drives] | |||
<li>[https://www.crucial.com/support/articles-faq-ssd/ssds-and-smart-data SSDs and SMART Data] from crucial.com | |||
<li>[https://www.10-strike.com/network-monitor/pro/hdd-smart-monitoring.shtml How to Monitor HDD/SSD SMART Drive Health Parameters including SSD NVMe/SATA over Network] | |||
<li>Most USB controllers/enclosures do not support smart data. SMART is defined for SATA and SAS type interfaces. [https://forums.macrumors.com/threads/how-to-enable-s-m-a-r-t-on-ssd.1720343/ How to enable S.M.A.R.T on SSD] | |||
<li>[https://linuxhandbook.com/check-ssd-health/ Monitoring and Testing the Health of SSD in Linux] | |||
* Search the keyword '''fail''' or '''attribute''' | |||
* Because Lack of normalization or metainformation for vendor-specific data, many attributes are reported as “Unknown_SSD_Attribute.” | |||
* The test option also works on the host os drive | |||
<li>[https://linuxconfig.org/how-to-configure-smartd-and-be-notified-of-hard-disk-problems-via-email How to configure smartd and be notified of hard disk problems via email] | |||
** A table to recap common options | |||
<li>Microcenter 480gb SSD. Use '''-i -A -a''' options. | |||
<pre> | |||
$ sudo smartctl -i /dev/sda | |||
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.15.0-56-generic] (local build) | |||
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org | |||
=== START OF INFORMATION SECTION === | |||
Model Family: Phison Driven OEM SSDs | |||
Device Model: SATA SSD | |||
Serial Number: 18060548000982 | |||
LU WWN Device Id: 0 000000 000000000 | |||
Firmware Version: SBFM61.2 | |||
User Capacity: 480,103,981,056 bytes [480 GB] | |||
Sector Size: 512 bytes logical/physical | |||
Rotation Rate: Solid State Device | |||
Form Factor: 2.5 inches | |||
Device is: In smartctl database [for details use: -P show] | |||
ATA Version is: ACS-4 (minor revision not indicated) | |||
SATA Version is: SATA 3.2, 6.0 Gb/s (current: 6.0 Gb/s) | |||
Local Time is: Thu Dec 22 12:05:47 2022 EST | |||
SMART support is: Available - device has SMART capability. | |||
SMART support is: Enabled | |||
$ sudo smartctl -A /dev/sda | |||
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.15.0-56-generic] (local build) | |||
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org | |||
=== START OF READ SMART DATA SECTION === | |||
SMART Attributes Data Structure revision number: 16 | |||
Vendor Specific SMART Attributes with Thresholds: | |||
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE | |||
1 Raw_Read_Error_Rate 0x000b 100 100 050 Pre-fail Always - 0 | |||
9 Power_On_Hours 0x0012 100 100 000 Old_age Always - 24481 | |||
12 Power_Cycle_Count 0x0012 100 100 000 Old_age Always - 410 | |||
168 SATA_Phy_Error_Count 0x0012 100 100 000 Old_age Always - 0 | |||
170 Bad_Blk_Ct_Erl/Lat 0x0003 066 066 010 Pre-fail Always - 0/549 | |||
173 MaxAvgErase_Ct 0x0012 100 100 000 Old_age Always - 64 (Average 33) | |||
192 Unsafe_Shutdown_Count 0x0012 100 100 000 Old_age Always - 93 | |||
194 Temperature_Celsius 0x0023 067 067 000 Pre-fail Always - 33 (Min/Max 33/33) | |||
218 CRC_Error_Count 0x000b 100 100 050 Pre-fail Always - 0 | |||
231 SSD_Life_Left 0x0013 100 100 000 Pre-fail Always - 98 | |||
241 Lifetime_Writes_GiB 0x0012 100 100 000 Old_age Always - 8864 | |||
$ sudo smartctl -i -a /dev/sda | |||
</pre> | |||
<li>Sandisk Extreme 55AE external SSD: "sudo smartctl -i '''-d scsi''' /dev/sdc". Without specify "-d", I'll get the following message (see [https://unix.stackexchange.com/questions/604453/unable-to-dd-smartmon-fdisk-or-anything-on-a-working-external-western-digital this post]) | |||
<pre> | |||
/dev/sdc: Unknown USB bridge [0x0781:0x55ae (0x3001)] | |||
Please specify device type with the -d option. | |||
</pre> | |||
Unforunately, smartctl shows my device lacks SMART capability. | |||
</ul> | |||
== GSmartControl: GUI for smartctl == | |||
* https://help.ubuntu.com/community/Smartmontools, | |||
* https://github.com/ashaduri/gsmartcontrol, [https://gsmartcontrol.shaduri.dev/downloads Downloads] available for Windows/mac/Linux. | |||
* [https://www.geeksforgeeks.org/gsmartcontrol-tool-to-check-ssd-hdd-health-on-linux/ GSmartControl – Tool to Check SSD/HDD Health on Linux] | |||
= Website loading = | = Website loading = | ||
Line 468: | Line 685: | ||
** [https://magpi.raspberrypi.org/articles/raspberry-pi-4-vs-raspberry-pi-3b-plus Gigabit Ethernet over USB 2.0 (maximum throughput 300Mbps)] on Raspberry Pi 3B+. | ** [https://magpi.raspberrypi.org/articles/raspberry-pi-4-vs-raspberry-pi-3b-plus Gigabit Ethernet over USB 2.0 (maximum throughput 300Mbps)] on Raspberry Pi 3B+. | ||
* 5.3MB/s ethernet on UDOO x86 at home wifi-to-ethernet, 62MB/s ethernet-to-ethernet (scp). | * 5.3MB/s ethernet on UDOO x86 at home wifi-to-ethernet, 62MB/s ethernet-to-ethernet (scp). | ||
* 33MB/s when I downloaded Linux iso from [http://mirror.umd.edu/mxlinux-iso/ANTIX/Final/antiX-19/antiX-19.4_x64-full.iso antiX], [http://mirror.umd.edu/mxlinux-iso/MX/Final/Xfce/MX-21_x64.iso MX Linux] from mirror.umd.edu. | |||
== Ethernet cables == | |||
* [https://fiber-optic-module.com/blog/cat-6-speed/ Cat 6 Speed: A Comprehensive Guide to Ethernet Cables] | |||
* Cat 5e: 1Gbps | |||
* Cat 6: 10Gbps | |||
== iperf: network speed test between two boxes == | == iperf: network speed test between two boxes == | ||
Line 504: | Line 727: | ||
</li> | </li> | ||
</ul> | </ul> | ||
== OpenSpeedTest == | |||
[https://ubuntushell.com/install-openspeedtest/ Check Your Local Network Speed in Linux, Windows, and macOS] | |||
== ntttcp == | |||
* https://github.com/microsoft/ntttcp | |||
* [https://liliputing.com/replacing-iperf3-with-ntttcp-to-measure-networking-throughput-in-reviews/ Replacing “iperf3” with “ntttcp” to measure networking throughput in reviews] | |||
== SSH speed test == | == SSH speed test == | ||
Line 510: | Line 740: | ||
yes | pv | ssh user@remote_host "cat >/dev/null" | yes | pv | ssh user@remote_host "cat >/dev/null" | ||
</pre> | </pre> | ||
== rsync --progress == | |||
== time command == | |||
transfer_speed = (file_size * 8) / (transfer_time * 1000000) | |||
For example, if you transferred a 10 MB file in 5 seconds, the transfer speed would be calculated like this: transfer_speed = (10 * 1024 * 1024 * 8) / (5 * 1000000) = 16.78 Mbit/s | |||
In the formula for calculating the transfer speed in megabits per second (Mbit/s), we divide by 1,000,000 (one million) to convert the result from bits per second (bit/s) to megabits per second (Mbit/s). |
Latest revision as of 21:15, 9 November 2024
Geekbench and Geekbench browser
Geekbench is a cross-platform benchmark that measures the performance of your computer's processor and memory.
- Download Geekbench 5. https://www.geekbench.com/download/, ARM.
- How to run geekbench on the raspberry pi
- Some testing results from running GeekBench 6 on Android devices (gpu benchmark is based on OpenCL)
- Unisoc t820 on anbernic rg556: cpu 872/2349, gpu 2248
- RK3588 on Orange Pi 5+: cpu 738/2243, gpu 3496 Unisoc Tiger T820 vs Rockchip RK3588
- Snapdragon 720G on Galaxy s6 lite SM-P613 2022 : cpu 735/1641, gpu 1211
- Snapdragon 662 on moto g power 2021: cpu 337/1184, gpu 301
- How to install and run Geekbench on Ubuntu
wget https://cdn.geekbench.com/Geekbench-5.3.1-Linux.tar.gz tar xf Geekbench-5.3.1-Linux.tar.gz cd Geekbench-5.3.1-Linux/ ./geekbench5
Sysbench
# Enable 'Universe' first sudo apt-get update sudo apt-get install sysbench sysbench --num-threads=1 --test=cpu --cpu-max-prime=20000 run # sysbench version is 0.4.12, Ubuntu 16.04, 10000 events sysbench cpu --threads=1 --cpu-max-prime=20000 --time=0 --events=10000 run # sysbench version 1.0.11, Ubuntu 18.04
See Odroid C4 vs Raspberry Pi 4 (ExplainingComputers) for a video demonstration. See Raspberry Pi OS Bullseye Update: New Features & Camera Issues for a comparison of the syntax of version 0.4.12 and 1.0.x.
Two websites have a database for benchmarks.
Device | Total time (1-thread) | Total time (all threads) | Average CPU Mark |
---|---|---|---|
Intel i7-11850H @ 2.5GHz (Dell Latitude 5521, 8 cores, 16 threads) | 6.42s | 1.1s | |
Intel Core i7-8850H @ 2.6GHz Macbook Pro 2018 (6 cores, 12 threads) brew install sysbench | 0.0028s (not reliable on macOS) | 0.0008s | 12407 |
Xeon E5-1650 Dell Precision T3600 (6 cores, 12 threads) | 23s | 2.5s | 11808 |
Intel i5-4590T (4-core) Dell Optiplex 3020M | 5622 | ||
Intel i5 8259U (4-core) NUC8i5BEH 4-core 8-thread | 20.7s | 3.2s | |
AMD Phenom II X6 1055T (6-core) | 28s | 5.5s | 5058 |
Intel Core2 Quad Q9500 @2.8GHz (4-core) Yorkfield | 23.8s | 6.1s | 3542 |
Intel Pentium J5005 4-core 4-thread (Gemini Lake) NUC7PJYH | 16 | 4.3s | |
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) | 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 | |
RPi3B BCM2837 SoC @ 1.2Ghz (4-core) | 382s | 100s | |
RPi3B+ BCM2837 SoC @ 1.4GHz (4-core) | |||
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, 4 threads) | 52s | 13s | 1472 |
ODroid xu4 (8-core) | 372s | 40s | |
Jetson nano (4-core) | 21.4s | 5s |
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
Install 0.4.12 from source
For some reason, the threads option in version 1.0 does not work. See cpu test: single thread and multi-threads get the same result and Question about CPU benchmarking.
If we need to use version 0.4.12, we need to build from the source.
- https://wiki.mikejung.biz/Sysbench#Sysbench_0.4.12_Source_Install_On_CentOS_6.5_and_CentOS_6.6 to download the source code
- Installing sysbench on Ubuntu
- https://github.com/akopytov/sysbench/blob/master/README.md#general-syntax How to build from source
sudo apt install automake autoconf libtool libmysqlclient-dev libssl1.0.0 libssl-dev make wget http://pkgs.fedoraproject.org/repo/pkgs/sysbench/sysbench-0.4.12.tar.gz/3a6d54fdd3fe002328e4458206392b9d/sysbench-0.4.12.tar.gz tar zxvf sysbench-0.4.12.tar.gz cd sysbench-0.4.12/ ./autogen.sh ./configure --without-mysql sudo make # Cannot establish any listening sockets - Make sure an X server isn't already running(EE) # ... # ../libtool: line 5281: : command not found sudo make install
Run using Docker
Odroid xu4
$ docker run -it --rm ubuntu:16.04 bash # apt update # apt-get install sysbench # sysbench --num-threads=8 --test=cpu --cpu-max-prime=20000 run sysbench 0.4.12: multi-threaded system evaluation benchmark Running the test with following options: Number of threads: 8 Additional request validation enabled. Doing CPU performance benchmark Threads started! Done. Maximum prime number checked in CPU test: 20000 Test execution summary: total time: 39.5979s total number of events: 10000 total time taken by event execution: 316.5830 per-request statistics: min: 23.31ms avg: 31.66ms max: 73.12ms approx. 95 percentile: 37.96ms Threads fairness: events (avg/stddev): 1250.0000/201.36 execution time (avg/stddev): 39.5729/0.01 # sysbench --help Usage: sysbench [general-options]... --test=<test-name> [test-options]... command General options: --num-threads=N number of threads to use [1] --max-requests=N limit for total number of requests [10000] --max-time=N limit for total execution time in seconds [0] --forced-shutdown=STRING amount of time to wait after --max-time before forcing shutdown [off] --thread-stack-size=SIZE size of stack per thread [32K] --init-rng=[on|off] initialize random number generator [off] --test=STRING test to run --debug=[on|off] print more debugging info [off] --validate=[on|off] perform validation checks where possible [off] --help=[on|off] print help and exit --version=[on|off] print version and exit Compiled-in tests: fileio - File I/O test cpu - CPU performance test memory - Memory functions speed test threads - Threads subsystem performance test mutex - Mutex performance test oltp - OLTP test Commands: prepare run cleanup help version See 'sysbench --test=<name> help' for a list of options for each test.
Directly
$ cat /etc/os-release NAME="Ubuntu" VERSION="18.04.5 LTS (Bionic Beaver)" $ apt install sysbench # 1.0.11 $ sysbench cpu --threads=8 --cpu-max-prime=20000 --time=0 --events=10000 run sysbench 1.0.11 (using system LuaJIT 2.1.0-beta3) Running the test with following options: Number of threads: 8 Initializing random number generator from current time Prime numbers limit: 20000 Initializing worker threads... Threads started! CPU speed: events per second: 221.17 General statistics: total time: 45.2074s total number of events: 10000 Latency (ms): min: 25.98 avg: 36.14 max: 69.89 95th percentile: 44.98 sum: 361398.71 Threads fairness: events (avg/stddev): 1250.0000/246.26 execution time (avg/stddev): 45.1748/0.01
Run sysbench 0.4.12 using singularity
- Install singularity either from pre-build binary or source (See the 'Docs' under https://sylabs.io/singularity/)
- Create a new sub and build a container
- 'Execute' the container
# step 1: the following method installed an old version (2.6.1) of singularity # $ wget -O- http://neuro.debian.net/lists/bionic.us-nh.libre | sudo tee /etc/apt/sources.list.d/neurodebian.sources.list $ sudo apt-key adv --recv-keys --keyserver hkp://pool.sks-keyservers.net:80 0xA5D32F012649A5A9 $ sudo apt update $ sudo apt-get install singularity-container $ singularity --version # step 2 $ mkdir sysbench; cd sysbench $ nano sysbench.def $ sudo singularity build sysbench0412 sysbench.def # step 3 $ singularity exec sysbench0412 sysbench --num-threads=1 --test=cpu --cpu-max-prime=20000 --validate run $ singularity exec sysbench0412 sysbench --num-threads=4 --test=cpu --cpu-max-prime=20000 --validate run
where the definition file <Singularity> (recall Ubuntu 16.04 still has the old version of sysbench) is
$ cat sysbench.def Bootstrap: docker From: ubuntu:16.04 %post apt-get -y update apt-get -y install sysbench %environment export LC_ALL=C export PATH=/usr/games:$PATH
Interestingly, the container build using singularity 2.6.1 also works on singularity 3.5.0 (compile from source).
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
CPU stress test
How to Impose High CPU Load and Stress Test on Linux Using ‘Stress-ng’ Tool
- stress
sudo apt-get install stress uptime; sudo stress --cpu 8 --timeout 20; uptime # 8 cores, 20 seconds
- stress-ng
sudo apt-get install stress-ng uptime; sudo stress-ng --cpu 8 --timeout 60 --metrics-brief; uptime uptime; sudo stress-ng --cpu 4 --cpu-method fft --timeout 2m; uptime uptime; sudo stress-ng --hdd 5 --hdd-ops 100000; uptime uptime; sudo stress-ng --cpu 4 --io 4 --vm 1 --vm-bytes 1G --timeout 60s --metrics-brief; uptime
GPU
How To Understand GPU Benchmarks
iGPU
- You can find the number of cores in an iGPU by looking up the specifications of the CPU that contains the iGPU. This information can be found on the manufacturer’s website or through a web search. For example, if you search for Intel Core i7-1185G7 specifications” you will find that this CPU has an integrated Intel Iris Xe Graphics with 96 Execution Units (EUs), which are equivalent to cores in a GPU.
- AMD Radeon iGPU vs. Intel Iris Xe: What's the Best Integrated Graphics?
CPU/GPU overlock
3 Ways to Check If Your CPU or GPU Is Overclocked
NVIDIA GPU
- The main difference between NVIDIA GeForce GTX and Quadro GPUs is their target audience and intended use.
- GeForce GTX series is primarily designed for gaming and consumer-level applications. These graphics cards are optimized for high performance, which reduces latency in online games. GeForce GTX cards are designed specifically for gaming and consumer-level applications. They are optimized for high performance, which reduces latency in online games.
- Quadro series is designed for professional applications such as computer-aided design (CAD), digital content creation (DCC), and scientific simulations. Quadro cards are designed for very specific render tasks like CAD design and professional video rendering. They also support double precision computations which are used in scientific research and digital content creation (DCC) 12. This makes them more suitable for scientific simulations than GTX cards.
- Monitor GPU in real-time
$ nvidia-smi -l 1
- Docker nvidia/cuda
- How to Use an NVIDIA GPU with Docker Containers
Glmark2
- It requires X11 (not wayland)
- https://github.com/glmark2/glmark2. Ubuntu 24.04 using X11 still works.
- Raspberry Pi 5 vs Intel N100 Mini PC - Which Is Right For You
- How can I run glmark2 on the dedicated GPU?
- OpenGL and CUDA Applications in Docker. Use host's X server.
Hardinfo (GUI)
sudo apt install hardinfo (this will appear in administration as “System Profiler & Benchmark”). See Odroid C4 vs Raspberry Pi 4.
Simple C program
See Time the iterations from 0 to_2147483647
Python vs C
How fast is C++ compared to Python?
R program
Gross inefficiency in influence.lm, r-source on github
Videos
Raspberry Pi 4B vs Jetson Nano
On Ubuntu, use one of the following commands to find out the graphics card information.
- sudo lshw -C display
- lspci | grep -i --color 'vga\|3d\|2d'
webgl
http://webglsamples.org/aquarium/aquarium.html
- Macbook Pro A1990 (2018) @2.6GHz. 60fps 1000 fish, 44fps 5000 fish, 27fps 10000 fish
- NUC7PJYH Pentium J5005 @2.8GHz. 60fps 1000 fish, 42fps 5000 fish, 26fps 10000 fish
- Jetson nano 2G, 60fps 1000 fish, 26fps 5000 fish, 14fps 10000 fish
- Macbook Pro M1 2021, 120fps 5000 fish, 120fps 10000 fish, 65fps 20000 fish, 45fps 30000 fish.
USB, SATA and PCIe
- Raspberry Pi 4 vs. Raspberry Pi 5: 14 Key Differences
- the PCIe on the Raspberry Pi 5 is a single-line PCI Express 2.0 x1 connector. This has a maximum bandwidth of 500MBps (Bytes, not bits). The latest PCIe 4.0 SSDs can do 8000Mbps (1000MBps).
- Whether a SATA SSD connected to USB 3.0 is a better choice then an M.2 SSD connected to PCIe: USB 3.0 in the Pi 5 is 5Gbps, which is 625MBps. SATA 3 adapters can handle 6Gbps. PCIe 2.0 x1 is limited to 500MBps. So, it will be similar speeds for both SATA and PCIe SSDs on the Pi 5. The advantage with SATA adapters is that you do not need to use the HAT.
Disk speed test
- Disk Speed Test (Read/Write): HDD, SSD Performance in Linux
- GUI method: use the 'disks' (gnome-disks) utility in Ubuntu
- 14 Hard Drive Speed Test & Benchmark Tools for SSD/HDD such as CrystalDiskMark
- http://www.cyberciti.biz/faq/freebsd-command-to-find-sata-link-speed/
$ dmesg | grep -i SATA [ 0.311173] pci 0000:00:11.0: set SATA to AHCI mode [ 1.510881] ahci 0000:00:11.0: AHCI 0001.0200 32 slots 4 ports 6 Gbps 0xf impl SATA mode [ 1.512669] ata1: SATA max UDMA/133 abar m1024@0xfe02f000 port 0xfe02f100 irq 19 [ 1.512672] ata2: SATA max UDMA/133 abar m1024@0xfe02f000 port 0xfe02f180 irq 19 [ 1.512675] ata3: SATA max UDMA/133 abar m1024@0xfe02f000 port 0xfe02f200 irq 19 [ 1.512677] ata4: SATA max UDMA/133 abar m1024@0xfe02f000 port 0xfe02f280 irq 19 [ 1.832349] ata4: SATA link down (SStatus 0 SControl 300) [ 1.832418] ata2: SATA link down (SStatus 0 SControl 300) [ 2.004290] ata3: SATA link up 6.0 Gbps (SStatus 133 SControl 300) [ 2.004313] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
- 3 Ways to Test SSD Speed & Performance (windows, mac, linux)
KDiskMark (GUI)
KDiskMark Is A GUI HDD / SSD Benchmark Tool For Linux (Similar To CrystalDiskMark)
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; rm tempfile # 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
To test the disk performance, follow cyberciti.biz. Note that the parameter oflag=dsync makes a difference. -t and --direct measures data transfer rate but bypassing hard drive's buffer cache memory thus reading directly from the disk.
Here I have a 7200rpm Seagate (ST2000DM001-1CH164) and a 5400rpm WD-blue (WD30EZRZ-00WN9B0)
# Hard disk info https://en.wikipedia.org/wiki/Hdparm sudo hdparm -I /dev/sda sudo hdparm -I /dev/sdb # Writing speed, where /tmp is a directory from the disk dd if=/dev/zero of=/tmp/test1.img bs=2G count=1; rm /tmp/test1.img # 1.4 GB/s from either 5400 or 7200 rpm $ dd if=/dev/zero of=/media/brb/My\ Passport/test1.img bs=2G count=1 # 2147479552 bytes (2.1 GB, 2.0 GiB) copied, 12.0418 s, 178 MB/s. --- WD 2T HDD dd if=/dev/zero of=/tmp/test1.img bs=2G count=1 oflag=dsync; rm /tmp/test1.img # 115 MB/s from 5400 rpm # 166 MB/s from 7200 rpm # Latency dd if=/dev/zero of=/tmp/test2.img bs=512 count=1000 oflag=dsync; rm /tmp/test2.img # 27.7 kB/s from 5400 rpm <==== This is interesting # 12.5 kB/s from 7200 rpm # Read speed dd if=/dev/zero of=/tmp/test3.img bs=1G count=1 oflag=direct; rm /tmp/test3.img # 122 MB/s from 5400 rpm # 180 MB/s from 7200 rpm
Note
- dd manual
- oflag=dsync: Use synchronized I/O for data. Do not skip this option. This option get rid of caching and gives you good and accurate results
lsblk # find the root "/" device, look at the "NAME" column sudo hdparm -t [DEVICE NAME] # real world scenario # Using a partition name may work
# The --direct option bypasses the operating system's caches. sudo hdparm -t --direct /dev/mmcblk0p1 # eg internal sudo hdparm -t --direct /dev/mmcblk0p2 # eg sd card sudo hdparm -t --direct /dev/sda # eg USB 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. sudo hdparm -Tt /dev/mmcblk1 # emmc on beaglebone black # -t timing test for device reads. # -T timing test for cache reads. # /dev/mmcblk1: # Timing cached reads: 376 MB in 2.01 seconds = 187.22 MB/sec # Timing buffered disk reads: 60 MB in 3.03 seconds = 19.83 MB/sec sudo hdparm -t --direct /dev/mmcblk0 # SD on beaglebone black # /dev/mmcblk0: # Timing O_DIRECT disk reads: 60 MB in 3.02 seconds = 19.88 MB/sec hdparm -I /dev/sda # show information about disk
NB: hdparm does not have the ability to find the write speed. You will have to use another command line utility called dd to find the write speed.
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/sdb /dev/sdb: 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. A portable HDD has a speed 24-29MB/s.
On ODroid x4, the eMMC is 150MB/s.
On Zimablade, the eMMC is 115MB/s, the SSD is 442MB/s.
On phenom server, Samsung SSD 860 EVO 500GB is 235 MB/s, the HDD speed is 150MB/s (WD black WD4003FZEX 4TB, 2013) and 68MB/s (ST ST3640323as 640GB, 2014).
On Raspberry Pi 3B (sudo apt-get install hdparm), the microSD speed is 22MB/s only. The same SSD plugged to a USB2 port has a speed 34MB/s only.
on Dell t3600 Xeon E5-1650, the HDD (WD Blue 3TB 5400 rpm) speed is 50MB/s and the external USB (WD My Book 4T) is 25MB/s (216.50 kB/s before waking up).
Odroid C4 vs Raspberry Pi 4 Micro SD Card, USB 3.0 SSD, eMMC module.
SLC cache in SSD
SMART data
- https://en.wikipedia.org/wiki/S.M.A.R.T.
- S.M.A.R.T. and SSDs from crucial.com
- What SMART Stats Tell Us About Hard Drives
- SSDs and SMART Data from crucial.com
- How to Monitor HDD/SSD SMART Drive Health Parameters including SSD NVMe/SATA over Network
- Most USB controllers/enclosures do not support smart data. SMART is defined for SATA and SAS type interfaces. How to enable S.M.A.R.T on SSD
- Monitoring and Testing the Health of SSD in Linux
- Search the keyword fail or attribute
- Because Lack of normalization or metainformation for vendor-specific data, many attributes are reported as “Unknown_SSD_Attribute.”
- The test option also works on the host os drive
- How to configure smartd and be notified of hard disk problems via email
- A table to recap common options
- Microcenter 480gb SSD. Use -i -A -a options.
$ sudo smartctl -i /dev/sda smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.15.0-56-generic] (local build) Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org === START OF INFORMATION SECTION === Model Family: Phison Driven OEM SSDs Device Model: SATA SSD Serial Number: 18060548000982 LU WWN Device Id: 0 000000 000000000 Firmware Version: SBFM61.2 User Capacity: 480,103,981,056 bytes [480 GB] Sector Size: 512 bytes logical/physical Rotation Rate: Solid State Device Form Factor: 2.5 inches Device is: In smartctl database [for details use: -P show] ATA Version is: ACS-4 (minor revision not indicated) SATA Version is: SATA 3.2, 6.0 Gb/s (current: 6.0 Gb/s) Local Time is: Thu Dec 22 12:05:47 2022 EST SMART support is: Available - device has SMART capability. SMART support is: Enabled $ sudo smartctl -A /dev/sda smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.15.0-56-generic] (local build) Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org === START OF READ SMART DATA SECTION === SMART Attributes Data Structure revision number: 16 Vendor Specific SMART Attributes with Thresholds: ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE 1 Raw_Read_Error_Rate 0x000b 100 100 050 Pre-fail Always - 0 9 Power_On_Hours 0x0012 100 100 000 Old_age Always - 24481 12 Power_Cycle_Count 0x0012 100 100 000 Old_age Always - 410 168 SATA_Phy_Error_Count 0x0012 100 100 000 Old_age Always - 0 170 Bad_Blk_Ct_Erl/Lat 0x0003 066 066 010 Pre-fail Always - 0/549 173 MaxAvgErase_Ct 0x0012 100 100 000 Old_age Always - 64 (Average 33) 192 Unsafe_Shutdown_Count 0x0012 100 100 000 Old_age Always - 93 194 Temperature_Celsius 0x0023 067 067 000 Pre-fail Always - 33 (Min/Max 33/33) 218 CRC_Error_Count 0x000b 100 100 050 Pre-fail Always - 0 231 SSD_Life_Left 0x0013 100 100 000 Pre-fail Always - 98 241 Lifetime_Writes_GiB 0x0012 100 100 000 Old_age Always - 8864 $ sudo smartctl -i -a /dev/sda
- Sandisk Extreme 55AE external SSD: "sudo smartctl -i -d scsi /dev/sdc". Without specify "-d", I'll get the following message (see this post)
/dev/sdc: Unknown USB bridge [0x0781:0x55ae (0x3001)] Please specify device type with the -d option.
Unforunately, smartctl shows my device lacks SMART capability.
GSmartControl: GUI for smartctl
- https://help.ubuntu.com/community/Smartmontools,
- https://github.com/ashaduri/gsmartcontrol, Downloads available for Windows/mac/Linux.
- GSmartControl – Tool to Check SSD/HDD Health on Linux
Website loading
- How to Test Website Loading Speed in Linux
- Top 15 Free Website Speed Test Tools of 2018
- https://tools.pingdom.com/
- How to Test Website Loading Speed in Linux Terminal. It works for local IP address. (Another day's test: main server 31 seconds, 192.168.1.86/Odroid: 64 seconds, 192.168.1.88/RPi3: 290 seconds)
# http $ curl -s -w 'Testing Website Response Time for :%{url_effective}\n\nLookup Time:\t\t%{time_namelookup}\nConnect Time:\t\t%{time_connect}\nPre-transfer Time:\t%{time_pretransfer}\nStart-transfer Time:\t%{time_starttransfer}\n\nTotal Time:\t\t%{time_total}\n' -o /dev/null http://192.168.1.88/wiki/index.php/C # https $ curl -s -w 'Testing Website Response Time for :%{url_effective}\n\nLookup Time:\t\t%{time_namelookup}\nConnect Time:\t\t%{time_connect}\nAppCon Time:\t\t%{time_appconnect}\nRedirect Time:\t\t%{time_redirect}\nPre-transfer Time:\t%{time_pretransfer}\nStart-transfer Time:\t%{time_starttransfer}\n\nTotal Time:\t\t%{time_total}\n' -o /dev/null https://taichimd.us/mediawiki/index.php/C Lookup Time: 0.004311 Connect Time: 0.010050 AppCon Time: 0.049561 (https only) Redirect Time: 0.000000 (https only) Pre-transfer Time: 0.049659 Start-transfer Time: 5.035105 Total Time: 5.174981
- httpstat – A Curl Statistics Tool to Check Website Performance. It works for both https and local IP.
$ wget -c https://raw.githubusercontent.com/reorx/httpstat/master/httpstat.py $ python httpstat.py https://taichimd.us/mediawiki/index.php/C ... DNS Lookup TCP Connection TLS Handshake Server Processing Content Transfer [ 4ms | 8ms | 34ms | 31300ms | 169ms ] | | | | | namelookup:4ms | | | | connect:12ms | | | pretransfer:46ms | | starttransfer:31346ms | total:31515ms
ApacheBench (ab)
- https://en.wikipedia.org/wiki/ApacheBench
- https://httpd.apache.org/docs/2.4/programs/ab.html
- https://www.tutorialspoint.com/apache_bench/apache_bench_environment_setup.htm
- https://www.datadoghq.com/blog/apachebench/
Network speed
- 4.5MB/s wifi on raspberry pi 3B+ at home wifi-to-wifi, 7.3MB/s ethernet-to-wifi (tested using scp). Note Pi3b+ has gigabit ethernet network.
- Gigabit Ethernet over USB 2.0 (maximum throughput 300Mbps) on Raspberry Pi 3B+.
- 5.3MB/s ethernet on UDOO x86 at home wifi-to-ethernet, 62MB/s ethernet-to-ethernet (scp).
- 33MB/s when I downloaded Linux iso from antiX, MX Linux from mirror.umd.edu.
Ethernet cables
- Cat 6 Speed: A Comprehensive Guide to Ethernet Cables
- Cat 5e: 1Gbps
- Cat 6: 10Gbps
iperf: network speed test between two boxes
- https://iperf.fr/
- How To Use iPerf To Test Network Speed From Host To Host. The default port for iPerf 3 is 5201. iPerf 2 default port is 5001.
# Server iperf3 -s # Client iperf3 -c XXX.XXX.X.XX
Test on Raspberr Pi 3B+ and ODroid Xu4
client not matter, ethernet cable not matter server: pi3b+ running ubuntu 20.04.1 64-bit [ ID] Interval Transfer Bandwidth Retr Cwnd [ 4] 0.00-1.00 sec 39.3 MBytes 329 Mbits/sec 1 239 KBytes [ 4] 1.00-2.00 sec 38.2 MBytes 320 Mbits/sec 0 270 KBytes server: pi3b+ running raspberry pi OS lite (buster) 32-bit SAME result as above. Note Pi 3B+ ethernet is slower than Udoo Quad server: odroid xu4 ubuntu 20.04.1 64-bit [ ID] Interval Transfer Bandwidth Retr Cwnd [ 4] 0.00-1.00 sec 109 MBytes 911 Mbits/sec 0 334 KBytes [ 4] 1.00-2.00 sec 107 MBytes 900 Mbits/sec 0 334 KBytes server: Udoo Dual ubuntu 20.04.1/Armbian 20.08 Focal 32-bit [ ID] Interval Transfer Bandwidth Retr Cwnd [ 4] 0.00-1.00 sec 63.8 MBytes 535 Mbits/sec 0 1.30 MBytes [ 4] 1.00-2.00 sec 54.9 MBytes 460 Mbits/sec 0 1.33 MBytes
OpenSpeedTest
Check Your Local Network Speed in Linux, Windows, and macOS
ntttcp
- https://github.com/microsoft/ntttcp
- Replacing “iperf3” with “ntttcp” to measure networking throughput in reviews
SSH speed test
yes | pv | ssh user@remote_host "cat >/dev/null"
rsync --progress
time command
transfer_speed = (file_size * 8) / (transfer_time * 1000000)
For example, if you transferred a 10 MB file in 5 seconds, the transfer speed would be calculated like this: transfer_speed = (10 * 1024 * 1024 * 8) / (5 * 1000000) = 16.78 Mbit/s
In the formula for calculating the transfer speed in megabits per second (Mbit/s), we divide by 1,000,000 (one million) to convert the result from bits per second (bit/s) to megabits per second (Mbit/s).