Skip to content

Add comprehensive benchmarking infrastructure#19

Open
xangcastle wants to merge 18 commits intomainfrom
xangcastle/benchmarks
Open

Add comprehensive benchmarking infrastructure#19
xangcastle wants to merge 18 commits intomainfrom
xangcastle/benchmarks

Conversation

@xangcastle
Copy link
Copy Markdown
Owner

@xangcastle xangcastle commented Feb 27, 2026

Description

Add comprehensive benchmarking infrastructure for Remote Build Execution (RBE) systems, including various load tests, environment configurations, and CI integration.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Performance improvement
  • Code refactoring

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.

  • Unit tests
  • Integration tests
  • Manual testing

Test Configuration:

  • Bazel version:
  • Rust version:
  • Kubernetes version:

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

…Execution (RBE) systems, including various load tests, environment configurations, and CI integration.
…e the CI workflow to use it for PRs, including those from forks.
…pt to support local service auto-detection and startup.
@xangcastle xangcastle force-pushed the xangcastle/benchmarks branch 2 times, most recently from 96c8d07 to 103c533 Compare February 27, 2026 09:35
Repository owner deleted a comment from github-actions Bot Feb 27, 2026
Repository owner deleted a comment from github-actions Bot Feb 27, 2026
Repository owner deleted a comment from github-actions Bot Feb 27, 2026
@xangcastle xangcastle force-pushed the xangcastle/benchmarks branch from 103c533 to d68e0d8 Compare February 27, 2026 09:59
@xangcastle xangcastle marked this pull request as ready for review February 27, 2026 10:22
@xangcastle xangcastle force-pushed the xangcastle/benchmarks branch from d68e0d8 to f829719 Compare February 27, 2026 10:56
Repository owner deleted a comment from github-actions Bot Feb 27, 2026
Repository owner deleted a comment from github-actions Bot Feb 27, 2026
@xangcastle xangcastle force-pushed the xangcastle/benchmarks branch 2 times, most recently from 0a11f79 to e87179a Compare February 27, 2026 11:17
…pt to support local service auto-detection and startup.
@xangcastle xangcastle force-pushed the xangcastle/benchmarks branch from e87179a to 384c78e Compare February 27, 2026 11:32
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 27, 2026

🚀 Performance Benchmark Results

Benchmark Results Summary

Mode: light
Timestamp: 2026-02-28 01:02:49 UTC
Commit: 39d26f5

Memory Footprint

  • Idle Memory: 6.16406 MB

✅ Memory usage within expected range

Cold Start Time

  • Startup Time: 312ms

✅ Cold start within expected range

Detailed Results


Generated by FerrisRBE Benchmark Suite


📊 View full details and artifacts
🕐 Benchmark run: 2026-02-28T01:02:51.199Z

- Invalidate corrupted cache (future timestamps, LTO conflicts) by bumping cache key to v2
- Add CARGO_BAZEL_REPIN=off to prevent dependency regeneration in CI
- Fixes: error: options  and  are incompatible
Remove CARGO_BAZEL_REPIN: off from env - it was being interpreted as a
package name instead of a boolean. The --@rules_rust//crate_universe:repin=off
flag in .bazelrc ci config already handles this.

Fixes: package ID specification 'off' did not match any packages
Previous builds with LTO left artifacts in external repos cache.
Bumping to v3 to force complete rebuild without LTO flags.

Fixes: error: options -C embed-bitcode=no and -C lto are incompatible
The root cause of the LTO incompatibility error was lto = 'fat' in
Cargo.toml profile.release. rules_rust/crate_universe reads this and
generates Bazel rules with LTO flags, which conflict with
embed-bitcode=no.

- Remove lto = 'fat' from Cargo.toml [profile.release]
- Bump cache key to v4 to force regeneration of crate_universe rules

Fixes: error: options -C embed-bitcode=no and -C lto are incompatible
Add issues: write permission to allow rustsec/audit-check to create
issues when it detects unmaintained packages or vulnerabilities.

Fixes: Resource not accessible by integration error
Instead of sacrificing performance by disabling LTO due to incompatibility
with rules_rust defaults, properly enable ThinLTO through the official
rules_rust setting.

Changes:
- Use --@rules_rust//rust/settings:lto=thin instead of -C lto=no
- Keep opt-level=3, codegen-units=1, panic=abort for maximum optimization
- Invalidate Bazel cache to v6 for clean build with LTO enabled

This recovers the potential 5-15% performance loss from disabling LTO,
keeping FerrisRBE truly the most optimized RBE server.
rules_rust defaults to embed-bitcode=no for faster builds, but LTO
requires bitcode to be embedded in the rlibs. Add explicit flag to
enable bitcode alongside ThinLTO setting.

Also invalidate Bazel cache to v7 for clean build.
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 2, 2026

🚀 Container Performance Benchmark Results

Benchmark Results Summary (Container Mode)

Mode: light
Timestamp: 2026-03-02 01:19:23 UTC
Commit: c9aaa49
Image: ferrisrbe/server:latest
Image ID: 8a585679bd71
Image Size: 95.7MB

Memory Footprint (Container)

  • Idle Memory: 2.086 MB

✅ Memory usage within expected range

Cold Start Time (Container)

  • Startup Time: 112ms

✅ Cold start within expected range

Container Statistics

CONTAINER                             CPU %     MEM USAGE / LIMIT   NET I/O   BLOCK I/O
ferrisrbe-benchmark-20260302_010745   0.07%     2.086MiB / 512MiB   0B / 0B   0B / 0B

Detailed Results


Generated by FerrisRBE Benchmark Suite (Container Mode)


📊 View full details and artifacts
🕐 Benchmark run: 2026-03-02T01:19:24.665Z

💡 Note: Benchmarks run using Docker containers for realistic testing

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 2, 2026

🚨 Performance Regression Detected

This PR introduces performance regressions that exceed the acceptable thresholds.

Benchmark Results

Metric Value
memory_mb 2.121
cold_start_ms 115

Thresholds Reference (Container Mode)

Metric Max Allowed Description
Memory 20 MB Idle memory footprint (containerized)
Cold Start 500 ms Container startup + server ready
Execution P99 100 ms Execution API latency
Cache P99 1000 μs Cache read P99
Cleanup Rate 95% Resource cleanup after disconnections

Next Steps

  1. 📊 View full benchmark results and logs
  2. 🔍 Download artifacts to analyze detailed metrics
  3. 🛠️ Identify and fix the performance regression
  4. 🔄 Re-run benchmarks after optimizations

💡 Tip: These benchmarks run in Docker containers for realistic testing.


Benchmark run: 2026-03-02T00:49:47.047Z

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 2, 2026

📊 Performance Comparison: PR vs Official Release

📊 Performance Comparison: PR vs Official Release

Container Images

Attribute Official (latest) PR Notes
Image xangcastle/ferris-server:latest ferrisrbe/server:latest -
Image ID 90848733137b 8bf3ae2f2bfa Different = new build
Size 95.7MB 95.7MB Smaller is better

Performance Metrics

Metric Official (latest) PR Change Status
Memory (MB) 2.148 2.152 = 0%

Legend

  • ✅ Within 5% - Acceptable
  • ⚠️ 5-15% change - Review recommended
  • 🚨 >15% regression - Optimization required

Interpretation

  • Memory usage acceptable: 2.152MB within expected range

Image Size Analysis

  • ✅ Image size unchanged (95.7MB)

Comparison generated at: 2026-03-02 01:20:54 UTC

…pt to support local service auto-detection and startup.
Clean up benchmark scripts by removing unused `output_name` parameter from `find_bazel_output()`, unused `OFFICIAL_IMAGE_TAG` constant, and ByteStream API support from CAS load test. These were remnants from earlier iterations that are no longer needed.
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.

1 participant