Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,12 @@ def rootfs_fxt(request, record_property):

# Fixtures for all guest kernels, and specific versions
guest_kernel = pytest.fixture(guest_kernel_fxt, params=kernel_params("vmlinux-*"))
guest_kernel_acpi = pytest.fixture(
guest_kernel_fxt,
params=filter(
lambda kernel: "no-acpi" not in kernel.id, kernel_params("vmlinux-*")
),
)
guest_kernel_linux_4_14 = pytest.fixture(
guest_kernel_fxt, params=kernel_params("vmlinux-4.14*")
)
Expand Down
8 changes: 4 additions & 4 deletions tests/integration_tests/performance/test_block_ab.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def process_fio_logs(vm, fio_mode, logs_dir, metrics):
@pytest.mark.parametrize("fio_block_size", [4096], ids=["bs4096"])
def test_block_performance(
microvm_factory,
guest_kernel,
guest_kernel_acpi,
rootfs,
vcpus,
fio_mode,
Expand All @@ -153,7 +153,7 @@ def test_block_performance(
"""
Execute block device emulation benchmarking scenarios.
"""
vm = microvm_factory.build(guest_kernel, rootfs, monitor_memory=False)
vm = microvm_factory.build(guest_kernel_acpi, rootfs, monitor_memory=False)
vm.spawn(log_level="Info", emit_metrics=True)
vm.basic_config(vcpu_count=vcpus, mem_size_mib=GUEST_MEM_MIB)
vm.add_net_iface()
Expand Down Expand Up @@ -191,7 +191,7 @@ def test_block_performance(
@pytest.mark.parametrize("fio_block_size", [4096], ids=["bs4096"])
def test_block_vhost_user_performance(
microvm_factory,
guest_kernel,
guest_kernel_acpi,
rootfs,
vcpus,
fio_mode,
Expand All @@ -202,7 +202,7 @@ def test_block_vhost_user_performance(
Execute block device emulation benchmarking scenarios.
"""

vm = microvm_factory.build(guest_kernel, rootfs, monitor_memory=False)
vm = microvm_factory.build(guest_kernel_acpi, rootfs, monitor_memory=False)
vm.spawn(log_level="Info", emit_metrics=True)
vm.basic_config(vcpu_count=vcpus, mem_size_mib=GUEST_MEM_MIB)
vm.add_net_iface()
Expand Down
6 changes: 3 additions & 3 deletions tests/integration_tests/performance/test_boottime.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,22 +173,22 @@ def find_events(log_data):
[(1, 128), (1, 1024), (2, 2048), (4, 4096)],
)
def test_boottime(
microvm_factory, guest_kernel, rootfs_rw, vcpu_count, mem_size_mib, metrics
microvm_factory, guest_kernel_acpi, rootfs_rw, vcpu_count, mem_size_mib, metrics
):
"""Test boot time with different guest configurations"""

metrics.set_dimensions(
{
**DIMENSIONS,
"performance_test": "test_boottime",
"guest_kernel": guest_kernel.name,
"guest_kernel_acpi": guest_kernel_acpi.name,
"vcpus": str(vcpu_count),
"mem_size_mib": str(mem_size_mib),
}
)

for _ in range(10):
vm = microvm_factory.build(guest_kernel, rootfs_rw)
vm = microvm_factory.build(guest_kernel_acpi, rootfs_rw)
vm.jailer.extra_args.update({"boot-timer": None})
vm.spawn()
vm.basic_config(
Expand Down
4 changes: 2 additions & 2 deletions tests/integration_tests/performance/test_memory_overhead.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@
[(1, 128), (1, 1024), (2, 2048), (4, 4096)],
)
def test_memory_overhead(
microvm_factory, guest_kernel, rootfs, vcpu_count, mem_size_mib, metrics
microvm_factory, guest_kernel_acpi, rootfs, vcpu_count, mem_size_mib, metrics
):
"""Track Firecracker memory overhead.

We take a single measurement as it only varies by a few KiB each run.
"""

for _ in range(5):
microvm = microvm_factory.build(guest_kernel, rootfs)
microvm = microvm_factory.build(guest_kernel_acpi, rootfs)
microvm.spawn(emit_metrics=True)
microvm.basic_config(vcpu_count=vcpu_count, mem_size_mib=mem_size_mib)
microvm.add_net_iface()
Expand Down
4 changes: 2 additions & 2 deletions tests/integration_tests/performance/test_network_ab.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ def consume_ping_output(ping_putput, request_per_round):


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

guest_mem_mib = 1024
guest_vcpus = request.param

vm = microvm_factory.build(guest_kernel, rootfs, monitor_memory=False)
vm = microvm_factory.build(guest_kernel_acpi, rootfs, monitor_memory=False)
vm.spawn(log_level="Info", emit_metrics=True)
vm.basic_config(vcpu_count=guest_vcpus, mem_size_mib=guest_mem_mib)
vm.add_net_iface()
Expand Down
4 changes: 2 additions & 2 deletions tests/integration_tests/performance/test_snapshot_ab.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ def id(self):
def configure_vm(
self,
microvm_factory,
guest_kernel,
guest_kernel_acpi,
rootfs,
) -> Microvm:
"""Creates the initial snapshot that will be loaded repeatedly to sample latencies"""
vm = microvm_factory.build(
guest_kernel,
guest_kernel_acpi,
rootfs,
monitor_memory=False,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

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

vm = microvm_factory.build(guest_kernel, rootfs_ubuntu_22, monitor_memory=False)
vm = microvm_factory.build(
guest_kernel_acpi, rootfs_ubuntu_22, monitor_memory=False
)
vm.spawn(log_level="Info")
vm.basic_config(vcpu_count=vcpu_count)

Expand Down
4 changes: 2 additions & 2 deletions tests/integration_tests/performance/test_vsock_ab.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def guest_command(self, port_offset):
@pytest.mark.parametrize("payload_length", ["64K", "1024K"], ids=["p64K", "p1024K"])
@pytest.mark.parametrize("mode", ["g2h", "h2g", "bd"])
def test_vsock_throughput(
microvm_factory, guest_kernel, rootfs, vcpus, payload_length, mode, metrics
microvm_factory, guest_kernel_acpi, rootfs, vcpus, payload_length, mode, metrics
):
"""
Test vsock throughput for multiple vm configurations.
Expand All @@ -85,7 +85,7 @@ def test_vsock_throughput(
pytest.skip("bidrectional test only done with at least 2 vcpus")

mem_size_mib = 1024
vm = microvm_factory.build(guest_kernel, rootfs, monitor_memory=False)
vm = microvm_factory.build(guest_kernel_acpi, rootfs, monitor_memory=False)
vm.spawn(log_level="Info", emit_metrics=True)
vm.basic_config(vcpu_count=vcpus, mem_size_mib=mem_size_mib)
vm.add_net_iface()
Expand Down