n-st / nench Goto Github PK
View Code? Open in Web Editor NEWVPS benchmark script — based on the popular bench.sh, plus CPU and ioping tests, and dual-stack IPv4 and v6 speedtests by default
License: Apache License 2.0
VPS benchmark script — based on the popular bench.sh, plus CPU and ioping tests, and dual-stack IPv4 and v6 speedtests by default
License: Apache License 2.0
The CPU benchmarking values measured using time
are not redirected to the file appropriately, since time
prints to stderr by default. I.e. when running bash nensh.sh > nensh.txt
the times will be printed to the console (stderr) and not show up in nensh.txt
Changing the lines
time "$gnu_dd" if=/dev/zero bs=1M count=500 2> /dev/null | \
"$@" > /dev/null
to
( time "$gnu_dd" if=/dev/zero bs=1M count=500 2> /dev/null | \
"$@" > /dev/null ) 2>&1
Fixes the issue. There may be an easier solution to this, I'm not well versed in shell programming.
"column" binary not standard on Ubuntu, need to install package bsdmainutils
dd test is displaying error -
dd test
nench.sh: line 161: printf: 2.3e+09: invalid number
1st run: 0.00 MiB/s
nench.sh: line 164: printf: 2.4e+09: invalid number
2nd run: 0.00 MiB/s
nench.sh: line 167: printf: 2.6e+09: invalid number
3rd run: 0.00 MiB/s
nench.sh: line 171: printf: 2.43333e+09: invalid number
average: 0.00 MiB/s
I should mention this is on a ZFS based fs.
The server hosting wget.racing is currently (and likely permanently) offline. A replacement is being prepared, apologies for the inconvenience.
Ubuntu 20.04
Disks:
sda 38.2G HDD
CPU: SHA256-hashing 500 MB
CPU: bzip2-compressing 500 MB
CPU: AES-encrypting 500 MB
ioping: seek rate
min/avg/max/mdev = 102.7 us / 315.6 us / 19.9 ms / 252.1 us
ioping: sequential read speed
generated 7.51 k requests in 5.00 s, 1.83 GiB, 1.50 k iops, 375.6 MiB/s
While in CentOS 7, 8
Disks:
sda 152.6G HDD
sdb 100G HDD
CPU: SHA256-hashing 500 MB
2.062 seconds
CPU: bzip2-compressing 500 MB
6.318 seconds
CPU: AES-encrypting 500 MB
1.390 seconds
ioping: seek rate
min/avg/max/mdev = 93.3 us / 363.1 us / 17.9 ms / 363.8 us
ioping: sequential read speed
generated 5.03 k requests in 5.00 s, 1.23 GiB, 1.01 k iops, 251.7 MiB/s
Connection to speedtest.dal01.softlayer.com over IPv6 fails.
--2019-07-19 14:22:21-- http://speedtest.dal01.softlayer.com/
Resolving speedtest.dal01.softlayer.com (speedtest.dal01.softlayer.com)... 2607:f0d0:1003:31::2
Connecting to speedtest.dal01.softlayer.com (speedtest.dal01.softlayer.com)|2607:f0d0:1003:31::2|:80... failed: Resource temporarily unavailable.
Retrying.
is it okay if i change the test to a another DC with working IPv6?
Downloading executable code over HTTP is probably not the best idea.
One can download from https://github.com/n-st/nench/raw/master/nench.sh instead, but the script also downloads ioping binary over HTTP.
The static binary was originally added for three reasons:
Less effort and system clutter:
Among nench
's software requirements, ioping
is arguably the most uncommon
and least likely to be present by default.
Providing the static binary avoids additional installations, at least on
binary-compatible systems (Linux amd64 in this case).
Consistent output format:
ioping
's output format changed between version 0.9 and 1.0, but 1.0 still
reports the old version:
% apt-cache policy ioping
ioping:
Installed: 1.0-2
Candidate: 1.0-2
Version table:
*** 1.0-2 500
500 http://httpredir.debian.org/debian stretch/main amd64 Packages
100 /var/lib/dpkg/status
% ioping -v
ioping 0.9
The same happens with the static binary, but there I can be certain which
version it is (and parse the output appropriately).
Consistent test scope:
ioping
1.0 added a second summary line (marked with >
below) that reports
iops and throughput for the full deadline period (-w
) requested on the
commandline, rather than the old summary that excludes data from some of the
probes (such as the "warmup" at the beginning):
% ioping -DRL -w 5 . # ioping 0.9
--- . ( ) ioping statistics ---
301 requests completed in 5.11 s, 58 iops, 14.7 MiB/s
min/avg/max/mdev = 778 us / 17.0 ms / 236.0 ms / 31.4 ms
% ioping -DRL -w 5 . # ioping 1.0
--- . ( ) ioping statistics ---
1.65 k requests completed in 4.99 s, 413.5 MiB read, 331 iops, 82.9 MiB/s
> generated 1.66 k requests in 5.00 s, 413.8 MiB, 330 iops, 82.7 MiB/s
min/avg/max/mdev = 2.75 ms / 3.01 ms / 66.0 ms / 2.10 ms
Long story short, the static binary could be made superfluous by switching to
the "opportunistic" summary line (which is present in both old and new
versions) and selecting it by its content rather than its position in the
output.
It would also be possible to use the -B
option (which I wasn't aware of when
I created nench
, but which is present even in older versions) and parse the
"raw" output it produces. It may be possible to re-use the Bps_to_MiBps
formatter that's already used for the dd
and curl
output.
The primary disadvantages would be potentially breaking comparability between
old and new nench
results, and requiring the installation of ioping
just
for the test.
Perhaps offer the static binary for manual installation (then documented in
the README) and use only the system-installed version if the user doesn't
request otherwise?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.