{"id":43567831,"url":"https://github.com/haydenjames/vps-disk-latency-bench","last_synced_at":"2026-02-03T22:00:18.044Z","repository":{"id":336137561,"uuid":"1148416277","full_name":"haydenjames/VPS-Disk-Latency-Bench","owner":"haydenjames","description":"Latency-focused disk benchmarks for Linux VPS environments.","archived":false,"fork":false,"pushed_at":"2026-02-03T00:06:13.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-03T13:30:10.581Z","etag":null,"topics":["benchmark","fio","latency-test","linux","sysadmin-scripts","vps"],"latest_commit_sha":null,"homepage":"https://linuxblog.io/vps-nvme-iops-vs-latency/","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/haydenjames.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-03T00:02:18.000Z","updated_at":"2026-02-03T01:59:26.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/haydenjames/VPS-Disk-Latency-Bench","commit_stats":null,"previous_names":["haydenjames/vps-disk-latency-bench"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/haydenjames/VPS-Disk-Latency-Bench","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haydenjames%2FVPS-Disk-Latency-Bench","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haydenjames%2FVPS-Disk-Latency-Bench/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haydenjames%2FVPS-Disk-Latency-Bench/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haydenjames%2FVPS-Disk-Latency-Bench/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/haydenjames","download_url":"https://codeload.github.com/haydenjames/VPS-Disk-Latency-Bench/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haydenjames%2FVPS-Disk-Latency-Bench/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29058965,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-03T20:13:53.544Z","status":"ssl_error","status_checked_at":"2026-02-03T20:13:40.507Z","response_time":96,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["benchmark","fio","latency-test","linux","sysadmin-scripts","vps"],"created_at":"2026-02-03T22:00:14.162Z","updated_at":"2026-02-03T22:00:18.008Z","avatar_url":"https://github.com/haydenjames.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# VPS Disk Latency Bench (fio)\n\nLatency-focused disk benchmarks for VPS environments.\n\nThis script runs small-block mixed random I/O at low queue depths and light concurrency, then prints a **formatted results table** with color-coded latency assessments.\n\n![VPS Disk Latency Bench Screenshot](https://raw.githubusercontent.com/haydenjames/VPS-Disk-Latency-Bench/refs/heads/main/screenshot.png)\n\n## Why latency, not IOPS?\n\nMost VPS workloads (web servers, databases, applications) operate at queue depth 1-2 with single-threaded I/O. High IOPS numbers from synthetic benchmarks at qd32+ don't reflect real-world performance. \n\n**This script tests what actually matters: p99.9 latency at low queue depth.**\n\nRead more: [VPS IOPS vs. Latency: Why NVMe Benchmarks Lie](https://linuxblog.io/disk-io-vs-latency-why-nvme-benchmarks-lie/)\n\n## Features\n\n- **Formatted table output** with aligned columns\n- **Color-coded p99.9 latency** (green/yellow/red thresholds)\n- **Key metrics summary** highlighting the most important qd1 results\n- **Pass/fail assessment** against 0.3ms NVMe threshold\n- **Progress indicator** during test execution\n- **JSON + TXT output** for both human reading and scripting\n\n## Requirements\n\nRequired:\n- `fio`\n\nStandard tools (present on most Linux systems):\n- `dd`, `awk`, `sed`, `date`, `hostname`\n\nOptional:\n- `bc` (used for floating-point comparisons; falls back to awk)\n- `tput` (for colorized output, if supported)\n- `jq` (only needed if you want to manually inspect the raw JSON output)\n\n## Quick Start\n\n```bash\n# Download\ncurl -O https://raw.githubusercontent.com/haydenjames/VPS-Disk-Latency-Bench/main/bench-io.sh\nchmod +x bench-io.sh\n\n# Run with defaults (2GB file, 30s per test)\n./bench-io.sh\n\n# Quick test (smaller file, shorter runtime)\nFILE_SIZE_GB=1 RUNTIME_SEC=10 ./bench-io.sh\n```\n\n## Sample Output\n\n```\n╔═══════════════════════════════════════════════════════════════════════════╗\n║             VPS Disk Latency Benchmark - Latency-Focused Testing          ║\n╚═══════════════════════════════════════════════════════════════════════════╝\n\nTest Name                        │    Read IOPS   Avg (ms)      p99.9 │   Write IOPS   Avg (ms)      p99.9\n─────────────────────────────────┼─────────────────────────────────────┼─────────────────────────────────────\nrandrw_70read_4k_qd1_jobs1       │        9,013      0.089      0.157 │        3,882      0.036      0.089\nrandrw_70read_4k_qd1_jobs2       │       17,238      0.091      0.214 │        7,397      0.041      0.098\n...\n\n═══════════════════════════════════════════════════════════════════════════════\n                              KEY METRICS (qd1_jobs1)\n═══════════════════════════════════════════════════════════════════════════════\n\n  4K Random Read/Write (70/30) at Queue Depth 1:\n\n    Read  p99.9 Latency:  0.157 ms  ✓ Excellent (NVMe-class)\n    Write p99.9 Latency:  0.089 ms  ✓ Excellent (NVMe-class)\n\n  Latency Thresholds:\n    \u003c 0.3ms  = Excellent (true NVMe-class performance)\n    \u003c 0.5ms  = Acceptable\n    \u003e= 0.5ms = Poor (likely throttled, shared, or not true NVMe)\n```\n\n## Configuration\n\nOverride defaults via environment variables:\n\n| Variable | Default | Description |\n|----------|---------|-------------|\n| `FILE_DIR` | `/var/tmp` | Directory for test file |\n| `FILE_SIZE_GB` | `2` | Test file size in GiB |\n| `RUNTIME_SEC` | `30` | Runtime per test in seconds |\n| `WARMUP_SEC` | `5` | Warmup time before each test |\n| `IODEPTHS` | `1 2 4` | Queue depths to test |\n| `BS_LIST` | `4k 8k` | Block sizes to test |\n| `MIX_LIST` | `70 50` | Read percentages (70 = 70% read, 30% write) |\n| `JOBS_LIST` | `1 2` | Number of parallel jobs |\n| `ENGINE` | `libaio` | fio I/O engine |\n| `OUTPUT_DIR` | `./bench_out` | Output directory |\n\n### Examples\n\n```bash\n# Minimal test (fastest)\nFILE_SIZE_GB=1 RUNTIME_SEC=5 IODEPTHS=\"1\" BS_LIST=\"4k\" MIX_LIST=\"70\" JOBS_LIST=\"1\" ./bench-io.sh\n\n# Full test with larger file\nFILE_SIZE_GB=4 RUNTIME_SEC=60 ./bench-io.sh\n\n# Custom output directory\nOUTPUT_DIR=/tmp/benchmarks ./bench-io.sh\n```\n\n## Output Files\n\nThe script creates two files in `./bench_out/` (or `$OUTPUT_DIR`):\n\n| File | Description |\n|------|-------------|\n| `fio-\u003chostname\u003e-\u003ctimestamp\u003e.txt` | Formatted summary with tables, key metrics, and raw data |\n| `fio-\u003chostname\u003e-\u003ctimestamp\u003e.json` | Raw fio JSON output for programmatic analysis |\n\n## What to Look For\n\nFocus on **p99.9 latency** in the `4k_qd1_jobs1` tests:\n\n| p99.9 Latency | Assessment |\n|---------------|------------|\n| \u003c 0.3ms | ✅ **Excellent** - True NVMe-class performance |\n| \u003c 0.5ms | ⚠️ **Acceptable** - Reasonable for most workloads |\n| ≥ 0.5ms | ❌ **Poor** - Likely throttled, noisy neighbors, or not true NVMe |\n\n**Warning signs:**\n- IOPS that flatline at round numbers (e.g., 20,000) suggest rate limiting\n- High IOPS with high latency indicates oversubscribed storage\n- Erratic latency across tests suggests noisy neighbors\n\n## Changelog\n\n### v2.0.0 (2026-02-03)\n- **New:** Formatted table output with Unicode box drawing\n- **New:** Color-coded p99.9 latency (green/yellow/red)\n- **New:** Key metrics summary section\n- **New:** Pass/fail assessment against thresholds\n- **New:** Progress indicator during tests\n- **New:** Improved TXT output with multiple sections\n- **Fixed:** Compatibility with various fio versions\n- **Fixed:** Robust JSON parsing\n\n### v1.0.0\n- Initial release\n\n## License\n\nMIT\n\n## Author\n\n[Hayden James](https://linuxblog.io) - Linux systems analyst.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaydenjames%2Fvps-disk-latency-bench","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhaydenjames%2Fvps-disk-latency-bench","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaydenjames%2Fvps-disk-latency-bench/lists"}