{"id":21971269,"url":"https://github.com/eldada/fio-in-kubernetes","last_synced_at":"2025-07-19T10:33:55.577Z","repository":{"id":218696267,"uuid":"747090734","full_name":"eldada/fio-in-kubernetes","owner":"eldada","description":"Building fio in Kubernetes and script to test and collect data","archived":false,"fork":false,"pushed_at":"2024-02-22T10:03:53.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-22T23:09:40.270Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eldada.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-23T08:46:35.000Z","updated_at":"2024-01-23T09:40:25.000Z","dependencies_parsed_at":"2024-01-28T12:22:49.353Z","dependency_job_id":"6ca88eff-2ac3-4793-937b-88f93b8cb6af","html_url":"https://github.com/eldada/fio-in-kubernetes","commit_stats":null,"previous_names":["eldada/fio-in-kubernetes"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/eldada/fio-in-kubernetes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eldada%2Ffio-in-kubernetes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eldada%2Ffio-in-kubernetes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eldada%2Ffio-in-kubernetes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eldada%2Ffio-in-kubernetes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eldada","download_url":"https://codeload.github.com/eldada/fio-in-kubernetes/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eldada%2Ffio-in-kubernetes/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265916840,"owners_count":23848794,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-29T14:49:50.340Z","updated_at":"2025-07-19T10:33:55.532Z","avatar_url":"https://github.com/eldada.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Disk IO tests with fio in Kubernetes\nThis repository has a set of tools to build and optionally run [fio](https://fio.readthedocs.io/en/latest/fio_doc.html) in Kubernetes pods\n\n## Get The Binary\nYou can skip the build and download the pre-built binary directly from\n- x86_64\n```shell\n# Get file and make it executable\ncurl -L https://eldada.jfrog.io/artifactory/tools/fio/3.36/fio-linux-x86_64 -o ./fio\nchmod +x fio\n\n# Test it works\n./fio --version\n```\n\n- ARM\n```shell\n# Get file and make it executable\ncurl -L https://eldada.jfrog.io/artifactory/tools/fio/3.36/fio-linux-arm64 -o ./fio\nchmod +x fio\n\n# Test it works\n./fio --version\n```\n\n## Build of Install fio in a Kubernetes pod\n### Build fio from sources\nBuilding `fio` requires the same processor architecture of the server you'll be running the tests on.\u003c/br\u003e\nThis repository includes two pods templates that deploy to the current Kubernetes cluster and are assigned to a node with the desired architecture.\u003c/br\u003e\nThe pod comes up and\n1. Installs the needed tools\n2. Clones the official `fio` sources (https://github.com/axboe/fio)\n3. Compiles and builds `fio` (with `--build-static` so you have the dependencies built into the binary)\n\nOnce built, you can then copy the `fio` binary from the pod and take it anywhere. \n\n### Install fio\nIf you just want `fio` in the pod, you can just set the environment variable `BUILD_OR_INSTALL` in the yamls to `install` and deploy.\u003c/br\u003e\nThis will install `fio` with `apt`.\n\nDeploy the pods with the following commands.\u003cbr\u003e\nMake sure to set affinity and toleration rules as needed to make sure you get the right architecture binary built.\n```shell\nexport NAMESPACE=0-fio-build\n\nkubectl create namespace ${NAMESPACE}\n\nkubectl apply -n ${NAMESPACE} -f fio-x86_64.yaml\n\nkubectl apply -n ${NAMESPACE} -f fio-arm64.yaml\n```\n\nFollow the pods logs to see the progress and get the command to copy the binary to your computer if needed\n```shell\nkubectl logs -n ${NAMESPACE} pod-fio-x86-64 -f\n\nkubectl logs -n ${NAMESPACE} pod-fio-arm64 -f\n```\n\n## Run the IO tests in the pods\nYou can run `fio` directly in the pods and get the Kubernetes node's local disk tested using the pods that were just deployed.\u003c/br\u003e\nYou can test an externally mounted volume be setting the `--filename` parameter to the mounted volume in the pod.\n\nSee the [official fio website](https://fio.readthedocs.io/en/latest/fio_doc.html) for all the available options and parameters.\n\nThe examples below runs in the running `x86_64` pod. It uses json output, 10 concurrent jobs, 1mb block size, and saves the output in a local file for analysis later\n```shell\nmkdir -p out\n\n# Sequential reads for 30 seconds\nkubectl exec -n ${NAMESPACE} pod-fio-x86-64 -- fio --name=test --output-format=json --filename=/tmp/test.fio --size=2g --runtime=30s --ioengine=libaio --rw=read --direct=1 --numjobs=10 --blocksize=1m \u003e out/read.json\n\n# Sequential writes for 30 seconds\nkubectl exec -n ${NAMESPACE} pod-fio-x86-64 -- fio --name=test --output-format=json --filename=/tmp/test.fio --size=2g --runtime=30s --ioengine=libaio --rw=write --direct=1 --numjobs=10 --blocksize=1m \u003e out/write.json\n\n# Random read/write for 30 seconds\nkubectl exec -n ${NAMESPACE} pod-fio-x86-64 -- fio --name=test --output-format=json --filename=/tmp/test.fio --size=2g --runtime=30s --ioengine=libaio --rw=randrw --direct=1 --numjobs=10 --blocksize=1m \u003e out/randrw.json\n```\n\nExtract the MBPS (MegaBytes per seconds) from the output json (using `jq`)\n```shell\n# Reads average MBPS from the 10 jobs results\njq '[.jobs[] | .read.io_bytes] | add/1024/1024' out/read.json\n\n# Writes average MBPS from the 10 jobs results\njq '[.jobs[] | .write.io_bytes] | add/1024/1024' out/write.json\n\n# Reads average MBPS from the 10 jobs results out of the RW tests\njq '[.jobs[] | .read.io_bytes] | add/1024/1024' out/randrw.json\n\n# Writes average MBPS from the 10 jobs results out of the RW tests\njq '[.jobs[] | .write.io_bytes] | add/1024/1024' out/randrw.json\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feldada%2Ffio-in-kubernetes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feldada%2Ffio-in-kubernetes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feldada%2Ffio-in-kubernetes/lists"}