Menguji performa server dengan UnixBench

By | October 17, 2020

Dalam membeli Virtual Private Server kita sebaiknya membandingkan harga dan spesifikasi yang didapat antar providernya, ini untuk menjamin kita mendapatkan VPS yang terjamin kualitasnya. Faktor lain adalah reputasi penyedianya. Tapi darimana kita tahu kalau resource yang katanya diberikan untuk pelanggan benar – benar bisa digunakan maksimal? Ya… kita lakukan benchmark.

Kalau benchmark bandwidth VPS penting untuk mengetahui bagus tidaknya koneksi atau akses internetnya dari berbagai belahan dunia, maka untuk pengujian performa adalah untuk mengukur seberapa mampukah performanya dalam menjalankan tugas – tugasnya. Tidak lucu kalau sebuah web server dikunjungi beberapa pengunjung dalam satu waktu sudah kewalahan kan? Apalagi kalau spesifikasi servernya memiliki RAM 512MB, berarti masalahnya ada di faktor lain dan mungkin ini pembatasan yang berlebihan dari tempat anda membeli VPS.

Salah satu cara melakukan benchmark kemampuan sistem Linux terbaik adalah dengan UnixBench, yang akan dites adalah:

  1. Kemampuan sistem dalam melakukan satu tugas.
  2. Performa sistem menjalankan beberapa tugas.
  3. Peningkatkan performa saat menyelesaikan (beberapa) tugas dengan memanfaatkan proses paralel. Kalau VPS anda memiliki lebih dari satu CPU core.

Tapi UnixBench tidak bisa langsung dijalankan begitu saja scriptnya. Harus menginstall beberapa paket program dependensinya dahulu.

Untuk Debian/Ubuntu eksekusi perintah ini:

apt-get install libxext-dev perl perl-modules gcc make

Untuk RHEL/Fedora/CentOS:

yum install gcc gcc-c++ make libXext-devel perl-Time-HiRes

Setelah itu download script UnixBench dari GitHub dan eksekusi:

wget https://github.com/kdlucas/byte-unixbench/archive/v5.1.3.tar.gz
tar xvf v5.1.3.tar.gz
cd byte-unixbench-5.1.3/UnixBench
./Run

Sekarang anda cukup menunggu prosesnya selesai, dan kurang lebih hasilnya akan seperti berikut:

   #    #  #    #  #  #    #          #####   ######  #    #   ####   #    #
# # ## # # # # # # # ## # # # # #
# # # # # # ## ##### ##### # # # # ######
# # # # # # ## # # # # # # # # #
# # # ## # # # # # # # ## # # # #
#### # # # # # ##### ###### # # #### # #

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

========================================================================
BYTE UNIX Benchmarks (Version 5.1.3)

System: servernesia: GNU/Linux
OS: GNU/Linux -- 2.6.32-042stab108.8 -- #1 SMP Wed Jul 22 17:23:23 MSK 2015
Machine: i686 (unknown)
Language: en_US.utf8 (charmap=ANSI_X3.4-1968, collate=ANSI_X3.4-1968)
CPU 0: Intel(R) Xeon(R) CPU X5650 @ 2.67GHz (5319.8 bogomips)
Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
CPU 1: Intel(R) Xeon(R) CPU X5650 @ 2.67GHz (5319.8 bogomips)
Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
CPU 2: Intel(R) Xeon(R) CPU X5650 @ 2.67GHz (5319.8 bogomips)
Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
CPU 3: Intel(R) Xeon(R) CPU X5650 @ 2.67GHz (5319.8 bogomips)
Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
CPU 4: Intel(R) Xeon(R) CPU X5650 @ 2.67GHz (5319.8 bogomips)
Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
CPU 5: Intel(R) Xeon(R) CPU X5650 @ 2.67GHz (5319.8 bogomips)
Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
CPU 6: Intel(R) Xeon(R) CPU X5650 @ 2.67GHz (5319.8 bogomips)
Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
CPU 7: Intel(R) Xeon(R) CPU X5650 @ 2.67GHz (5319.8 bogomips)
Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
CPU 8: Intel(R) Xeon(R) CPU X5650 @ 2.67GHz (5319.8 bogomips)
Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
CPU 9: Intel(R) Xeon(R) CPU X5650 @ 2.67GHz (5319.8 bogomips)
Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
CPU 10: Intel(R) Xeon(R) CPU X5650 @ 2.67GHz (5319.8 bogomips)
Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
CPU 11: Intel(R) Xeon(R) CPU X5650 @ 2.67GHz (5319.8 bogomips)
Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
CPU 12: Intel(R) Xeon(R) CPU X5650 @ 2.67GHz (5319.8 bogomips)
Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
CPU 13: Intel(R) Xeon(R) CPU X5650 @ 2.67GHz (5319.8 bogomips)
Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
CPU 14: Intel(R) Xeon(R) CPU X5650 @ 2.67GHz (5319.8 bogomips)
Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
CPU 15: Intel(R) Xeon(R) CPU X5650 @ 2.67GHz (5319.8 bogomips)
Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
CPU 16: Intel(R) Xeon(R) CPU X5650 @ 2.67GHz (5319.8 bogomips)
Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
CPU 17: Intel(R) Xeon(R) CPU X5650 @ 2.67GHz (5319.8 bogomips)
Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
CPU 18: Intel(R) Xeon(R) CPU X5650 @ 2.67GHz (5319.8 bogomips)
Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
CPU 19: Intel(R) Xeon(R) CPU X5650 @ 2.67GHz (5319.8 bogomips)
Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
CPU 20: Intel(R) Xeon(R) CPU X5650 @ 2.67GHz (5319.8 bogomips)
Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
CPU 21: Intel(R) Xeon(R) CPU X5650 @ 2.67GHz (5319.8 bogomips)
Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
CPU 22: Intel(R) Xeon(R) CPU X5650 @ 2.67GHz (5319.8 bogomips)
Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
CPU 23: Intel(R) Xeon(R) CPU X5650 @ 2.67GHz (5319.8 bogomips)
Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
18:35:29 up 34 days, 20:34, 1 user, load average: 0.16, 0.13, 0.07; runlevel 2

------------------------------------------------------------------------
Benchmark Run: Mon Sep 28 2015 18:35:29 - 19:03:10
24 CPUs in system; running 1 parallel copy of tests

Dhrystone 2 using register variables 11893780.0 lps (10.0 s, 7 samples)
Double-Precision Whetstone 2186.5 MWIPS (8.2 s, 7 samples)
Execl Throughput 2062.8 lps (30.0 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks 295986.4 KBps (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks 80420.4 KBps (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks 806698.3 KBps (30.0 s, 2 samples)
Pipe Throughput 609234.7 lps (10.0 s, 7 samples)
Pipe-based Context Switching 75590.1 lps (10.0 s, 7 samples)
Process Creation 5060.5 lps (30.0 s, 2 samples)
Shell Scripts (1 concurrent) 5072.6 lpm (60.0 s, 2 samples)
Shell Scripts (8 concurrent) 2420.8 lpm (60.0 s, 2 samples)
System Call Overhead 417390.9 lps (10.0 s, 7 samples)

System Benchmarks Index Values BASELINE RESULT INDEX
Dhrystone 2 using register variables 116700.0 11893780.0 1019.2
Double-Precision Whetstone 55.0 2186.5 397.6
Execl Throughput 43.0 2062.8 479.7
File Copy 1024 bufsize 2000 maxblocks 3960.0 295986.4 747.4
File Copy 256 bufsize 500 maxblocks 1655.0 80420.4 485.9
File Copy 4096 bufsize 8000 maxblocks 5800.0 806698.3 1390.9
Pipe Throughput 12440.0 609234.7 489.7
Pipe-based Context Switching 4000.0 75590.1 189.0
Process Creation 126.0 5060.5 401.6
Shell Scripts (1 concurrent) 42.4 5072.6 1196.4
Shell Scripts (8 concurrent) 6.0 2420.8 4034.6
System Call Overhead 15000.0 417390.9 278.3
========
System Benchmarks Index Score 642.0

------------------------------------------------------------------------
Benchmark Run: Mon Sep 28 2015 19:03:10 - 19:03:10
24 CPUs in system; running 24 parallel copies of tests

Ini saya menguji VPS dengan RAM 1GB dan 24 vCPU dari EvoBurst. Kalau bingung membaca hasilnya langsung lihat saja skornya di System Benchmarks Index Score dan nanti bandingkan dengan VPS – VPS lain apakah lebih baik, sama atau malah kurang. NAT VPS saya dari MegaVZ skornya adalah 864.7 walau cuma memiliki 1 CPU core dan 256MB, jadi tergantung penyedia VPS anda. Lakukan berulang kali dalam waktu berbeda dan lihat nilai rata – ratanya saran saya.

Update 6 November 2015: Saya baru sadar kalau proses benchmark untuk 24 corenya tidak pernah selesai di EvoBurst, jadi skor diatas adalah untuk 1 core CPU saja. Aneh, padahal di VPS saya pada provider lain normal – normal saja saat menjalankan UnixBench.

Oh ya, UnixBench bukan menguji CPU, RAM, atau Disk melainkan performa sistem secara keseluruhan jadi faktor – faktor tadi adalah komponen yang ikut dites dan skornya mencerminkan kemampuan server anda.


Sumber https://servernesia.com