All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Yet Another Benchmark Script (YABS) - Linux Benchmarking Script using dd, iperf, & Geekbench
Hey all,
Over the past few days I started working on a benchmarking script. The goal of the script was to make something slightly different than what's already out there, which incorporates benchmark tests that we find ourselves conducting quite often, namely dd, iperf, and Geekbench.
Here is the GitHub repo where you can review the script and get some additional information:
https://github.com/masonr/yet-another-bench-script
Benchmarking Tests
The script performs three main tests:
- dd - to estimate disk performance. (disclaimer that read speeds may be heavily affected by cache)
- iperf3 - to estimate network performance using parallel threads and by testing speeds in both directions (download and upload). Both IPv4 and IPv6 iperf tests are conducted (if available)
- Geekbench 4 - to estimate total system performance by running a vast array of different CPU/memory intensive benchmarks. Both single and multi-core scores are given along with a link to view the complete system results. The URL to claim the test and add it to your Geekbench profile is written to disk.
Running the Script
The script is very easy to run and does not require any external dependencies to be installed nor elevated privileges to run:
curl -s https://raw.githubusercontent.com/masonr/yet-another-bench-script/master/yabs.sh | bash
The script has been tested on CentOS 7, Debian 9, Debian 10, Fedora 30, Ubuntu 16.04, and Ubuntu 18.04.
Skipping Test(s): Tests can be easily skipped if you don't want to run a specific test that's included with this script. More info can be found on the GitHub project page linked above.
Example Output
Here is example output from the script:
# ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #
# Yet-Another-Bench-Script #
# v2019-10-06 #
# https://github.com/masonr/yet-another-bench-script #
# ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #
Sun Oct 6 22:03:26 EDT 2019
Basic System Information:
---------------------------------
Processor : Intel(R) Xeon(R) CPU E3-1230 V2 @ 3.30GHz
CPU cores : 8 @ 1600.091 MHz
AES-NI : ✔ Enabled
VM-x/AMD-V : ❌ Disabled
RAM : 31G
Swap : 7.5G
Disk : 213G
dd Disk Speed Tests:
---------------------------------
| Test 1 | Test 2 | Test 3 | Avg
| | | |
Write | 361 MB/s | 357 MB/s | 357 MB/s | 358.333 MB/s
Read* | 409 MB/s | 409 MB/s | 410 MB/s | 409.333 MB/s
iperf3 Network Speed Tests (IPv4):
---------------------------------
Provider | Location (Link) | Send Speed | Recv Speed
| | |
Bouygues Telecom | Paris, FR (10G) | 766 Mbits/sec | 195 Mbits/sec
Online.net | Paris, FR (10G) | 771 Mbits/sec | 156 Mbits/sec
Severius | The Netherlands (10G) | 638 Mbits/sec | 45.5 Mbits/sec
Worldstream | The Netherlands (10G) | 748 Mbits/sec | 56.7 Mbits/sec
wilhelm.tel | Hamburg, DE (10G) | 756 Mbits/sec | 69.1 Mbits/sec
Biznet | Bogor, Indonesia (1G) | busy | busy
Hostkey | Moscow, RU (1G) | 722 Mbits/sec | 489 Mbits/sec
Velocity Online | Tallahassee, FL, US (1G) | 528 Mbits/sec | 374 Mbits/sec
Airstream Communications | Eau Claire, WI, US (10G) | 825 Mbits/sec | 156 Mbits/sec
Hurricane Electric | Fremont, CA, US (1G) | 782 Mbits/sec | busy
iperf3 Network Speed Tests (IPv6):
---------------------------------
Provider | Location (Link) | Send Speed | Recv Speed
| | |
Bouygues Telecom | Paris, FR (10G) | 463 Mbits/sec | 186 Mbits/sec
Online.net | Paris, FR (10G) | 713 Mbits/sec | 75.7 Mbits/sec
Severius | The Netherlands (10G) | 753 Mbits/sec | 73.5 Mbits/sec
Worldstream | The Netherlands (10G) | 740 Mbits/sec | 58.6 Mbits/sec
wilhelm.tel | Hamburg, DE (10G) | 744 Mbits/sec | 75.0 Mbits/sec
Airstream Communications | Eau Claire, WI, US (10G) | 473 Mbits/sec | 149 Mbits/sec
Hurricane Electric | Fremont, CA, US (1G) | busy | busy
Geekbench 4 Benchmark Test:
---------------------------------
Test | Value
|
Single Core | 4012
Multi Core | 13007
Full Test | https://browser.geekbench.com/v4/cpu/14768101
More example output:
- Hetzner Cloud (2GB Nuremberg) Ubuntu 16.04 YABS Result - https://pastebin.com/ZpigDz40
- Hetzner Cloud (2GB Falkenstein) Ubuntu 18.04 YABS Result - https://pastebin.com/1hYi5LFM
- Hetzner Cloud (2GB Helsinki) Fedora 30 YABS Result - https://pastebin.com/ev0uyBZG
- Hetzner Cloud (2GB Nuremberg) Debian 9 YABS Result - https://pastebin.com/Cpg5q44K
- Hetzner Cloud (2GB Falkenstein) Debian 10 YABS Result - https://pastebin.com/0n8agm1i
- Hetzner Cloud (2GB Helsinki) CentOS 7 YABS Result - https://pastebin.com/TKYKLy1Q
Feedback
I welcome any feedback you may have or any bug reports.
Thank you to those who provided input as this was being thought about and those who helped test the script as it was being developed -- thanks FHR, Rhys, scorpio18, Joshua, & ChrisM! Testing the script on different Linux distros was done using Hetzner Cloud.
Feel free to test it out and post your results. Thanks!
-Mason
Comments
Good one
Tested it on my personal laptop (Running MX linux).. worked perfectly. Just the right amount of information/detail. Disk speed, network speed, Geekbench. I appreciate how it's not cluttered by anything else. No doubt you had input/testing.
Awesome, thanks for the feedback, Mark! Happy to hear it worked well on MX linux as I hadn't tested that specific distro. Took quite a bit of trial and error to get things working cross-distros. Thanks again!
I'm running MX 18 which is based on Debian 9, so it's not too weird of a distro (I hope). My biggest compliment is to the information provided by your benchmark script. I can only speak for myself, but when I run a benchmark script I'm looking for disk speed and network speed primarily, and the Geekbench is a nice touch. You presented the results in an easy to understand way without being annoying or confusing (or overwhelming), so it's a genuine compliment from this end. I'm definitely bookmarking this one.
Good job on providing necessary info without the clutter.
This looks great!
Would be awesome if it also shows ping results as well
Thank you! Ping results is a pretty good idea. I will try to find a way to incorporate that in.
Not bad but a bit slow on first dd.
Is that HE a 10G link?
Yeah.
Not sure why the speedtest didn't work.
Also, I do have a 40G NVMe and a 100G HDD, which are shown as a combined total; the speeds shown are obviously from the NVMe. Not sure if that's a common setup, or the majority of servers just have one drive to deal with.
Happy to check/retest if you want. Otherwise, nice script!
Swap : 7.4G
Disk : 221G
dd Disk Speed Tests:
Single Core | 4963
Multi Core | 15898
Full Test | https://browser.geekbench.com/v4/cpu/14768944
Edit: this is a Worldstream server that will be used for a VPN service in a few months
Notes:
The write speed seems off? I'm running 6x500G ssd in Raid10, and getting +-800MB/s writes with a different benchmark
my / is 70GB, and my LVM pool 1.29t. I also have a HDD mounted at /hdd but it seems it doesn't count this, so that's good
You stated that the Velocity server is 1Gbit, but im getting 2Gbit+- speeds. Same for he.net. Server location is in the Netherlands
A few issues:
SYS ARM Debian 9
Scaleway Debian 10
Standard install of iperf is version 2 with this debian buster.
I suspect 'noexec' for /tmp won't be helping
Nice! Adding ioping would be great. IOPS matters!
Thanks for the bug reports, guys! Going to try and fix those up. Will probably be messaging a few of y'all to figure out your exact system config/specs. Cheers!
I'm pretty annoyed with geekbench profiles these days, since there's not much way to comment on them, connect them with particular server offers, or download all of them in a batch. Geekbench itself isn't that predictive a benchmark either. On single cpu machines passmark has been pretty good. The dual socket passmark results always seem suspicious to me though.
This is benchmark from PHP-friend 10GB offer:
The CPU is told to be nested virtual but on your bench script there is VM-x disabled.
I am not a profil and this is CPU flags:
Thanks for the test! A few of the output lines should be overwritten after showing up (the "performing x test..." lines), so I'm curious to find out what specific environment you're running this in.
Can you let me know the info below for your environment?
OS, Kernel, and 32 or 64 bit architecture?
Thanks, not sure how I missed that. Fixed.
Send me some info on your environment so I can debug the speedtest stuffs. It's probably failing to launch iperf for some reason.
Can you let me know your OS, Kernel, and 32 or 64 bit architecture?
The disk space is intentionally supposed to be a grand total of all space on the machine (minus tmpfs and mounted nfs partitions). Where ever the script is ran from is which disk will be tested (i.e. if /data is mounted with the HDD, then run the script from /data to benchmark the HDD speeds).
Yeah, seems that dd is more finicky with benchmarking speeds than I originally anticitipated. Going to look into an alternative to dd to benchmark speeds (possibly ioping and/or fio). Hopefully the speed results would be more reliable after that change.
As for disk space, I tried to make it so that it counts and totals up any disk space on the system (minus tmpfs and mounted nfs partitions). If you don't mind, for the disks that weren't counted, can you let me know the "Type" of the partition? -
df -T
Fixed the Velocity and HE.net link display. Couldn't find them reported anywhere, so had to make a best guess with the limited 10G servers I have access to :P. Thanks for reporting the issues and testing the script!
My guess is that ARM has issues with the downloaded binary. Since it's a pre-compiled binary and isn't installed/compiled locally. Might just have to put in a check and output that iperf tests aren't supported if ARM is the detected architecture.
I'll look into that! Might be easily doable if I switch from dd to some
Thanks for the report! Just fixed this and pushed an update to the repo. Had made a small typo in the line that detects VM-x/AMD-v.
Nice script. Im kinda bored with freevps.us script, yours gives a nicer touch. Great job
Nice... Ran the script on a few vpses. Threw up interesting results. Will post update in the morning
I should also point out that refactoring and adding comments to the code are both on my to-do list for this project. For the most part, I just went along and tinkered to try and get things working, then moved on, leaving those portions as is.
Many things in the script should probably be standardized (consistent variable names, consistent if/then statement structure, etc.) and comments added to describe what the hell it's actually doing to make the code more readable and able to be picked up by someone else that may want to contribute.
The script in its current state should be viewed as a 'beta test' of sorts. I only started working on it last week after all, so I'm sure there will be a few iterations of it moving forward as more feedback/bug reports come in.
Anyways, thanks for the interest and comments thus far everyone!
Awesome.
Encountered issue with Virmach Centos
Works fine with my Upcloud Ubuntu.
Thanks for the report and test! I believe the error is because your /tmp fs has the non-executable flag. I'm going to have it put and run everything in the same directory that the script is run to avoid running into this error in the future, as it seems to be a recurring problem.
IPv4 test took more than 30 minutes to complete. And now it is running IPv6 which looks like will take another 30+ minutes.
Hmm... Something is definitely off there. Doesn't seem to be able to connect to any of the iperf locations for whatever reason. If you could, send me more info about your environment - OS, Kernel, and 32 or 64 bit architecture?
Also maybe try installing and running iperf3 locally to see if the issue persists even when it's installed natively.
It's 64 bit Debian 9.
Disabled ufw and ran network test again. By the way does "Send Speed" mean from my VPS to provider or from provider to VPS?
This is a VirMach VPS and I thought ColoCrossing doesn't support IPv6 so how come IPv6 test is showing result?
Glad that solved it. I'll add a disclaimer to the github readme that firewalls might need to be disabled since it uses non-standard ports.
Speeds are from the perspective of the machine that you're benchmarking. So,
Send Speed means: Your VPS ----> Remote Server
Recv Speed means: Remote Server ----> Your VPS
Some of their locations do have IPv6, I believe. At least the ones that are still ServerHub. Which location do you have with them? Or have you possibly set up a HE.net IPv4-to-v6 tunnel?