Skip to content

Commit c20e42e

Browse files
committed
ci: reduce storage of snapshots in cross-restore test
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 512MB 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]>
1 parent d420de5 commit c20e42e

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

.buildkite/pipeline_cross.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,11 @@
2222
instances_aarch64 = ["m7g.metal"]
2323
commands = [
2424
"./tools/devtool -y test --no-build -- -m nonci -n4 integration_tests/functional/test_snapshot_phase1.py",
25-
"mkdir -pv snapshots/{instance}_{kv}",
26-
"mv -v test_results/test_snapshot_phase1/* snapshots/{instance}_{kv}",
25+
# punch holes in mem snapshot tiles and tar them so they are preserved in S3
26+
"find test_results/test_snapshot_phase1 -type f -name mem |xargs -P4 -t -n1 fallocate -d",
27+
"mv -v test_results/test_snapshot_phase1 snapshot_artifacts",
28+
"mkdir -pv snapshots",
29+
"tar cSvf snapshots/{instance}_{kv}.tar snapshot_artifacts",
2730
]
2831
pipeline.build_group(
2932
"📸 create snapshots",
@@ -79,8 +82,8 @@
7982
k_val = pytest_keyword_for_instance.get(dst_instance, "")
8083
step = {
8184
"command": [
82-
f"buildkite-agent artifact download snapshots/{src_instance}_{src_kv}/* .",
83-
f"mv -v snapshots/{src_instance}_{src_kv} snapshot_artifacts",
85+
f"buildkite-agent artifact download snapshots/{src_instance}_{src_kv}.tar .",
86+
f"tar xSvf snapshots/{src_instance}_{src_kv}.tar",
8487
*pipeline.devtool_test(
8588
pytest_opts=f"-m nonci -n4 {k_val} integration_tests/functional/test_snapshot_restore_cross_kernel.py",
8689
),

tests/integration_tests/functional/test_snapshot_phase1.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def test_snapshot_phase1(
4545
cpu_template_name = f"custom_{cpu_template_any['name']}"
4646
vm.basic_config(
4747
vcpu_count=2,
48-
mem_size_mib=1024,
48+
mem_size_mib=512,
4949
cpu_template=static_cpu_template,
5050
)
5151

0 commit comments

Comments
 (0)