Skip to content

Commit

Permalink
ci: reduce storage of snapshots in cross-restore test
Browse files Browse the repository at this point in the history
This is so we use less IO overall sending snapshot to/from S3.

- Punch holes in the memory snapshots
- Decrease guest memory from 1GB to 256MB as it's not important to the
  test.

This decreases around 10x:

Before: 27GB * 22 runs ~ 594GB
After: 2.7GB* 22 runs ~ 59.4GB

Signed-off-by: Pablo Barbáchano <[email protected]>
  • Loading branch information
pb8o committed Oct 18, 2024
1 parent 57e3b92 commit b392ac5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions .buildkite/pipeline_cross.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@
instances_aarch64 = ["m7g.metal"]
commands = [
"./tools/devtool -y test --no-build -- -m nonci -n4 integration_tests/functional/test_snapshot_phase1.py",
"mkdir -pv snapshots/{instance}_{kv}",
"mv -v test_results/test_snapshot_phase1/* snapshots/{instance}_{kv}",
# punch holes in mem snapshot tiles and tar them so they are preserved in S3
"find test_results/test_snapshot_phase1 -type f -name mem |xargs -t -n1 fallocate -d",
"mv -v test_results/test_snapshot_phase1 snapshot_artifacts",
"mkdir -pv snapshots",
"tar cSvf snapshots/{instance}_{kv}.tar snapshot_artifacts",
]
pipeline.build_group(
"📸 create snapshots",
Expand Down Expand Up @@ -79,8 +82,8 @@
k_val = pytest_keyword_for_instance.get(dst_instance, "")
step = {
"command": [
f"buildkite-agent artifact download snapshots/{src_instance}_{src_kv}/* .",
f"mv -v snapshots/{src_instance}_{src_kv} snapshot_artifacts",
f"buildkite-agent artifact download snapshots/{src_instance}_{src_kv}.tar .",
f"tar xSvf snapshots/{src_instance}_{src_kv}.tar",
*pipeline.devtool_test(
pytest_opts=f"-m nonci -n4 {k_val} integration_tests/functional/test_snapshot_restore_cross_kernel.py",
),
Expand Down
2 changes: 1 addition & 1 deletion tests/integration_tests/functional/test_snapshot_phase1.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def test_snapshot_phase1(
cpu_template_name = f"custom_{cpu_template_any['name']}"
vm.basic_config(
vcpu_count=2,
mem_size_mib=1024,
mem_size_mib=256,
cpu_template=static_cpu_template,
)

Expand Down

0 comments on commit b392ac5

Please sign in to comment.