Skip to content

Commit 2a17bf7

Browse files
andyz422copybara-github
authored andcommitted
For fio_netperf benchmark, remove disk mount_point as FIO always runs against raw device.
PiperOrigin-RevId: 830623231
1 parent 8361372 commit 2a17bf7

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

perfkitbenchmarker/linux_benchmarks/combo_benchmarks/fio_netperf_benchmark.py

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@
2929
from perfkitbenchmarker import errors
3030
from perfkitbenchmarker import sample
3131
from perfkitbenchmarker.linux_benchmarks import netperf_benchmark
32+
from perfkitbenchmarker.linux_benchmarks.fio import constants
3233
from perfkitbenchmarker.linux_benchmarks.fio import fio_benchmark
33-
from perfkitbenchmarker.linux_packages import fio
34+
from perfkitbenchmarker.linux_benchmarks.fio import utils
3435

3536

3637
BENCHMARK_NAME = 'fio_netperf'
@@ -50,7 +51,7 @@
5051
netperf_benchmarks: TCP_STREAM
5152
netperf_num_streams: 200
5253
fio_runtime: 300
53-
fio_generate_scenarios: seq_1M_read_100%
54+
fio_generate_scenarios: seq_1M_readwrite_100%_rwmixread-50
5455
fio_num_jobs: 8
5556
fio_io_depths: 64
5657
fio_target_mode: against_device_without_fill
@@ -73,11 +74,11 @@ def GetConfig(user_config: Dict[Any, Any]) -> Dict[Any, Any]:
7374
merged configs
7475
"""
7576
config = configs.LoadConfig(BENCHMARK_CONFIG, user_config, BENCHMARK_NAME)
76-
if FLAGS.fio_target_mode != fio_benchmark.AGAINST_FILE_WITHOUT_FILL_MODE:
77-
for vm_group in config['vm_groups'].keys():
78-
disk_spec = config['vm_groups'][vm_group]['disk_spec']
79-
for cloud in disk_spec:
80-
disk_spec[cloud]['mount_point'] = None
77+
# Running against raw device
78+
for vm_group in config['vm_groups'].keys():
79+
disk_spec = config['vm_groups'][vm_group]['disk_spec']
80+
for cloud in disk_spec:
81+
disk_spec[cloud]['mount_point'] = None
8182
return config
8283

8384

@@ -125,11 +126,9 @@ def Prepare(benchmark_spec: bm_spec.BenchmarkSpec) -> None:
125126
2,
126127
)
127128

128-
# Prepare FIO benchmark on receiving VM.
129-
exec_path = fio.GetFioExec()
130-
background_tasks.RunThreaded(
131-
lambda vm: fio_benchmark.PrepareWithExec(vm, exec_path), [vms[1]]
132-
)
129+
# Prepare FIO benchmark on receiving VM (from fio_raw_device_benchmark).
130+
vms[1].Install('fio')
131+
utils.PrefillIfEnabled(vms[1], constants.FIO_PATH)
133132

134133

135134
def Run(benchmark_spec: bm_spec.BenchmarkSpec) -> List[sample.Sample]:
@@ -220,5 +219,4 @@ def Cleanup(benchmark_spec: bm_spec.BenchmarkSpec) -> None:
220219
benchmark_spec: The benchmark specification.
221220
"""
222221
vms = benchmark_spec.vms[:2]
223-
background_tasks.RunThreaded(fio_benchmark.CleanupVM, [vms[1]])
224222
netperf_benchmark.CleanupClientServerVMs(vms[0], vms[1])

0 commit comments

Comments
 (0)