Skip to content

Conversation

@smuppand
Copy link
Contributor

@smuppand smuppand commented Jan 2, 2026

This PR refreshes the Sysbench_Performance suite end-to-end (runner, library helpers, config/docs, and CI job wiring).

Included changes:

  • Sysbench_Performance/run.sh: multi-thread runs via THREADS_LIST, per-iteration capture + AVG summary, baseline gating with configurable delta, CSV export, safer FileIO dataset handling, and early clock sanity check (ensure_reasonable_clock) to avoid epoch-timestamp issues.
  • Runner/utils/lib_performance.sh: add MB/sec normalization helper (sysbench_mib_to_mb) and sysbench parsing/gating helpers used by the runner for consistent KPI units.
  • Sysbench baseline config: align baseline keys/metrics for t1/t4 gating (time_sec lower-is-better; *_mbps higher-is-better) and keep fileio KPIs in MB/sec for consistency.
  • YAML job updates: expose sysbench knobs (threads list, iterations, delta, baseline path, output dir, fileio dir) and ensure artifacts/logs are collected.
  • README updates: document usage (env/CLI), baseline file format/keys, gating rules, and troubleshooting (clock sanity + timesync diagnostics).

Add sysbench parsers for time_sec and mem_mbps metrics.
Add values helpers (append/avg) for iteration aggregation.
Add fifo-based tee runner and CSV append helper for KPIs.

Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
if [ -d /var/tmp ] && [ -w /var/tmp ]; then
FILEIO_DIR="/var/tmp/sysbench_fileio"
else
FILEIO_DIR="/tmp/sysbench_fileio"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if nothing is present in /tmp/

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if nothing is present in /tmp/

This is how the changes
The /var/tmp → /tmp fallback assumes /tmp exists and is writable. Please add a mkdir -p "$FILEIO_DIR" + -w check and SKIP with message if it’s not usable.

set_performance_governor 2>/dev/null || true

# --------- FileIO prepare (safety warning + prepare) ----------
case "$FILEIO_DIR" in
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better to add this at line#221

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better to add this at line#221

the case "$FILEIO_DIR" in safety block fits better near the FileIO prepare section (around line ~221) so the flow reads init → deps → baseline → governor → fileio prepare.


if [ -n "$BASELINE_FILE" ] && [ "$gate_fail" -ne 0 ]; then
log_fail "$TESTNAME FAIL - one or more KPIs did not meet baseline thresholds"
echo "$TESTNAME FAIL" >"$RES_FILE"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add restore_governer

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add restore_governer

if trap cleanup EXIT is set early and cleanup() calls restore_governor, we’re already covered for both PASS/FAIL exits. Before any early exit paths, otherwise i have added explicit restore_governor before exit.

fi

log_pass "$TESTNAME PASS"
echo "$TESTNAME PASS" >"$RES_FILE"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add restore_governer

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add restore_governer

Here as well

steps:
- REPO_PATH=$PWD
- cd Runner/suites/Performance/Sysbench_Performance/
- ./run.sh || true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you want to add parameters aswell.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you want to add parameters aswell.

considered only adding minimal CI-stability params (ITERATIONS, THREADS_LIST, ALLOWED_DEVIATION) so runs are reproducible.

@vnarapar
Copy link
Contributor

vnarapar commented Jan 8, 2026

please re order commits, i would suggest this way
7aa3348 - perf(lib_performance): add sysbench helper APIs
d5f5ec3 - perf(sysbench): add baseline KPI config
10fa4bd - functestlib: expand ensure_reasonable_clock for no-network systems
cc987f2 - perf(sysbench): add Sysbench_Performance runner
10de338 - docs(sysbench): add usage and KPI guidance
5503f55 - lava(sysbench): add Sysbench_Performance job template

Add baseline KPIs for CPU/Memory/Threads/Mutex averages.
Document thread-key naming used by the gate evaluator.
Enable PASS/FAIL comparisons using delta threshold in run.sh.

Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
- Log timedatectl status/show-timesync/timesync-status outputs when epoch detected
- Log systemctl status for systemd-timesyncd for debug
- Try RTC restore (hwclock / rtc0 since_epoch) before falling back
- Seed time from kernel build timestamp (uname -v / /proc/version) if available
- Continue gracefully if clock remains invalid

Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
Run CPU/Memory/Threads/Mutex workloads with iterations support.
Capture per-iteration logs while streaming output to console.
Compute KPI averages and optionally gate against baseline+delta.

Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
Document CLI/env options, output artifacts, and examples.
Explain baseline file format and recommended delta threshold.
Describe CSV/KPI summary fields for CI and local runs.

Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
Provide LAVA YAML to run sysbench suite on target devices.
Expose key parameters (threads, iterations, delta, taskset).
Store logs and summaries as job artifacts for analysis.

Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
@smuppand
Copy link
Contributor Author

smuppand commented Jan 9, 2026

please re order commits, i would suggest this way 7aa3348 - perf(lib_performance): add sysbench helper APIs d5f5ec3 - perf(sysbench): add baseline KPI config 10fa4bd - functestlib: expand ensure_reasonable_clock for no-network systems cc987f2 - perf(sysbench): add Sysbench_Performance runner 10de338 - docs(sysbench): add usage and KPI guidance 5503f55 - lava(sysbench): add Sysbench_Performance job template

Yes, thanks for pointing out the order makes sense. Updated the order.

@smuppand smuppand requested a review from vnarapar January 9, 2026 06:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants