diff --git a/.github/workflows/run-metrics.yaml b/.github/workflows/run-metrics.yaml index f1ac9d61ad..596a3dea46 100644 --- a/.github/workflows/run-metrics.yaml +++ b/.github/workflows/run-metrics.yaml @@ -49,9 +49,12 @@ jobs: - name: run tensorflow test run: bash tests/metrics/gha-run.sh run-test-tensorflow + - name: run fio test + run: bash tests/metrics/gha-run.sh run-test-fio + - name: make metrics tarball ${{ matrix.vmm }} run: bash tests/metrics/gha-run.sh make-tarball-results - + - name: archive metrics results ${{ matrix.vmm }} uses: actions/upload-artifact@v3 with: diff --git a/tests/metrics/storage/fio-k8s/README.md b/tests/metrics/storage/fio-k8s/README.md index 8daad84083..96798849a6 100644 --- a/tests/metrics/storage/fio-k8s/README.md +++ b/tests/metrics/storage/fio-k8s/README.md @@ -3,9 +3,12 @@ This is an automation to run `fio` with Kubernetes. ## Requirements: + - Kubernetes cluster running. - Kata configured as `runtimeclass`. -The test is structured as follow: + +## Test structure: + - [fio-test]: Program wrapper to launch `fio` in a K8s pod. - [pkg]: Library code that could be used for more `fio` automation. - [configs]: Configuration files used by [fio-test]. @@ -13,6 +16,7 @@ The test is structured as follow: - [report] Jupyter Notebook to create reports for data generated by [DAX-compare-test]. ## Top-level Makefile targets + - `build`: Build `fio` metrics. - `test`: quick test, used to verify changes in [fio-test]. - `run`: Run `fio` metrics and generate reports. diff --git a/tests/metrics/storage/fio-k8s/fio-test-ci.sh b/tests/metrics/storage/fio-k8s/fio-test-ci.sh index 3ae51bea40..a05ca9bf0e 100755 --- a/tests/metrics/storage/fio-k8s/fio-test-ci.sh +++ b/tests/metrics/storage/fio-k8s/fio-test-ci.sh @@ -9,7 +9,7 @@ set -e # General env SCRIPT_PATH=$(dirname "$(readlink -f "$0")") source "${SCRIPT_PATH}/../../lib/common.bash" -FIO_PATH="${GOPATH}/src/${TEST_REPO}/metrics/storage/fio-k8s" +FIO_PATH="${GOPATH}/src/github.com/kata-containers/kata-containers/tests/metrics/storage/fio-k8s" TEST_NAME="${TEST_NAME:-fio}" function main() { diff --git a/tests/metrics/storage/fio-k8s/scripts/Makefile b/tests/metrics/storage/fio-k8s/scripts/dax-compare-test/Makefile similarity index 100% rename from tests/metrics/storage/fio-k8s/scripts/Makefile rename to tests/metrics/storage/fio-k8s/scripts/dax-compare-test/Makefile diff --git a/tests/metrics/storage/fio-k8s/scripts/README.md b/tests/metrics/storage/fio-k8s/scripts/dax-compare-test/README.md similarity index 60% rename from tests/metrics/storage/fio-k8s/scripts/README.md rename to tests/metrics/storage/fio-k8s/scripts/dax-compare-test/README.md index 71cfdea846..c8b00f0f98 100644 --- a/tests/metrics/storage/fio-k8s/scripts/README.md +++ b/tests/metrics/storage/fio-k8s/scripts/dax-compare-test/README.md @@ -1,6 +1,6 @@ # FIO in Kubernetes -This test run `fio` jobs to measure how Kata Containers work using virtio-fs DAX. The test works using Kubernetes. +This test runs `fio` jobs to measure how Kata Containers work using virtio-fs DAX. The test works using Kubernetes. The test has to run in a single node cluster, it is needed as the test modifies Kata configuration file. The `virtio-fs` options that this test will use are: @@ -17,25 +17,31 @@ This test by default iterates over different `virtio-fs` configurations. | test name | DAX | thread pool size | cache mode | |---------------------------|-----|------------------|------------| -| pool_0_cache_auto_no_DAX | no | 0 | auto | pool_0_cache_auto_DAX | yes | 0 | auto | +| pool_0_cache_auto_no_DAX | no | 0 | auto | +| pool_0_cache_auto_DAX | yes | 0 | auto | The `fio` options used are: `ioengine`: How the IO requests are issued to the kernel. * `libaio`: Supports async IO for both direct and buffered IO. * `mmap`: File is memory mapped with mmap(2) and data copied to/from using memcpy(3). + `rw type`: Type of I/O pattern. * `randread`: Random reads. * `randrw`: Random mixed reads and writes. * `randwrite`: Random writes. * `read`: Sequential reads. -* `write`: Sequential writes. Additional notes: Some jobs contain a `multi` prefix. This means that the same job runs more than once at the same time using its own file. +* `write`: Sequential writes. + +Additional notes: Some jobs contain a `multi` prefix. This means that the same job runs more than once at the same time using its own file. ### Static `fio` values: + Some `fio` values are not modified over all the jobs. -`runtime`: Tell `fio` to terminate processing after the specified period of time(seconds). -`loops`: Run the specified number of iterations of this job. Used to repeat the same workload a given number of times. -`iodepth`: Number of I/O units to keep in flight against the file. Note that increasing `iodepth` beyond 1 will not affect synchronous `ioengine`. -`size`: The total size of file I/O for each thread of this job. -`direct`: If value is true, use non-buffered I/O. This is usually O_`DIRECT`. -`blocksize`: The block size in bytes used for I/O units + +* `runtime`: Tell `fio` to terminate processing after the specified period of time(seconds). +* `loops`: Run the specified number of iterations of this job. Used to repeat the same workload a given number of times. +* `iodepth`: Number of I/O units to keep in flight against the file. Note that increasing `iodepth` beyond 1 will not affect synchronous `ioengine`. +* `size`: The total size of file I/O for each thread of this job. +* `direct`: If value is true, use non-buffered I/O. This is usually O_`DIRECT`. +* `blocksize`: The block size in bytes used for I/O units. diff --git a/tests/metrics/storage/fio-k8s/scripts/compare-virtiofsd-dax.sh b/tests/metrics/storage/fio-k8s/scripts/dax-compare-test/compare-virtiofsd-dax.sh similarity index 100% rename from tests/metrics/storage/fio-k8s/scripts/compare-virtiofsd-dax.sh rename to tests/metrics/storage/fio-k8s/scripts/dax-compare-test/compare-virtiofsd-dax.sh