[Workload]: migration-stress
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- kubernetes, linux
- Ambito
- devops, infrastructure
Direzione di ricerca
Inizia individuando il workload memory esistente e la relativa definizione, quindi esamina come vengono rappresentati i pacchetti cloud-init e i servizi systemd. Implementa il workload migration-stress con il comando stress-ng documentato e parametri configurabili. Verifica che una VM con il workload mostri un'attività di migrazione misurabile usando virtctl migrate e oc get vmim.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Workload Name
migration-stress
Workload Description
High memory-dirty-rate workload purpose-built to stress KubeVirt live migration. Continuously writes to memory pages at a configurable rate, forcing the live migration pre-copy phase to iterate more rounds before convergence. Produces a sustained, measurable memory dirtying pattern that makes the VM actively hard to migrate — the exact scenario that storage, networking, and monitoring partners need to validate their products against during migration events.
This is uniquely KubeVirt/CNV — no equivalent exists in generic VM workload tooling. Live migration is a first-class operation in OpenShift Virtualization (triggered by node drain, maintenance, rebalancing), and partner products must continue functioning correctly while VMs migrate. The existing memory workload uses stress-ng to allocate and hold memory at 80% pressure — it tests memory capacity, not memory mutation rate. migration-stress targets a completely different axis: how fast pages are being dirtied, which directly determines migration difficulty and duration.
Tooling and Packages
- Tool: stress-ng with the
vmstressor in aggressive write mode, or a custom mmap/write loop - RPM packages:
stress-ng - systemd service command:
stress-ng --vm 2 --vm-bytes 75% --vm-method write64 --vm-keep --aggressive--vm 2: two VM stressor workers--vm-bytes 75%: each worker maps 75% of available memory--vm-method write64: write 64-bit values (high dirty rate)--vm-keep: keep mappings (re-dirty same pages rather than remap)--aggressive: maximize throughput
- Alternative: custom C/shell program using
mmap(MAP_PRIVATE|MAP_ANONYMOUS)+ sequential write loop for maximum dirty rate control - Configurable parameters:
dirty-rate-target: target MB/s of memory dirtying (default: unbounded — as fast as possible)vm-workers: number of stressor workers (default: 2)vm-bytes-percent: percentage of memory to map per worker (default: 75)vm-method: stress-ng vm method —write64(fast),write1024(faster),zero(fastest) (default:write64)
VM Count Model
Single VM (like cpu, memory, disk)
Required Resources
- Persistent storage (DataVolume)
- Kubernetes Service (for inter-VM communication)
- Kubernetes Secret (for credentials or config)
- Additional CPU/memory beyond defaults
- GPU or special device passthrough
Memory should be sized larger than defaults (e.g., 4Gi+) to produce meaningful migration difficulty. With only 1Gi of memory, even a high dirty rate converges quickly. At 4-8Gi with aggressive dirtying, migration takes noticeably longer and may require multiple pre-copy rounds.
Cloud-Init Details
packages:
- stress-ng
write_files:
- path: /etc/systemd/system/virtwork-migration-stress.service
content: |
[Unit]
Description=Virtwork migration stress workload (high memory dirty rate)
After=multi-user.target
[Service]
Type=simple
ExecStart=/usr/bin/stress-ng \
--vm 2 \
--vm-bytes 75%% \
--vm-method write64 \
--vm-keep \
--aggressive \
--metrics-brief
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
runcmd:
- systemctl enable --now virtwork-migration-stress.service
Use Case
- Storage partners (CSI drivers): During live migration, the storage layer must handle the VM's disk being accessed from a new node. A VM that is actively dirtying memory at high rates creates longer migration windows and more complex storage handoff scenarios. Partners need to validate that their CSI driver maintains I/O consistency during extended migration — not just the quick migrations that idle VMs produce.
- Network partners (CNI, SDN, OVN-Kubernetes): Live migration moves a VM's network identity (IP, MAC) to a new node. A VM with active memory writes produces a longer migration window during which network traffic must be correctly routed to both the source and destination. Partners need sustained migrations to validate network cutover correctness and downtime measurement.
- Monitoring/Observability partners: Partners need to validate that their agents correctly handle metric continuity during migration — no gaps, no duplicate data points, correct host/node attribution before and after migration. A VM that migrates quickly (idle VM, <1 second) doesn't exercise this. A VM that takes 30-60 seconds to migrate because of dirty memory exposes real-world monitoring gaps.
- Platform engineering / Node lifecycle: Validates that
oc adm drainwith live migration works correctly under realistic conditions. An idle cluster drains instantly; a cluster with migration-stress VMs reveals the real-world drain duration and any timeout issues. - Red Hat CNV engineering: Provides a reproducible, tunable migration difficulty benchmark. Adjusting
vm-bytes-percentandvm-methodproduces a spectrum from "easy migration" to "convergence-challenged migration" — useful for regression testing migration improvements.
Additional Context
- This workload is distinct from the existing
memoryworkload in purpose and behavior:memory: allocates and holds memory at target pressure — tests memory capacity and OOM behaviormigration-stress: continuously writes to memory pages — tests migration convergence and duration- A VM can run both simultaneously (memory pressure + high dirty rate), but they test different things.
- The key metric to observe is migration duration:
virtctl migrate <vm-name>followed by watchingoc get vmim(VirtualMachineInstanceMigration) for the migration to complete. With this workload active, migration should take measurably longer than an idle VM. - Consider pairing this workload with a monitoring dashboard that shows: migration start time, dirty page rate during pre-copy iterations, convergence point, total migration duration, and post-migration workload resumption. This is the demo that sells the value to partners.
- stress-ng's
--vm-methodoptions provide a tunable dirty rate spectrum:write64: moderate dirty rate (~2-5 GB/s depending on hardware)write1024: higher dirty ratezero: maximum dirty rate (memset to zero)- This lets users tune migration difficulty from "slightly harder than idle" to "convergence-challenged."
- The
--vm-keepflag is critical — without it, stress-ng remaps memory on each iteration, which tests page fault handling rather than page dirtying.--vm-keepensures the same pages are repeatedly dirtied, which is what stresses the migration pre-copy algorithm. - Memory recommendation: 4Gi minimum, 8Gi for meaningful migration stress. At 2Gi with write64, migration typically converges in 1-2 pre-copy rounds. At 8Gi, it may take 5+ rounds or require post-copy migration fallback.
- Lingua principale
- Go
- Stelle
- 0
- Fork
- 0
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di opdev/virtwork
-
good first issue needs-triage size/L workload-request workload/variant
Difficoltà 5/5 Più di una settimana Idoneità per principianti 45/100
-
[Workload]: chaos-migrationApertaneeds-triage priority/awaiting-more-evidence size/XL workload-request workload/tier-2
Difficoltà 5/5 Più di una settimana Idoneità per principianti 48/100
-
[Workload]: disk-snapshotApertagood first issue needs-triage size/XL workload-request workload/variant
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
-
[Workload]: encryptionApertaneeds-triage size/L workload-request workload/tier-3
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
-
[Workload]: windowsApertaneeds-triage size/XXL workload-request workload/tier-3
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
Tutte le issue di opdev/virtwork
Issue simili
-
usage: a custom provider's balance meters ("…%" in the balance path) ignore the Left/Used switchAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
bug iam-service
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
platform-mesh/platform-mesh#425 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
grafana/tempo-operator#1691 ·
I maintainer di solito rispondono entro 1 giorno
-
fix: presentation.go with mcp-table.go: the message for each MCP server comes backForse già presa @mge1512 l’ha presa oggi. Apertabug
Difficoltà 1/5 1-3 ore Idoneità per principianti 78/100
mark3labs/kit#242 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
slavakurilyak/awesome-ai-agents#827 ·
I maintainer di solito rispondono entro 1 giorno