added geekbench system performance test

This commit is contained in:
Mason Rowe 2019-10-05 21:55:21 -04:00
parent 66354adc21
commit f2d04cd6d9
2 changed files with 63 additions and 26 deletions

View File

@ -12,51 +12,60 @@ This script isn't an attempt to be a golden standard. It's just yet another benc
## Tests Conducted ## Tests Conducted
* **dd** - the dd utility is utilized to test disk performance. Both write and read speeds are evaluated by writing to and reading from a test file. \*Disclaimer: read speeds may be heavily influenced by cache depending on configuration of the host. * **dd** - the dd utility is utilized to test disk performance. Both write and read speeds are evaluated by writing to and reading from a test file. **\***Disclaimer: read speeds may be heavily influenced by cache depending on configuration of the host.
* **iperf3** - the industry standard for testing download and upload speeds to various locations. This script utilizes iperf3 with 8 parallel threads and tests both download and upload speeds. If an iperf server is busy after 10 tries, the speed test for that location/direction is skipped. * **iperf3** - the industry standard for testing download and upload speeds to various locations. This script utilizes iperf3 with 8 parallel threads and tests both download and upload speeds. If an iperf server is busy after 10 tries, the speed test for that location/direction is skipped.
* **Geekbench 4** - Geekbench is a benchmarking program that meastures system performance, which is widely used in the tech community. The web URL is displayed to be able to see complete test and individual benchmark results and be compare to other geekbench'd systems. The claim URL to add the Geekbench 4 result to your Geekbench profile is written to a file in the directory that this script is executed from.
## Example Output ## Example Output
``` ```
# ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## # # ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #
# Yet-Another-Bench-Script # # Yet-Another-Bench-Script #
# v2019-10-04 # # v2019-10-05 #
# https://github.com/masonr/yet-another-bench-script # # https://github.com/masonr/yet-another-bench-script #
# ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## # # ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #
Fri Oct 4 21:06:05 EDT 2019 Sat Oct 5 21:44:13 EDT 2019
Basic System Information: Basic System Information:
--------------------------------- ---------------------------------
Processor : Intel(R) Xeon(R) CPU E3-1230 V2 @ 3.30GHz Processor : Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
CPU cores : 8 @ 2096.045 MHz CPU cores : 32 @ 1200.563 MHz
AES-NI : ✔ Enabled AES-NI : ✔ Enabled
VM-x/AMD-V : ❌ Disabled VM-x/AMD-V : ❌ Disabled
RAM : 31G RAM : 62G
Swap : 7.5G Swap : 59G
Disk : 213G Disk : 44T
dd Disk Speed Tests: dd Disk Speed Tests:
--------------------------------- ---------------------------------
| Test 1 | Test 2 | Test 3 | Avg | Test 1 | Test 2 | Test 3 | Avg
| | | | | | | |
Write | 361 MB/s | 363 MB/s | 362 MB/s | 362 MB/s Write | 275 MB/s | 177 MB/s | 177 MB/s | 209 MB/s
Read | 407 MB/s | 410 MB/s | 412 MB/s | 409 MB/s Read* | 537 MB/s | 539 MB/s | 536 MB/s | 537 MB/s
iperf3 Network Speed Tests: iperf3 Network Speed Tests:
--------------------------------- ---------------------------------
Provider | Location (Link) | Send Speed | Recv Speed Provider | Location (Link) | Send Speed | Recv Speed
| | | | | |
Bouygues Telecom | Paris, FR (10G) | 759 Mbits/sec | 282 Mbits/sec Bouygues Telecom | Paris, FR (10G) | 160 Mbits/sec | 158 Mbits/sec
Online.net | Paris, FR (10G) | 744 Mbits/sec | 166 Mbits/sec Online.net | Paris, FR (10G) | 165 Mbits/sec | 94.2 Mbits/sec
Severius | The Netherlands (10G) | 782 Mbits/sec | 111 Mbits/sec Severius | The Netherlands (10G) | 161 Mbits/sec | 151 Mbits/sec
Worldstream | The Netherlands (10G) | busy | 75.7 Mbits/sec Worldstream | The Netherlands (10G) | 166 Mbits/sec | 88.1 Mbits/sec
wilhelm.tel | Hamburg, DE (10G) | 807 Mbits/sec | 56.7 Mbits/sec wilhelm.tel | Hamburg, DE (10G) | 160 Mbits/sec | 148 Mbits/sec
Biznet | Bogor, Indonesia (1G) | busy | busy Biznet | Bogor, Indonesia (1G) | 118 Mbits/sec | 57.5 Mbits/sec
Hostkey | Moscow, RU (1G) | 191 Mbits/sec | 474 Mbits/sec Hostkey | Moscow, RU (1G) | 148 Mbits/sec | 135 Mbits/sec
Velocity Online | Tallahassee, FL, US (?G) | 860 Mbits/sec | 452 Mbits/sec Velocity Online | Tallahassee, FL, US (1G) | 179 Mbits/sec | 133 Mbits/sec
Airstream Communications | Eau Claire, WI, US (10G) | 312 Mbits/sec | 234 Mbits/sec Airstream Communications | Eau Claire, WI, US (10G) | 186 Mbits/sec | 150 Mbits/sec
Hurricane Electric | Fremont, CA, US (1G) | 794 Mbits/sec | busy Hurricane Electric | Fremont, CA, US (1G) | 168 Mbits/sec | busy
Geekbench 4 CPU Performance Test:
---------------------------------
Test | Value
|
Single Core | 3207
Multi Core | 37289
Full Test | https://browser.geekbench.com/v4/cpu/14763522
``` ```

40
yabs.sh
View File

@ -2,7 +2,7 @@
echo -e '# ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #' echo -e '# ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #'
echo -e '# Yet-Another-Bench-Script #' echo -e '# Yet-Another-Bench-Script #'
echo -e '# v2019-10-04 #' echo -e '# v2019-10-05 #'
echo -e '# https://github.com/masonr/yet-another-bench-script #' echo -e '# https://github.com/masonr/yet-another-bench-script #'
echo -e '# ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #' echo -e '# ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #'
@ -34,9 +34,7 @@ DATE=`date -Iseconds | sed -e "s/:/_/g"`
YABS_PATH=/tmp/$DATE/ YABS_PATH=/tmp/$DATE/
mkdir -p $YABS_PATH mkdir -p $YABS_PATH
echo -e echo -e "Performing dd disk performance test. This may take a couple minutes to complete..."
echo -e "dd Disk Speed Tests:"
echo -e "---------------------------------"
function dd_test { function dd_test {
I=0 I=0
@ -68,16 +66,20 @@ touch $DATE.test 2> /dev/null
if [ -f "$DATE.test" ]; then if [ -f "$DATE.test" ]; then
dd_test dd_test
rm $DATE.test rm $DATE.test
echo -en "\e[1A"; echo -e "\e[0K\r"
echo -e "dd Disk Speed Tests:"
echo -e "---------------------------------"
printf "%-6s | %-10s | %-10s | %-10s | %-10s\n" " " "Test 1" "Test 2" "Test 3" "Avg" printf "%-6s | %-10s | %-10s | %-10s | %-10s\n" " " "Test 1" "Test 2" "Test 3" "Avg"
printf "%-6s | %-10s | %-10s | %-10s | %-10s\n" printf "%-6s | %-10s | %-10s | %-10s | %-10s\n"
printf "%-6s | %-10s | %-10s | %-10s | %-10s\n" "Write" "${DD_WRITE_TEST_RES[0]}" "${DD_WRITE_TEST_RES[1]}" "${DD_WRITE_TEST_RES[2]}" "${DD_WRITE_TEST_AVG} ${DD_WRITE_TEST_UNIT}" printf "%-6s | %-10s | %-10s | %-10s | %-10s\n" "Write" "${DD_WRITE_TEST_RES[0]}" "${DD_WRITE_TEST_RES[1]}" "${DD_WRITE_TEST_RES[2]}" "${DD_WRITE_TEST_AVG} ${DD_WRITE_TEST_UNIT}"
printf "%-6s | %-10s | %-10s | %-10s | %-10s\n" "Read*" "${DD_READ_TEST_RES[0]}" "${DD_READ_TEST_RES[1]}" "${DD_READ_TEST_RES[2]}" "${DD_READ_TEST_AVG} ${DD_READ_TEST_UNIT}" printf "%-6s | %-10s | %-10s | %-10s | %-10s\n" "Read*" "${DD_READ_TEST_RES[0]}" "${DD_READ_TEST_RES[1]}" "${DD_READ_TEST_RES[2]}" "${DD_READ_TEST_AVG} ${DD_READ_TEST_UNIT}"
else else
echo -en "\e[1A"; echo -e "\e[0K\r"
echo -e "You do not have write permission in this directory\nSwitch to a different directory to test disk speed.\nSkipping dd tests." echo -e "You do not have write permission in this directory\nSwitch to a different directory to test disk speed.\nSkipping dd tests."
fi fi
IPERF_PATH=$YABS_PATH/iperf IPERF_PATH=$YABS_PATH/iperf
mkdir -p $IPERF_PATH mkdir -p $IPERF_PATH
curl -s -o $IPERF_PATH/libiperf.so.0 https://iperf.fr/download/ubuntu/libiperf.so.0_3.1.3 > /dev/null curl -s -o $IPERF_PATH/libiperf.so.0 https://iperf.fr/download/ubuntu/libiperf.so.0_3.1.3 > /dev/null
@ -128,7 +130,7 @@ IPERF_LOCS=( \
"speedtest.wtnet.de" "5200-5209" "wilhelm.tel" "Hamburg, DE (10G)" \ "speedtest.wtnet.de" "5200-5209" "wilhelm.tel" "Hamburg, DE (10G)" \
"iperf.biznetnetworks.com" "5201-5203" "Biznet" "Bogor, Indonesia (1G)" \ "iperf.biznetnetworks.com" "5201-5203" "Biznet" "Bogor, Indonesia (1G)" \
"speedtest.hostkey.ru" "5200-5203" "Hostkey" "Moscow, RU (1G)" \ "speedtest.hostkey.ru" "5200-5203" "Hostkey" "Moscow, RU (1G)" \
"iperf3.velocityonline.net" "5201-5210" "Velocity Online" "Tallahassee, FL, US (?G)" \ "iperf3.velocityonline.net" "5201-5210" "Velocity Online" "Tallahassee, FL, US (1G)" \
"iperf.airstreamcomm.net" "5201-5205" "Airstream Communications" "Eau Claire, WI, US (10G)" \ "iperf.airstreamcomm.net" "5201-5205" "Airstream Communications" "Eau Claire, WI, US (10G)" \
"iperf.he.net" "5201-5201" "Hurricane Electric" "Fremont, CA, US (1G)" \ "iperf.he.net" "5201-5201" "Hurricane Electric" "Fremont, CA, US (1G)" \
) )
@ -142,7 +144,9 @@ printf "%-25s | %-25s | %-15s | %-15s\n" "Provider" "Location (Link)" "Send Spee
printf "%-25s | %-25s | %-15s | %-15s\n" printf "%-25s | %-25s | %-15s | %-15s\n"
for (( i = 0; i < IPERF_LOCS_NUM; i++ )); do for (( i = 0; i < IPERF_LOCS_NUM; i++ )); do
echo -e "Performing iperf3 test to ${IPERF_LOCS[i*4+2]}..."
iperf_test "${IPERF_LOCS[i*4]}" "${IPERF_LOCS[i*4+1]}" iperf_test "${IPERF_LOCS[i*4]}" "${IPERF_LOCS[i*4+1]}"
echo -en "\e[1A"
IPERF_SENDRESULT_VAL=$(echo $IPERF_SENDRESULT | awk '{ print $6 }') IPERF_SENDRESULT_VAL=$(echo $IPERF_SENDRESULT | awk '{ print $6 }')
IPERF_SENDRESULT_UNIT=$(echo $IPERF_SENDRESULT | awk '{ print $7 }') IPERF_SENDRESULT_UNIT=$(echo $IPERF_SENDRESULT | awk '{ print $7 }')
IPERF_RECVRESULT_VAL=$(echo $IPERF_RECVRESULT | awk '{ print $6 }') IPERF_RECVRESULT_VAL=$(echo $IPERF_RECVRESULT | awk '{ print $6 }')
@ -152,5 +156,29 @@ for (( i = 0; i < IPERF_LOCS_NUM; i++ )); do
printf "%-25s | %-25s | %-15s | %-15s\n" "${IPERF_LOCS[i*4+2]}" "${IPERF_LOCS[i*4+3]}" "$IPERF_SENDRESULT_VAL $IPERF_SENDRESULT_UNIT" "$IPERF_RECVRESULT_VAL $IPERF_RECVRESULT_UNIT" printf "%-25s | %-25s | %-15s | %-15s\n" "${IPERF_LOCS[i*4+2]}" "${IPERF_LOCS[i*4+3]}" "$IPERF_SENDRESULT_VAL $IPERF_SENDRESULT_UNIT" "$IPERF_RECVRESULT_VAL $IPERF_RECVRESULT_UNIT"
done done
echo -e "Performing Geekbench 4 CPU performance test. This may take a couple minutes to complete..."
GEEKBENCH_PATH=$YABS_PATH/geekbench
mkdir -p $GEEKBENCH_PATH
curl -s http://cdn.geekbench.com/Geekbench-4.3.3-Linux.tar.gz | tar xz --strip-components=1 -C $GEEKBENCH_PATH
GEEKBENCH_TEST=$($GEEKBENCH_PATH/geekbench4 | grep "https://browser")
GEEKBENCH_URL=$(echo -e $GEEKBENCH_TEST | head -1)
GEEKBENCH_URL_CLAIM=$(echo $GEEKBENCH_URL | awk '{ print $2 }')
GEEKBENCH_URL=$(echo $GEEKBENCH_URL | awk '{ print $1 }')
sleep 10
GEEKBENCH_SCORES=$(curl -s $GEEKBENCH_URL | grep "class='score' rowspan")
GEEKBENCH_SCORES_SINGLE=$(echo $GEEKBENCH_SCORES | awk -v FS="(>|<)" '{ print $3 }')
GEEKBENCH_SCORES_MULTI=$(echo $GEEKBENCH_SCORES | awk -v FS="(<|>)" '{ print $7 }')
echo -en "\e[1A"; echo -e "\e[0K\r"
echo -e "Geekbench 4 CPU Performance Test:"
echo -e "---------------------------------"
printf "%-15s | %-30s\n" "Test" "Value"
printf "%-15s | %-30s\n"
printf "%-15s | %-30s\n" "Single Core" "$GEEKBENCH_SCORES_SINGLE"
printf "%-15s | %-30s\n" "Multi Core" "$GEEKBENCH_SCORES_MULTI"
printf "%-15s | %-30s\n" "Full Test" "$GEEKBENCH_URL"
[ ! -z "$GEEKBENCH_URL_CLAIM" ] && echo -e "$GEEKBENCH_URL_CLAIM" > geekbench4_claim.url 2> /dev/null
echo -e echo -e
rm -rf /tmp/$DATE rm -rf /tmp/$DATE