[Workload]: realtime
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Lĩnh vực
- devops, infrastructure, performance
Hướng nghiên cứu
Bắt đầu từ điểm vào của workload cho virtwork run --workloads realtime và kiểm tra VMResources() để xem tài nguyên CPU của VM được cấu hình như thế nào. Thêm workload realtime bằng các đường dẫn cloud-init và dịch vụ systemd đã nêu, sau đó xác minh rằng cyclictest chạy và báo cáo độ trễ tối đa; hãy tính đến việc bố trí CPU chuyên dụng và các tham số runtime được ghi trong tài liệu.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Workload Name
realtime
Workload Description
Latency-sensitive workload that runs cyclictest on a real-time-capable VM to measure scheduling jitter. Produces continuous worst-case latency measurements (min/avg/max in microseconds) that quantify whether the VM's CPU pinning, NUMA topology, and hugepages configuration actually delivers deterministic scheduling under load.
This workload consumes the OpenShift Virtualization Cookbook's performance tuning recipes (CPU pinning, NUMA, hugepages, real-time kernel) and produces a quantitative signal — maximum scheduling jitter in microseconds. Without this workload, the Cookbook's tuning recommendations are validated only by inspection ("the VM spec has dedicated CPUs") rather than by measurement ("the VM achieves <20μs worst-case jitter").
This is critical for Red Hat's telco vertical — the largest deployment base for OpenShift Virtualization in production. Telco VNFs (Virtual Network Functions) running in VMs require deterministic scheduling with jitter below 20-50μs. Every telco partner validating on OPL needs to prove their VNF achieves this target on the tuned VM.
Tooling and Packages
- Tool:
cyclictestfrom thert-testspackage - RPM packages:
rt-tests - systemd service command:
cyclictest --mlockall --smp --priority=99 --interval=1000 --distance=0 --duration=0--mlockall: lock all memory to prevent page faults--smp: one thread per CPU--priority=99: highest real-time priority--interval=1000: 1000μs (1ms) measurement interval--distance=0: all threads use the same interval--duration=0: run indefinitely
- Output: periodic max-latency reports to stdout/journald
- Configurable parameters:
rt-priority: scheduling priority (default: 99)rt-interval: measurement interval in microseconds (default: 1000)rt-duration: test duration in seconds (default: 0 = indefinite)rt-histogram: enable latency histogram output (default: false)
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
The VM spec should request dedicated CPUs (spec.domain.cpu.dedicatedCpuPlacement: true) and ideally be configured with NUMA topology and hugepages. Without dedicated CPU placement, cyclictest results are meaningless — the point is to measure jitter on pinned cores, not the expected high jitter of shared cores.
Cloud-Init Details
packages:
- rt-tests
- tuned
- tuned-profiles-realtime
write_files:
- path: /usr/local/bin/virtwork-realtime.sh
permissions: '0755'
content: |
#!/bin/bash
set -euo pipefail
PRIORITY="${RT_PRIORITY:-99}"
INTERVAL="${RT_INTERVAL:-1000}"
DURATION="${RT_DURATION:-0}"
HISTOGRAM="${RT_HISTOGRAM:-}"
# Apply real-time tuned profile if available
if command -v tuned-adm &>/dev/null; then
tuned-adm profile realtime 2>/dev/null || true
fi
ARGS="--mlockall --smp --priority=$PRIORITY --interval=$INTERVAL --distance=0"
if [ "$DURATION" -gt 0 ] 2>/dev/null; then
ARGS="$ARGS --duration=$DURATION"
fi
if [ -n "$HISTOGRAM" ]; then
ARGS="$ARGS --histogram=200"
fi
exec cyclictest $ARGS
- path: /etc/systemd/system/virtwork-realtime.service
content: |
[Unit]
Description=Virtwork real-time latency measurement (cyclictest)
After=multi-user.target
[Service]
Type=simple
Environment=RT_PRIORITY=99
Environment=RT_INTERVAL=1000
Environment=RT_DURATION=0
ExecStart=/usr/local/bin/virtwork-realtime.sh
Restart=always
RestartSec=5
LimitMEMLOCK=infinity
LimitRTPRIO=99
CPUSchedulingPolicy=fifo
CPUSchedulingPriority=99
[Install]
WantedBy=multi-user.target
runcmd:
- systemctl enable --now virtwork-realtime.service
Use Case
- Telco partners (VNF vendors — Ericsson, Nokia, Mavenir, Samsung): The primary audience. Telco VNFs running signal processing, packet forwarding, and baseband functions in VMs require worst-case scheduling jitter below 20-50μs. Every telco partner validating on OPL needs a reproducible way to prove their VNF achieves this target on the configured VM. cyclictest is the industry-standard tool for this measurement.
- Red Hat CNV performance validation: Validates that the platform's real-time features — CPU manager static policy, NUMA-aware scheduling, hugepages, RT kernel — actually deliver deterministic scheduling when composed together. The Cookbook documents how to configure these features; this workload measures whether they work.
- Performance tuning partners: Partners building performance profiling or tuning tools need a workload with a clear, measurable performance target (max jitter < Xμs). cyclictest provides exactly this — a single number that improves or regresses as tuning changes are applied.
- Hardware/platform partners (Intel, AMD, ARM server vendors): Need to validate that their hardware's real-time capabilities are correctly exposed through KubeVirt to the VM guest. cyclictest on a properly configured VM should produce results comparable to bare-metal cyclictest — any significant deviation indicates a platform issue.
- Cookbook integration: Direct feedback loop — apply Cookbook performance tuning recipes, run
virtwork run --workloads realtime, check if max jitter meets the target. This is the missing "verify" step in the Cookbook's performance tuning chapter.
Additional Context
- VM spec requirements: This workload is only meaningful on VMs with dedicated CPU placement. The implementation should either:
- Automatically set
spec.domain.cpu.dedicatedCpuPlacement: trueon the VM spec (viaVMResources()or a new method), or - Warn/document that results on shared-CPU VMs are not representative.
Consider adding a--dedicated-cpusflag or auto-detecting the cluster's CPU manager policy.
- Automatically set
- Base image consideration: For best results, the VM should run a real-time kernel (
kernel-rt). The default Fedora container disk doesn't includekernel-rt. Options:- Use a RHEL 9 container disk with RT kernel available
- Document that the standard kernel produces higher jitter (typically 50-200μs vs <20μs on RT kernel)
- Install
kernel-rtvia cloud-init and reboot — adds significant boot time
- Output interpretation:
- Max latency <20μs: excellent, meets telco requirements
- Max latency 20-50μs: acceptable for many VNFs
- Max latency >100μs: CPU pinning or NUMA configuration issue
- Max latency >1000μs: no dedicated CPUs or severe interference
- Pairing with other workloads: The most valuable test is running cyclictest alongside other workloads (
cpu,disk,network) on the same cluster. Real-time scheduling should maintain low jitter even when other VMs are generating heavy load on adjacent cores. This is the "noisy neighbor" test that telco partners care most about. - tuned profile: The
realtimetuned profile configures kernel parameters (transparent hugepages disabled, CPU frequency governor set to performance, IRQ balancing tuned) that significantly improve cyclictest results. Installing and activating it via cloud-init is recommended. - cyclictest output format:
T: 0 ( 1234) P:99 I:1000 C: 50000 Min: 1 Act: 3 Avg: 2 Max: 12— theMaxcolumn is the critical number for telco validation.
- Ngôn ngữ chính
- Go
- Star
- 0
- Fork
- 0
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của opdev/virtwork
-
good first issue needs-triage size/L workload-request workload/variant
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 45/100
-
[Workload]: chaos-migrationĐang mởneeds-triage priority/awaiting-more-evidence size/XL workload-request workload/tier-2
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 48/100
-
[Workload]: disk-snapshotĐang mởgood first issue needs-triage size/XL workload-request workload/variant
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
-
[Workload]: encryptionĐang mởneeds-triage size/L workload-request workload/tier-3
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
-
[Workload]: windowsĐang mởneeds-triage size/XXL workload-request workload/tier-3
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Tất cả issue của opdev/virtwork
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
scaleway/scaleway-cli#6492 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
taskcluster/taskcluster#9284 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
oasdiff/oasdiff#1337 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
splunk/terraform-provider-splunk#256 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày