mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Rearrange fio tests cases so regexs aren't ridiculous.
Rearrange benchmark function so calls in buildkite pipelines are correct without 100 charecter regexes. PiperOrigin-RevId: 558213872
This commit is contained in:
committed by
gVisor bot
parent
731ab290a0
commit
9ee64caa00
@@ -562,18 +562,18 @@ steps:
|
||||
# but for tmpfs mounts, the size can grow to more memory than the machine
|
||||
# has available. Fix the runs to 1GB written/read for the benchmark.
|
||||
- <<: *benchmarks
|
||||
label: ":floppy_disk: FIO benchmarks (read/write :nest_with_eggs: buffered)"
|
||||
command: make -i benchmark-platforms BENCHMARKS_SUITE=fio BENCHMARKS_TARGETS=test/benchmarks/fs:fio_test BENCHMARKS_FILTER='Fio/operation\.[rw][er]*/blockSize*/directIO\.false' BENCHMARKS_OPTIONS=--test.benchtime=1000x
|
||||
label: ":floppy_disk: FIO benchmarks (write :nest_with_eggs:)"
|
||||
command: make -i benchmark-platforms BENCHMARKS_SUITE=fio BENCHMARKS_TARGETS=test/benchmarks/fs:fio_test BENCHMARKS_FILTER='BenchmarkFioWrite' BENCHMARKS_OPTIONS=--test.benchtime=1000x
|
||||
# For rand(read|write) fio benchmarks, running 15s does not overwhelm the system for tmpfs mounts.
|
||||
- <<: *benchmarks
|
||||
label: ":cd: FIO benchmarks (randread/randwrite :nest_with_eggs: buffered)"
|
||||
command: make -i benchmark-platforms BENCHMARKS_SUITE=fio BENCHMARKS_TARGETS=test/benchmarks/fs:fio_test BENCHMARKS_FILTER='Fio/operation\.rand*/blockSize*/directIO\.false' BENCHMARKS_OPTIONS=--test.benchtime=1000x
|
||||
label: ":cd: FIO benchmarks (read :nest_with_eggs:)"
|
||||
command: make -i benchmark-platforms BENCHMARKS_SUITE=fio BENCHMARKS_TARGETS=test/benchmarks/fs:fio_test BENCHMARKS_FILTER='BenchmarkFioRead' BENCHMARKS_OPTIONS=--test.benchtime=1000x
|
||||
- <<: *benchmarks
|
||||
label: ":floppy_disk: FIO benchmarks (read/write :empty_nest: O_DIRECT)"
|
||||
command: make -i benchmark-platforms BENCHMARKS_SUITE=fio BENCHMARKS_TARGETS=test/benchmarks/fs:fio_test BENCHMARKS_FILTER='Fio/operation\.[rw][er]*/blockSize*/directIO\.true' BENCHMARKS_OPTIONS=--test.benchtime=1000x
|
||||
label: ":floppy_disk: FIO benchmarks (randwrte :empty_nest:)"
|
||||
command: make -i benchmark-platforms BENCHMARKS_SUITE=fio BENCHMARKS_TARGETS=test/benchmarks/fs:fio_test BENCHMARKS_FILTER='BenchmarkFioRandWrite' BENCHMARKS_OPTIONS=--test.benchtime=1000x
|
||||
- <<: *benchmarks
|
||||
label: ":cd: FIO benchmarks (randread/randwrite :empty_nest: O_DIRECT)"
|
||||
command: make -i benchmark-platforms BENCHMARKS_SUITE=fio BENCHMARKS_TARGETS=test/benchmarks/fs:fio_test BENCHMARKS_FILTER='Fio/operation\.rand*/blockSize*/directIO\.true' BENCHMARKS_OPTIONS=--test.benchtime=1000x
|
||||
label: ":cd: FIO benchmarks (randread :empty_nest:)"
|
||||
command: make -i benchmark-platforms BENCHMARKS_SUITE=fio BENCHMARKS_TARGETS=test/benchmarks/fs:fio_test BENCHMARKS_FILTER='BenchmarkFioRandRead' BENCHMARKS_OPTIONS=--test.benchtime=1000x
|
||||
- <<: *benchmarks
|
||||
label: ":cd: Ruby CI/CD benchmarks"
|
||||
command: make -i benchmark-platforms BENCHMARKS_SUITE=fio BENCHMARKS_TARGETS=test/benchmarks/fs:rubydev_test BENCHMARKS_OPTIONS=-test.benchtime=1ns
|
||||
|
||||
@@ -27,10 +27,12 @@ import (
|
||||
"gvisor.dev/gvisor/test/benchmarks/tools"
|
||||
)
|
||||
|
||||
// BenchmarkFio runs fio on the runtime under test. There are 4 basic test
|
||||
// Fio benchmarks run fio on the runtime under test. There are 4 basic test
|
||||
// cases each run on a tmpfs mount and a bind mount. Fio requires root so that
|
||||
// caches can be dropped.
|
||||
func BenchmarkFio(b *testing.B) {
|
||||
|
||||
// BenchmarkFioWrite runs write operation benchmark cases.
|
||||
func BenchmarkFioWrite(b *testing.B) {
|
||||
testCases := []tools.Fio{
|
||||
{
|
||||
Test: "write",
|
||||
@@ -50,6 +52,37 @@ func BenchmarkFio(b *testing.B) {
|
||||
BlockSizeKB: 1024,
|
||||
IODepth: 4,
|
||||
},
|
||||
{
|
||||
Test: "write",
|
||||
IOEngine: tools.EngineLibAIO,
|
||||
Jobs: 8,
|
||||
BlockSizeKB: 4,
|
||||
IODepth: 4,
|
||||
Direct: true,
|
||||
},
|
||||
{
|
||||
Test: "write",
|
||||
IOEngine: tools.EngineLibAIO,
|
||||
Jobs: 8,
|
||||
BlockSizeKB: 64,
|
||||
IODepth: 4,
|
||||
Direct: true,
|
||||
},
|
||||
{
|
||||
Test: "write",
|
||||
IOEngine: tools.EngineLibAIO,
|
||||
Jobs: 8,
|
||||
BlockSizeKB: 1024,
|
||||
IODepth: 4,
|
||||
Direct: true,
|
||||
},
|
||||
}
|
||||
doFioBenchmark(b, testCases)
|
||||
}
|
||||
|
||||
// BenchmarkFioRead runs read operation test cases.
|
||||
func BenchmarkFioRead(b *testing.B) {
|
||||
testCases := []tools.Fio{
|
||||
{
|
||||
Test: "read",
|
||||
IOEngine: tools.EngineLibAIO,
|
||||
@@ -68,74 +101,64 @@ func BenchmarkFio(b *testing.B) {
|
||||
BlockSizeKB: 1024,
|
||||
IODepth: 4,
|
||||
},
|
||||
{
|
||||
Test: "read",
|
||||
IOEngine: tools.EngineLibAIO,
|
||||
Jobs: 8,
|
||||
BlockSizeKB: 4,
|
||||
IODepth: 4,
|
||||
Direct: true,
|
||||
},
|
||||
{
|
||||
Test: "read",
|
||||
IOEngine: tools.EngineLibAIO,
|
||||
Jobs: 8,
|
||||
BlockSizeKB: 64,
|
||||
IODepth: 4,
|
||||
Direct: true,
|
||||
},
|
||||
{
|
||||
Test: "read",
|
||||
IOEngine: tools.EngineLibAIO,
|
||||
Jobs: 8,
|
||||
BlockSizeKB: 1024,
|
||||
IODepth: 4,
|
||||
Direct: true,
|
||||
},
|
||||
}
|
||||
doFioBenchmark(b, testCases)
|
||||
}
|
||||
|
||||
// BenchmarkFioRandWrite runs randwrite test cases.
|
||||
func BenchmarkFioRandWrite(b *testing.B) {
|
||||
testCases := []tools.Fio{
|
||||
{
|
||||
Test: "randwrite",
|
||||
IOEngine: tools.EngineLibAIO,
|
||||
BlockSizeKB: 4,
|
||||
IODepth: 4,
|
||||
},
|
||||
{
|
||||
Test: "randwrite",
|
||||
IOEngine: tools.EngineLibAIO,
|
||||
Jobs: 8,
|
||||
BlockSizeKB: 4,
|
||||
IODepth: 4,
|
||||
Direct: true,
|
||||
},
|
||||
}
|
||||
doFioBenchmark(b, testCases)
|
||||
}
|
||||
|
||||
// BenchmarkFioRandRead runs randread test cases.
|
||||
func BenchmarkFioRandRead(b *testing.B) {
|
||||
testCases := []tools.Fio{
|
||||
{
|
||||
Test: "randread",
|
||||
IOEngine: tools.EngineLibAIO,
|
||||
BlockSizeKB: 4,
|
||||
IODepth: 4,
|
||||
},
|
||||
{
|
||||
Test: "write",
|
||||
IOEngine: tools.EngineLibAIO,
|
||||
Jobs: 8,
|
||||
BlockSizeKB: 4,
|
||||
IODepth: 4,
|
||||
Direct: true,
|
||||
},
|
||||
{
|
||||
Test: "write",
|
||||
IOEngine: tools.EngineLibAIO,
|
||||
Jobs: 8,
|
||||
BlockSizeKB: 64,
|
||||
IODepth: 4,
|
||||
Direct: true,
|
||||
},
|
||||
{
|
||||
Test: "write",
|
||||
IOEngine: tools.EngineLibAIO,
|
||||
Jobs: 8,
|
||||
BlockSizeKB: 1024,
|
||||
IODepth: 4,
|
||||
Direct: true,
|
||||
},
|
||||
{
|
||||
Test: "read",
|
||||
IOEngine: tools.EngineLibAIO,
|
||||
Jobs: 8,
|
||||
BlockSizeKB: 4,
|
||||
IODepth: 4,
|
||||
Direct: true,
|
||||
},
|
||||
{
|
||||
Test: "read",
|
||||
IOEngine: tools.EngineLibAIO,
|
||||
Jobs: 8,
|
||||
BlockSizeKB: 64,
|
||||
IODepth: 4,
|
||||
Direct: true,
|
||||
},
|
||||
{
|
||||
Test: "read",
|
||||
IOEngine: tools.EngineLibAIO,
|
||||
Jobs: 8,
|
||||
BlockSizeKB: 1024,
|
||||
IODepth: 4,
|
||||
Direct: true,
|
||||
},
|
||||
{
|
||||
Test: "randwrite",
|
||||
IOEngine: tools.EngineLibAIO,
|
||||
Jobs: 8,
|
||||
BlockSizeKB: 4,
|
||||
IODepth: 4,
|
||||
Direct: true,
|
||||
},
|
||||
{
|
||||
Test: "randread",
|
||||
IOEngine: tools.EngineLibAIO,
|
||||
@@ -145,7 +168,10 @@ func BenchmarkFio(b *testing.B) {
|
||||
Direct: true,
|
||||
},
|
||||
}
|
||||
doFioBenchmark(b, testCases)
|
||||
}
|
||||
|
||||
func doFioBenchmark(b *testing.B, testCases []tools.Fio) {
|
||||
machine, err := harness.GetMachine()
|
||||
if err != nil {
|
||||
b.Fatalf("failed to get machine with: %v", err)
|
||||
|
||||
Reference in New Issue
Block a user