Skip to content

Add the Performance Test task, mode=perftest (fos#55) - #198

Merged
mastacontrola merged 1 commit into
masterfrom
feat/perftest
Oct 27, 2026
Merged

mastacontrola merged 1 commit into
masterfrom
feat/perftest

Conversation

@mastacontrola

Copy link
Copy Markdown
Member

Closes #55.

A slow deploy is limited by one of three stages: the network, the CPU (decompression) or the target disk. fog.perftest times each stage on its own and names the slowest. It runs as a new advanced task type, Performance Test, with mode=perftest. The FOG server half is in a fogproject PR and must merge first.

What it measures

  • Disk: a direct (uncached) sequential read of the target disk. Nothing is written.
  • Network: reads the largest stored image over NFS, mounted read-only. A non-imaging task receives the dev/ capture share, so FOS mounts its parent.
  • CPU: decompresses a sample of that image with the deploy's own decompressor (zstdmt -dc or pigz -dc).
  • All rates are uncompressed MB/s and GB/min, the unit partclone shows. The network rate is scaled by the sample's compression ratio.

Results are posted to service/perftest.php before the task completes, so the server stores them on the host record. A failed post is shown on screen, not fatal.

Tests: tests/checks/perftest.sh, 35 cases, run against real zstdmt/pigz output. I proved it can fail: removing the dev/ mapping fails 2a/2b, and widening the sample glob fails 3a. tests/run-all.sh: 31 passed, 0 failed.

🤖 Generated with Claude Code

A slow deploy is limited by one of three stages: the network, the CPU
(decompression) or the target disk. Users had to be walked through
debug mode to find which. fog.perftest times each stage and names the
slowest.

- Disk: a direct (uncached) sequential read of the target disk. Read
  only; nothing is written.
- Network: reads the largest stored image over NFS, mounted read-only.
  The server sends a non-imaging task the dev/ capture share, so the
  stored images are its parent.
- CPU: decompresses a sample of that image with the deploy's own
  decompressor (zstdmt -dc or pigz -dc).
- Rates are uncompressed MB/s and GB/min, the unit partclone shows; the
  network rate is scaled by the sample's compression ratio.
- The result is posted to service/perftest.php before the task is
  completed, so the server can store it on the host. A failed post is
  shown, not fatal.

The logic is in perftest-funcs.sh so tests/checks/perftest.sh can run it
off-target (35 cases; verified red by removing the dev/ mapping and by
widening the sample glob).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mastacontrola
mastacontrola merged commit 9f19e77 into master Oct 27, 2026
1 check passed
@mastacontrola
mastacontrola deleted the feat/perftest branch October 27, 2026 15:23
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.

Add performance testing

1 participant