Skip to content

modify arguments approach with dry-run, usage and parameters#2

Open
romdalf wants to merge 27 commits intochira001:mainfrom
romdalf:main
Open

modify arguments approach with dry-run, usage and parameters#2
romdalf wants to merge 27 commits intochira001:mainfrom
romdalf:main

Conversation

@romdalf
Copy link

@romdalf romdalf commented Apr 6, 2021

some args were not being set as parameters from a cli perspective
modified the actual approach to have a simple case definition to catch options and values
give a usage
give a quick dry run
give the default run with the recommended value

@chira001
Copy link
Owner

chira001 commented Apr 6, 2021

The current way of accepting arguments via environment variables was to make it easier to containerise it and run in K8s in future - thoughts?

@romdalf
Copy link
Author

romdalf commented Apr 6, 2021

The current way of accepting arguments via environment variables was to make it easier to containerise it and run in K8s in future - thoughts?

Indeed, I kind of lost myself in pure linux cli without thinking of the container approach.
I just give it a run by creating a container folder with the almost original version volbench.sh along with dockerfile and compose files.

Tested with the following output:

rovandep@cloudy:~/dev/volbench/container$ docker build -t volbench .
[+] Building 2.7s (8/8) FINISHED
 => [internal] load build definition from Dockerfile                                                                0.0s
 => => transferring dockerfile: 38B                                                                                 0.0s
 => [internal] load .dockerignore                                                                                   0.0s
 => => transferring context: 2B                                                                                     0.0s
 => [internal] load metadata for docker.io/library/bash:latest                                                      2.5s
 => [internal] load build context                                                                                   0.0s
 => => transferring context: 6.59kB                                                                                 0.0s
 => [1/3] FROM docker.io/library/bash:latest@sha256:aead4bebd5ad1ccf25a58d8fc797ee99437546dea116abfcef8435bd130218  0.0s
 => CACHED [2/3] RUN set -eux;  apk add --no-cache --virtual .build-deps  fio                                       0.0s
 => [3/3] COPY volbench.sh /                                                                                        0.0s
 => exporting to image                                                                                              0.0s
 => => exporting layers                                                                                             0.0s
 => => writing image sha256:c10fd060fa8ade4c1cf9d8a7bfd9513951bad3d239f63d942e704085f0c5ec05                        0.0s
 => => naming to docker.io/library/volbench                                                                         0.0s
rovandep@cloudy:~/dev/volbench/container$ docker-compose up
Recreating volbench-1 ... done
Attaching to volbench-1
volbench-1  |
volbench-1  | Starting VolBench tests ...
volbench-1  |
volbench-1  | Test parameters:
volbench-1  | FIO_files="/tmp/volbenchtest1 /tmp/volbenchtest2"
volbench-1  | FIO_size=1MB  FIO_ramptime=1  FIO_runtime=5
volbench-1  |
volbench-1  |
volbench-1  | Testing read iops ...
volbench-1  | /volbench.sh: line 82: /proc/sys/vm/drop_caches: Read-only file system
volbench-1  |                      Test file   R iops  R lat ms   R MB/s     W iops  W lat ms   W MB/s
volbench-1  |            "/tmp/volbenchtest1     4844     3.301     18.9          0     0.000      0.0
volbench-1  |            /tmp/volbenchtest2"    52461     0.304    204.9          0     0.000      0.0
volbench-1  |                  TOTAL/Average    57305     1.803    223.9          0     0.000      0.0
volbench-1  |
volbench-1  | Testing write iops ...
volbench-1  | /volbench.sh: line 82: /proc/sys/vm/drop_caches: Read-only file system
volbench-1  |                      Test file   R iops  R lat ms   R MB/s     W iops  W lat ms   W MB/s
volbench-1  |            "/tmp/volbenchtest1        0     0.000      0.0       4186     3.818     16.4
volbench-1  |            /tmp/volbenchtest2"        0     0.000      0.0      69334     0.230    270.8
volbench-1  |                  TOTAL/Average        0     0.000      0.0      73520     2.024    287.2
volbench-1  |
volbench-1  | Testing read throughput ...
volbench-1  | /volbench.sh: line 82: /proc/sys/vm/drop_caches: Read-only file system
volbench-1  |                      Test file   R iops  R lat ms   R MB/s     W iops  W lat ms   W MB/s
volbench-1  |            "/tmp/volbenchtest1      794    20.109     99.7          0     0.000      0.0
volbench-1  |            /tmp/volbenchtest2"    12724     1.256   1591.0          0     0.000      0.0
volbench-1  |                  TOTAL/Average    13518    10.682   1690.6          0     0.000      0.0
volbench-1  |
volbench-1  | Testing write throughput ...
volbench-1  | /volbench.sh: line 82: /proc/sys/vm/drop_caches: Read-only file system
volbench-1  |                      Test file   R iops  R lat ms   R MB/s     W iops  W lat ms   W MB/s
volbench-1  |            "/tmp/volbenchtest1        0     0.000      0.0        975    16.372    122.3
volbench-1  |            /tmp/volbenchtest2"        0     0.000      0.0      15898     1.005   1987.7
volbench-1  |                  TOTAL/Average        0     0.000      0.0      16873     8.688   2110.0
volbench-1  |
volbench-1  | Testing read latency ...
volbench-1  | /volbench.sh: line 82: /proc/sys/vm/drop_caches: Read-only file system
volbench-1  |                      Test file   R iops  R lat ms   R MB/s     W iops  W lat ms   W MB/s
volbench-1  |            "/tmp/volbenchtest1     4845     0.824     18.9          0     0.000      0.0
volbench-1  |            /tmp/volbenchtest2"    19772     0.201     77.2          0     0.000      0.0
volbench-1  |                  TOTAL/Average    24617     0.513     96.2          0     0.000      0.0
volbench-1  |
volbench-1  | Testing write latency ...
volbench-1  | /volbench.sh: line 82: /proc/sys/vm/drop_caches: Read-only file system
volbench-1  |                      Test file   R iops  R lat ms   R MB/s     W iops  W lat ms   W MB/s
volbench-1  |            "/tmp/volbenchtest1        0     0.000      0.0       5607     0.712     21.9
volbench-1  |            /tmp/volbenchtest2"        0     0.000      0.0      23703     0.168     92.6
volbench-1  |                  TOTAL/Average        0     0.000      0.0      29310     0.440    114.5
volbench-1  |
volbench-1  | Testing mixed iops ...
volbench-1  | /volbench.sh: line 82: /proc/sys/vm/drop_caches: Read-only file system
volbench-1  |                      Test file   R iops  R lat ms   R MB/s     W iops  W lat ms   W MB/s
volbench-1  |            "/tmp/volbenchtest1     3109     3.882     12.2       1024     3.820      4.0
volbench-1  |            /tmp/volbenchtest2"    31168     0.390    121.8      10444     0.364     40.8
volbench-1  |                  TOTAL/Average    34277     2.136    133.9      11468     2.092     44.8
volbench-1  |
volbench-1  | Testing read seqential ...
volbench-1  | /volbench.sh: line 82: /proc/sys/vm/drop_caches: Read-only file system
volbench-1  |                      Test file   R iops  R lat ms   R MB/s     W iops  W lat ms   W MB/s
volbench-1  |            "/tmp/volbenchtest1       82    47.972     83.8          0     0.000      0.0
volbench-1  |            "/tmp/volbenchtest1      105    37.930    105.9          0     0.000      0.0
volbench-1  |            "/tmp/volbenchtest1       96    41.293     97.4          0     0.000      0.0
volbench-1  |            "/tmp/volbenchtest1      102    38.926    103.3          0     0.000      0.0
volbench-1  |            /tmp/volbenchtest2"      309    12.889    310.5          0     0.000      0.0
volbench-1  |            /tmp/volbenchtest2"      338    11.803    339.2          0     0.000      0.0
volbench-1  |            /tmp/volbenchtest2"      315    12.670    316.0          0     0.000      0.0
volbench-1  |            /tmp/volbenchtest2"      300    13.300    300.9          0     0.000      0.0
volbench-1  |                  TOTAL/Average     1647    27.098   1657.0          0     0.000      0.0
volbench-1  |
volbench-1  | Testing write seqential ...
volbench-1  | /volbench.sh: line 82: /proc/sys/vm/drop_caches: Read-only file system
volbench-1  |                      Test file   R iops  R lat ms   R MB/s     W iops  W lat ms   W MB/s
volbench-1  |            "/tmp/volbenchtest1        0     0.000      0.0         39    99.746     40.6
volbench-1  |            "/tmp/volbenchtest1        0     0.000      0.0         39    99.410     40.7
volbench-1  |            "/tmp/volbenchtest1        0     0.000      0.0         40    98.840     40.9
volbench-1  |            "/tmp/volbenchtest1        0     0.000      0.0         40    97.790     41.4
volbench-1  |            /tmp/volbenchtest2"        0     0.000      0.0        640     6.240    640.8
volbench-1  |            /tmp/volbenchtest2"        0     0.000      0.0        639     6.247    640.3
volbench-1  |            /tmp/volbenchtest2"        0     0.000      0.0        639     6.243    640.4
volbench-1  |            /tmp/volbenchtest2"        0     0.000      0.0        639     6.245    640.4
volbench-1  |                  TOTAL/Average        0     0.000      0.0       2715    52.595   2725.5
volbench-1  |
volbench-1  |
volbench-1  |       VolBench Summary       Reads          Writes
volbench-1  | ---------------------------------------------------------
volbench-1  |         I/O operations:      57305 iops      73520 iops
volbench-1  |              Mixed I/O:      34277 iops      11468 iops
volbench-1  |                Latency:      0.513 ms        0.440 ms
volbench-1  |      Random throughput:     1690.6 MB/s     2110.0 MB/s
volbench-1  |  Sequential throughput:     1657.0 MB/s     2725.5 MB/s
volbench-1  |
volbench-1  |
volbench-1 exited with code 0

Still have to look at :

volbench-1  | /volbench.sh: line 82: /proc/sys/vm/drop_caches: Read-only file system

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants