test: benchmark memory optimizations - #324
Draft
l0wl3vel wants to merge 23 commits into
Draft
Conversation
Signed-off-by: Benjamin Ritter <benjamin.ritter@x-cellent.com>
Signed-off-by: Benjamin Ritter <benjamin.ritter@x-cellent.com>
includes sonic-net/sonic-platform-vpp#212 and sonic-net/sonic-platform-vpp#220 for troubleshooting reasons Signed-off-by: Benjamin Ritter <benjamin.ritter@x-cellent.com>
Removed hacks, that just about worked in sonic-vs but broke in sonic-vpp - sonic-vpp requires first time init to generate VPP config files from hwsku lanemap and port config. If skipped the syncd container, in which vpp runs, will crash immediately - /etc/sonic/sonic-environment is generated on first boot from /usr/share/sonic/device/x86_64-kvm_x86_64-r0/default_sku, so writing it serves no purpose as we reenabled firstboot - switch to telnetlib3, due to telnetlib being deprecated Signed-off-by: Benjamin Ritter <benjamin.ritter@x-cellent.com>
Signed-off-by: Benjamin Ritter <benjamin.ritter@x-cellent.com>
Signed-off-by: Benjamin Ritter <benjamin.ritter@x-cellent.com>
Signed-off-by: Benjamin Ritter <benjamin.ritter@x-cellent.com>
Signed-off-by: Benjamin Ritter <benjamin.ritter@x-cellent.com>
- Split pipelines to build sonic_vs and sonic_vpp images - Rename sonic flavor to sonic_vs - Add sonic-vpp as sonic_vpp flavor - Run integration tests for sonic_vpp Signed-off-by: Benjamin Ritter <benjamin.ritter@x-cellent.com>
Signed-off-by: Benjamin Ritter <benjamin.ritter@x-cellent.com>
fixes sonic_vs with older (202505) image Signed-off-by: Benjamin Ritter <benjamin.ritter@x-cellent.com>
Signed-off-by: Benjamin Ritter <benjamin.ritter@x-cellent.com>
Signed-off-by: Benjamin Ritter <benjamin.ritter@x-cellent.com>
Signed-off-by: Benjamin Ritter <benjamin.ritter@x-cellent.com>
Signed-off-by: Benjamin Ritter <benjamin.ritter@x-cellent.com>
does nothing anymore Signed-off-by: Benjamin Ritter <benjamin.ritter@x-cellent.com>
Signed-off-by: Benjamin Ritter <benjamin.ritter@x-cellent.com>
it is configured using the sonic startup config, we run lldp.service, so we do not need it anymore Signed-off-by: Benjamin Ritter <benjamin.ritter@x-cellent.com>
Signed-off-by: Benjamin Ritter <benjamin.ritter@x-cellent.com>
This reverts commit c9e1837. Management VRF requires some more work around bootstrapping the switch
Every leaf and machine is a QEMU VM, and QEMU RSS behaves as a high-water
mark: the guest touches all of its RAM through the page cache eventually,
so a guest started with -m 4096 stays resident at ~4 GiB no matter how
little it actually needs. virtio-balloon with free page reporting barely
helps because the page cache keeps almost nothing on the free lists.
Add three opt-in knobs, all defaulting to the previous behaviour:
MINI_LAB_LEAF_MEMORY / MINI_LAB_MACHINE_MEMORY guest RAM, substituted
into the topologies. All three launchers read QEMU_MEMORY (SONiC
launch.py, machine launch.py and vrnetlab for the dell flavors).
MINI_LAB_KSM host kernel samepage merging, dedupes the identical
guest RAM of leaf01/leaf02 and of the machine VMs
MINI_LAB_THP transparent hugepage policy
KSM and THP are host global and are applied/reverted by
scripts/memory-tuning.sh, which records the pristine values so the host
is left as it was found.
scripts/memory-profile.sh bundles the knobs into one-factor-at-a-time
profiles (baseline, low-memory, ksm, thp-madvise, all) so each knob can
be measured on its own. baseline pins KSM and THP explicitly instead of
leaving them untouched, so a comparison is not skewed by the host state.
scripts/memory-trace.py samples host and per-container memory plus QEMU
RSS into a CSV; scripts/memory-report.py renders per-run summaries and a
cross-run comparison. The integration test starts the tracer and stops it
in an EXIT trap, so a profile that is too tight for a flavor still
produces data instead of nothing.
The integration workflow builds its matrix from flavors x profiles. Pull
requests and pushes run baseline only so regular CI cost is unchanged;
workflow_dispatch defaults to the full matrix. Runs are serialised
because the host level numbers would otherwise be contaminated by
concurrent labs. Each run uploads its trace, and a final job merges them
into a per-flavor comparison table.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
l0wl3vel
force-pushed
the
feat/memory-consumption-test
branch
from
July 31, 2026 15:12
25011bc to
dec52d9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
TODO
Used AI-Tools ✨