Sunday, March 4, 2018

OpenBSD tests: file writing and download

Part 1: File writing

512MB RAM
1 CPU vCore


mkdir -p test && cd test



# OS: OpenBSD


# Test 100: start here
  rm ../test/*
  repeat_times=100
  x=1
  while [ $x -le "$repeat_times" ]
  do
    dd if=/dev/zero of=r.$x.bin bs=1024 count=4096 2>> testLogger.log
    x=$(( $x + 1 ))
  done

  cat testLogger.log | grep secs | awk -v FS="(in|secs)" '{print $2}' >> tmpLogger.file
 
  echo 'Total time taken (in secs): '
  awk '{s+=$1} END {printf "%8.4f", s;}' tmpLogger.file

echo 'End of Test'
# Test 100: end here


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


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

#----

# Test 1000: start here
  rm ../test/*
  repeat_times=1000
  x=1
  while [ $x -le "$repeat_times" ]
  do
    dd if=/dev/zero of=r.$x.bin bs=1024 count=4096 2>> testLogger.log
    x=$(( $x + 1 ))
  done

  cat testLogger.log | grep secs | awk -v FS="(in|secs)" '{print $2}' >> tmpLogger.file

  echo 'Total time taken (in secs): '
  awk '{s+=$1} END {printf "%8.4f", s;}' tmpLogger.file

echo 'End of Test'
# Test 1000: end here


# OpenBSD 6.2

# Update (4 March 2018)
syspatch
reboot

#=----

Test 100: Results: (4 attempts) (OpenBSD 6.2)
3.3500
3.4260
3.1950
3.4380

Test 1000: Results: (4 attempts) (OpenBSD 6.2)
33.4410
34.5650
34.4910
33.6340



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

# OS: CentOS, Ubuntu, Debian

mkdir -p test && cd test

# Test 100: start here
  rm -rf ../test/*
  repeat_times=100
  x=1
  while [ $x -le "$repeat_times" ]
  do
    dd if=/dev/zero of=r.$x.bin bs=1024 count=4096 2>> testLogger.log
    x=$(( $x + 1 ))
  done

  cat testLogger.log | grep bytes | awk -v FS="(copied,|s)" '{print $3}' >> tmpLogger.file
 
  echo 'Total time taken (in secs): '
  awk '{s+=$1} END {printf "%8.4f", s;}' tmpLogger.file

echo 'End of Test'
# Test 100: end here

#######

# Test 1000: start here
  rm -rf ../test/*
  repeat_times=1000
  x=1
  while [ $x -le "$repeat_times" ]
  do
    dd if=/dev/zero of=r.$x.bin bs=1024 count=4096 2>> testLogger.log
    x=$(( $x + 1 ))
  done

  cat testLogger.log | grep bytes | awk -v FS="(copied,|s)" '{print $3}' >> tmpLogger.file
 
  echo 'Total time taken (in secs): '
  awk '{s+=$1} END {printf "%8.4f", s;}' tmpLogger.file

echo 'End of Test'
# Test 1000: end here


# CentOS 7.4

# Update (4 March 2018)
yum -y update
reboot

# Test 100: Results: (4 attempts) (CentOS 7)
2.2620
1.6376
1.5606
1.8752

# Test 1000: Results: (4 attempts) (CentOS 7)
15.8015
14.6734
14.8665
14.7682



# Ubuntu 16.04

# Update (4 March 2018)
apt update && apt -y upgrade
reboot

# Test 100: Results: (4 attempts) (Ubuntu 16)
2.2311
2.3433
1.9813
1.9542

# Test 1000: Results: (4 attempts) (Ubuntu 16)
17.7124
17.6261
16.9264
16.9259


# Debian 9

# Update (4 March 2018)
apt update && apt -y upgrade
reboot

# Test 100: Results: (4 attempts) (Debian 9)
2.2276
1.8756
2.0698
2.2601


# Test 1000: Results: (4 attempts) (Debian 9)
18.3741
17.0963
17.9382
16.4450


Part 2: Download

2 machines
512MB RAM
1 CPU vCore



download size : 4194304 (4.0M)

file created by:
dd if=/dev/zero of=filename bs=1024 count=4096

download by:
wget http://_ip_address_/filename

download from OpenBSD httpd server to CentOS client
(6 attempts)
49.2 MB/s
34.2 MB/s
36.6 MB/s
29.3 MB/s
42.9 MB/s
39.8 MB/s
Mean: 38.67 MB/s


download from CentOS Nginx server to OpenBSD client
(6 attempts)
39.3 MB/s
29.5 MB/s
25.7 MB/s
34.1 MB/s
31.6 MB/s
34.3 MB/s
Mean: 32.42 MB/s


download from OpenBSD httpd server to OpenBSD client
from A to B       from B to A
12.0 MB/s         24.0 MB/s
26.7 MB/s         31.5 MB/s
12.0 MB/s         11.8 MB/s
34.3 MB/s         26.8 MB/s
27.8 MB/s         30.7 MB/s
29.2 MB/s         28.0 MB/s
Mean: 23.67 MB/s  25.47  MB/s






No comments: