Qualche tempo fa, abbiamo recensito Phoronix , una piattaforma open source di test e benchmarking. In questa guida vedremo ancora un'altra suite di benchmarking chiamata UnixBench . È la suite di benchmark BYTE UNIX originale, aggiornata e rivista da molte persone nel corso degli anni. Lo scopo principale di questo strumento è fornire un indicatore di base delle prestazioni di un sistema operativo simile a Unix. UnixBench può essere utilizzato per valutare le prestazioni del tuo sistema durante l'esecuzione di una o più attività. Tieni presente che questo è uno strumento di benchmarking del sistema, non solo uno strumento di benchmarking di CPU, RAM o disco. I risultati dipenderanno non solo dal tuo hardware, ma anche dal tuo sistema operativo, dalle librerie e persino dal compilatore.
Unixbench eseguirà i seguenti test di benchmark sul tuo sistema.
- Drystone - Utilizzato per misurare e confrontare le prestazioni dei computer.
- Pietra per affilare - Utilizzato per misurare la velocità e l'efficienza delle operazioni in virgola mobile.
- Excl Throughput - Utilizzato per misurare il numero di chiamate execl che possono essere eseguite al secondo.
- Copia file - Utilizzato per misurare la velocità con cui i dati possono essere trasferiti da un file all'altro.
- Produttività dei tubi - il numero di volte (al secondo) che un processo può scrivere 512 byte in una pipe e rileggerli.
- Cambio di contesto basato su pipe - Utilizzato per misurare il numero di volte in cui due processi possono scambiare un numero intero crescente tramite una pipe.
- Creazione del processo - Utilizzato per misurare il numero di volte in cui un processo può biforcare e raccogliere un bambino che esce immediatamente.
- Script di shell - Utilizzato per misurare il numero di volte al minuto che un processo può avviare e raccogliere un set di otto copie simultanee di script di shell in cui lo script di shell applica una serie di trasformazioni a un file di dati.
- Chiamate di sistema generali - Utilizzato per stimare il costo di ingresso e uscita dal kernel del sistema operativo.
- Test grafici - Utilizzato per fornire un'idea delle prestazioni grafiche 2D e 3D del sistema.
Installazione e utilizzo di Unixbench su Linux
UnixBench è disponibile in AUR, quindi puoi installarlo su Arch Linux e suoi derivati come Manjaro Linux, Antergos usando gli helper AUR.
Usando Sì :
$ yay -S unixbench
Su altre distribuzioni Linux, è necessario compilare e installare UnixBench manualmente come mostrato di seguito.
Su CentOS, RHEL, Fedora:
$ sudo yum -y install gcc gcc-c++ make libXext-devel perl perl-Time-HiRes git
$ sudo yum -y groupinstall "Development Tools"
$ sudo yum -y install libX11-devel mesa-libGL-devel perl-Time-HiRes
Su Debian, Ubuntu, Linux Mint:
$ sudo apt-get install libx11-dev libgl1-mesa-dev libxext-dev perl perl-modules make git
Dopo aver installato i prerequisiti necessari, git clone UnixBench repository usando il comando:
$ git clone https://github.com/kdlucas/byte-unixbench.git
Vai alla directory unixbench:
$ cd byte-unixbench/UnixBench/
Quindi, esegui il comando seguente per iniziare il benchmarking del tuo sistema.
$ ./Run
Se hai installato UnixBench da AUR su Arch Linux, esegui il comando seguente per avviarlo.
$ ubench
L'output di esempio sarebbe:
Version 5.1.3 Based on the Byte Magazine Unix Benchmark Multi-CPU version Version 5 revisions by Ian Smith, Sunnyvale, CA, USA January 13, 2011 johantheghost at yahoo period com 1 x Dhrystone 2 using register variables 1 2 3 4 5 6 7 8 9 10 1 x Double-Precision Whetstone 1 2 3 4 5 6 7 8 9 10 1 x Execl Throughput 1 2 3 1 x File Copy 1024 bufsize 2000 maxblocks 1 2 3 1 x File Copy 256 bufsize 500 maxblocks 1 2 3 1 x File Copy 4096 bufsize 8000 maxblocks 1 2 3 1 x Pipe Throughput 1 2 3 4 5 6 7 8 9 10 1 x Pipe-based Context Switching 1 2 3 4 5 6 7 8 9 10 1 x Process Creation 1 2 3 1 x System Call Overhead 1 2 3 4 5 6 7 8 9 10 1 x Shell Scripts (1 concurrent) 1 2 3 1 x Shell Scripts (8 concurrent) 1 2 3 4 x Dhrystone 2 using register variables 1 2 3 4 5 6 7 8 9 10 4 x Double-Precision Whetstone 1 2 3 4 5 6 7 8 9 10 4 x Execl Throughput 1 2 3 4 x File Copy 1024 bufsize 2000 maxblocks 1 2 3 4 x File Copy 256 bufsize 500 maxblocks 1 2 3 4 x File Copy 4096 bufsize 8000 maxblocks 1 2 3 4 x Pipe Throughput 1 2 3 4 5 6 7 8 9 10 4 x Pipe-based Context Switching 1 2 3 4 5 6 7 8 9 10 4 x Process Creation 1 2 3 4 x System Call Overhead 1 2 3 4 5 6 7 8 9 10 4 x Shell Scripts (1 concurrent) 1 2 3 4 x Shell Scripts (8 concurrent) 1 2 3 ======================================================================== BYTE UNIX Benchmarks (Version 5.1.3) System: sk: GNU/Linux OS: GNU/Linux -- 4.10.10-1-ARCH -- #1 SMP PREEMPT Wed Apr 12 18:50:28 CEST 2017 Machine: x86_64 (unknown) Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8") CPU 0: Intel(R) Core(TM) i3-2350M CPU @ 2.30GHz (4591.9 bogomips) Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization CPU 1: Intel(R) Core(TM) i3-2350M CPU @ 2.30GHz (4592.1 bogomips) Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization CPU 2: Intel(R) Core(TM) i3-2350M CPU @ 2.30GHz (4593.8 bogomips) Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization CPU 3: Intel(R) Core(TM) i3-2350M CPU @ 2.30GHz (4592.2 bogomips) Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization 13:09:04 up 1:56, 1 user, load average: 0.55, 0.37, 0.42; runlevel unknown ------------------------------------------------------------------------ Benchmark Run: Wed Apr 19 2017 13:09:04 - 13:38:10 4 CPUs in system; running 1 parallel copy of tests Dhrystone 2 using register variables 19547861.3 lps (10.0 s, 7 samples) Double-Precision Whetstone 2321.8 MWIPS (13.9 s, 7 samples) Execl Throughput 2982.7 lps (29.5 s, 2 samples) File Copy 1024 bufsize 2000 maxblocks 493713.2 KBps (30.0 s, 2 samples) File Copy 256 bufsize 500 maxblocks 150353.3 KBps (30.0 s, 2 samples) File Copy 4096 bufsize 8000 maxblocks 760514.6 KBps (30.1 s, 2 samples) Pipe Throughput 1128068.6 lps (10.0 s, 7 samples) Pipe-based Context Switching 97761.1 lps (10.0 s, 7 samples) Process Creation 4560.7 lps (30.0 s, 2 samples) Shell Scripts (1 concurrent) 1802.4 lpm (60.0 s, 2 samples) Shell Scripts (8 concurrent) 476.7 lpm (60.1 s, 2 samples) System Call Overhead 1752928.0 lps (10.0 s, 7 samples) System Benchmarks Index Values BASELINE RESULT INDEX Dhrystone 2 using register variables 116700.0 19547861.3 1675.1 Double-Precision Whetstone 55.0 2321.8 422.2 Execl Throughput 43.0 2982.7 693.6 File Copy 1024 bufsize 2000 maxblocks 3960.0 493713.2 1246.8 File Copy 256 bufsize 500 maxblocks 1655.0 150353.3 908.5 File Copy 4096 bufsize 8000 maxblocks 5800.0 760514.6 1311.2 Pipe Throughput 12440.0 1128068.6 906.8 Pipe-based Context Switching 4000.0 97761.1 244.4 Process Creation 126.0 4560.7 362.0 Shell Scripts (1 concurrent) 42.4 1802.4 425.1 Shell Scripts (8 concurrent) 6.0 476.7 794.5 System Call Overhead 15000.0 1752928.0 1168.6 ======== System Benchmarks Index Score 730.4 ------------------------------------------------------------------------ Benchmark Run: Wed Apr 19 2017 13:38:10 - 14:07:31 4 CPUs in system; running 4 parallel copies of tests Dhrystone 2 using register variables 27193072.8 lps (10.0 s, 7 samples) Double-Precision Whetstone 4985.4 MWIPS (16.4 s, 7 samples) Execl Throughput 4453.8 lps (29.8 s, 2 samples) File Copy 1024 bufsize 2000 maxblocks 340833.2 KBps (30.0 s, 2 samples) File Copy 256 bufsize 500 maxblocks 74310.1 KBps (30.0 s, 2 samples) File Copy 4096 bufsize 8000 maxblocks 886922.2 KBps (30.0 s, 2 samples) Pipe Throughput 1467621.9 lps (10.0 s, 7 samples) Pipe-based Context Switching 324277.3 lps (10.0 s, 7 samples) Process Creation 10722.5 lps (30.0 s, 2 samples) Shell Scripts (1 concurrent) 2893.2 lpm (60.1 s, 2 samples) Shell Scripts (8 concurrent) 400.8 lpm (60.2 s, 2 samples) System Call Overhead 2750243.4 lps (10.0 s, 7 samples) System Benchmarks Index Values BASELINE RESULT INDEX Dhrystone 2 using register variables 116700.0 27193072.8 2330.2 Double-Precision Whetstone 55.0 4985.4 906.4 Execl Throughput 43.0 4453.8 1035.8 File Copy 1024 bufsize 2000 maxblocks 3960.0 340833.2 860.7 File Copy 256 bufsize 500 maxblocks 1655.0 74310.1 449.0 File Copy 4096 bufsize 8000 maxblocks 5800.0 886922.2 1529.2 Pipe Throughput 12440.0 1467621.9 1179.8 Pipe-based Context Switching 4000.0 324277.3 810.7 Process Creation 126.0 10722.5 851.0 Shell Scripts (1 concurrent) 42.4 2893.2 682.4 Shell Scripts (8 concurrent) 6.0 400.8 668.0 System Call Overhead 15000.0 2750243.4 1833.5 ======== System Benchmarks Index Score 989.4
Il punteggio del benchmark verrà visualizzato alla fine del risultato.
E per ora è tutto. Spero che lo trovi utile. Se ti piace il nostro lavoro, condividi le nostre guide sui tuoi social network professionali e supporta OSTechNix.
Ciao!