Skip to content

Commit 2360fcc

Browse files
committed
test: do not perf test with no-acpi kernels
Using guests without ACPI support is deprecated, but we need to functionally verify it until we can remove support in Firecracker 2.0. However, we definitely do not need to performance test this configuration. So don't, and speed up our perf tests by 25%. Signed-off-by: Patrick Roy <[email protected]>
1 parent a8746ff commit 2360fcc

File tree

8 files changed

+25
-17
lines changed

8 files changed

+25
-17
lines changed

tests/conftest.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,12 @@ def rootfs_fxt(request, record_property):
376376

377377
# Fixtures for all guest kernels, and specific versions
378378
guest_kernel = pytest.fixture(guest_kernel_fxt, params=kernel_params("vmlinux-*"))
379+
guest_kernel_acpi = pytest.fixture(
380+
guest_kernel_fxt,
381+
params=filter(
382+
lambda kernel: "no-acpi" not in kernel.id, kernel_params("vmlinux-*")
383+
),
384+
)
379385
guest_kernel_linux_4_14 = pytest.fixture(
380386
guest_kernel_fxt, params=kernel_params("vmlinux-4.14*")
381387
)

tests/integration_tests/performance/test_block_ab.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ def process_fio_logs(vm, fio_mode, logs_dir, metrics):
142142
@pytest.mark.parametrize("fio_block_size", [4096], ids=["bs4096"])
143143
def test_block_performance(
144144
microvm_factory,
145-
guest_kernel,
145+
guest_kernel_acpi,
146146
rootfs,
147147
vcpus,
148148
fio_mode,
@@ -153,7 +153,7 @@ def test_block_performance(
153153
"""
154154
Execute block device emulation benchmarking scenarios.
155155
"""
156-
vm = microvm_factory.build(guest_kernel, rootfs, monitor_memory=False)
156+
vm = microvm_factory.build(guest_kernel_acpi, rootfs, monitor_memory=False)
157157
vm.spawn(log_level="Info", emit_metrics=True)
158158
vm.basic_config(vcpu_count=vcpus, mem_size_mib=GUEST_MEM_MIB)
159159
vm.add_net_iface()
@@ -191,7 +191,7 @@ def test_block_performance(
191191
@pytest.mark.parametrize("fio_block_size", [4096], ids=["bs4096"])
192192
def test_block_vhost_user_performance(
193193
microvm_factory,
194-
guest_kernel,
194+
guest_kernel_acpi,
195195
rootfs,
196196
vcpus,
197197
fio_mode,
@@ -202,7 +202,7 @@ def test_block_vhost_user_performance(
202202
Execute block device emulation benchmarking scenarios.
203203
"""
204204

205-
vm = microvm_factory.build(guest_kernel, rootfs, monitor_memory=False)
205+
vm = microvm_factory.build(guest_kernel_acpi, rootfs, monitor_memory=False)
206206
vm.spawn(log_level="Info", emit_metrics=True)
207207
vm.basic_config(vcpu_count=vcpus, mem_size_mib=GUEST_MEM_MIB)
208208
vm.add_net_iface()

tests/integration_tests/performance/test_boottime.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,22 +173,22 @@ def find_events(log_data):
173173
[(1, 128), (1, 1024), (2, 2048), (4, 4096)],
174174
)
175175
def test_boottime(
176-
microvm_factory, guest_kernel, rootfs_rw, vcpu_count, mem_size_mib, metrics
176+
microvm_factory, guest_kernel_acpi, rootfs_rw, vcpu_count, mem_size_mib, metrics
177177
):
178178
"""Test boot time with different guest configurations"""
179179

180180
metrics.set_dimensions(
181181
{
182182
**DIMENSIONS,
183183
"performance_test": "test_boottime",
184-
"guest_kernel": guest_kernel.name,
184+
"guest_kernel_acpi": guest_kernel_acpi.name,
185185
"vcpus": str(vcpu_count),
186186
"mem_size_mib": str(mem_size_mib),
187187
}
188188
)
189189

190190
for _ in range(10):
191-
vm = microvm_factory.build(guest_kernel, rootfs_rw)
191+
vm = microvm_factory.build(guest_kernel_acpi, rootfs_rw)
192192
vm.jailer.extra_args.update({"boot-timer": None})
193193
vm.spawn()
194194
vm.basic_config(

tests/integration_tests/performance/test_memory_overhead.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@
2929
[(1, 128), (1, 1024), (2, 2048), (4, 4096)],
3030
)
3131
def test_memory_overhead(
32-
microvm_factory, guest_kernel, rootfs, vcpu_count, mem_size_mib, metrics
32+
microvm_factory, guest_kernel_acpi, rootfs, vcpu_count, mem_size_mib, metrics
3333
):
3434
"""Track Firecracker memory overhead.
3535
3636
We take a single measurement as it only varies by a few KiB each run.
3737
"""
3838

3939
for _ in range(5):
40-
microvm = microvm_factory.build(guest_kernel, rootfs)
40+
microvm = microvm_factory.build(guest_kernel_acpi, rootfs)
4141
microvm.spawn(emit_metrics=True)
4242
microvm.basic_config(vcpu_count=vcpu_count, mem_size_mib=mem_size_mib)
4343
microvm.add_net_iface()

tests/integration_tests/performance/test_network_ab.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@ def consume_ping_output(ping_putput, request_per_round):
3636

3737

3838
@pytest.fixture
39-
def network_microvm(request, microvm_factory, guest_kernel, rootfs):
39+
def network_microvm(request, microvm_factory, guest_kernel_acpi, rootfs):
4040
"""Creates a microvm with the networking setup used by the performance tests in this file.
4141
This fixture receives its vcpu count via indirect parameterization"""
4242

4343
guest_mem_mib = 1024
4444
guest_vcpus = request.param
4545

46-
vm = microvm_factory.build(guest_kernel, rootfs, monitor_memory=False)
46+
vm = microvm_factory.build(guest_kernel_acpi, rootfs, monitor_memory=False)
4747
vm.spawn(log_level="Info", emit_metrics=True)
4848
vm.basic_config(vcpu_count=guest_vcpus, mem_size_mib=guest_mem_mib)
4949
vm.add_net_iface()

tests/integration_tests/performance/test_snapshot_ab.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ def id(self):
4343
def configure_vm(
4444
self,
4545
microvm_factory,
46-
guest_kernel,
46+
guest_kernel_acpi,
4747
rootfs,
4848
) -> Microvm:
4949
"""Creates the initial snapshot that will be loaded repeatedly to sample latencies"""
5050
vm = microvm_factory.build(
51-
guest_kernel,
51+
guest_kernel_acpi,
5252
rootfs,
5353
monitor_memory=False,
5454
)

tests/integration_tests/performance/test_vhost_user_metrics.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
@pytest.mark.parametrize("vcpu_count", [1, 2], ids=["1vcpu", "2vcpu"])
1313
def test_vhost_user_block_metrics(
14-
microvm_factory, guest_kernel, rootfs_ubuntu_22, vcpu_count, metrics
14+
microvm_factory, guest_kernel_acpi, rootfs_ubuntu_22, vcpu_count, metrics
1515
):
1616
"""
1717
This test tries to boot a VM with vhost-user-block
@@ -28,7 +28,9 @@ def test_vhost_user_block_metrics(
2828
# low->high->low->high and so the numbers are not in monotonic sequence.
2929
new_sizes = [20, 10, 30] # MB
3030

31-
vm = microvm_factory.build(guest_kernel, rootfs_ubuntu_22, monitor_memory=False)
31+
vm = microvm_factory.build(
32+
guest_kernel_acpi, rootfs_ubuntu_22, monitor_memory=False
33+
)
3234
vm.spawn(log_level="Info")
3335
vm.basic_config(vcpu_count=vcpu_count)
3436

tests/integration_tests/performance/test_vsock_ab.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def guest_command(self, port_offset):
7373
@pytest.mark.parametrize("payload_length", ["64K", "1024K"], ids=["p64K", "p1024K"])
7474
@pytest.mark.parametrize("mode", ["g2h", "h2g", "bd"])
7575
def test_vsock_throughput(
76-
microvm_factory, guest_kernel, rootfs, vcpus, payload_length, mode, metrics
76+
microvm_factory, guest_kernel_acpi, rootfs, vcpus, payload_length, mode, metrics
7777
):
7878
"""
7979
Test vsock throughput for multiple vm configurations.
@@ -85,7 +85,7 @@ def test_vsock_throughput(
8585
pytest.skip("bidrectional test only done with at least 2 vcpus")
8686

8787
mem_size_mib = 1024
88-
vm = microvm_factory.build(guest_kernel, rootfs, monitor_memory=False)
88+
vm = microvm_factory.build(guest_kernel_acpi, rootfs, monitor_memory=False)
8989
vm.spawn(log_level="Info", emit_metrics=True)
9090
vm.basic_config(vcpu_count=vcpus, mem_size_mib=mem_size_mib)
9191
vm.add_net_iface()

0 commit comments

Comments
 (0)