Skip to content

Conversation

MasterPtato
Copy link
Contributor

Changes

This was referenced Jun 12, 2025
Copy link
Contributor Author

MasterPtato commented Jun 12, 2025

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


How to use the Graphite Merge Queue

Add the label merge-queue to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jun 12, 2025

Deploying rivet with  Cloudflare Pages  Cloudflare Pages

Latest commit: ff90f58
Status:🚫  Build failed.

View logs

@MasterPtato MasterPtato force-pushed the 06-12-feat_pegboard_add_local_image_cache_and_overlay_fs_mounts branch 2 times, most recently from 392cfe6 to ac97bc8 Compare June 12, 2025 22:30
@MasterPtato MasterPtato marked this pull request as ready for review June 12, 2025 22:30
@MasterPtato MasterPtato requested a review from NathanFlurry June 12, 2025 22:30
Copy link
Contributor Author

@greptileai

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

Major enhancement to Pegboard's container image management system, introducing local image caching and overlay filesystem mounts for improved performance and resource utilization.

  • Added ImageDownloadHandler in packages/edge/infra/client/manager/src/image_download_handler.rs with LRU-based caching and concurrent download management using SCC HashMap
  • Implemented overlay filesystem mounts in packages/edge/infra/client/manager/src/actor/setup.rs to share common layers between actors using the same image
  • Added high-priority scheduling (Nice=-15) for critical services in systemd configurations for rivet-edge-server, pegboard, and rivet-guard
  • Added granular histogram buckets in packages/edge/infra/client/manager/src/metrics/buckets.rs for microsecond-scale performance measurements
  • Restructured actor identification to use (actor_id, generation) tuples across multiple test files for better lifecycle management

34 files reviewed, 11 comments
Edit PR Review Bot Settings | Greptile

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

Further refinements to the Pegboard image caching system and actor lifecycle management, focusing on resource optimization and service reliability.

  • Refactored actor port management in tests/ to remove explicit port assignments, suggesting a more dynamic port allocation system
  • Phased out isolate-v8 runner in favor of container-based runners, with related test updates in packages/edge/infra/client/manager/tests/common.rs
  • Added process resource controls in packages/edge/infra/client/manager/src/runner.rs for better CPU and memory management of orphaned processes
  • Optimized CPU shares calculation in packages/edge/infra/client/manager/src/actor/oci_config.rs by adjusting divisor from 8 to 10
  • Added datacenter validation before metrics collection in packages/edge/services/pegboard/standalone/usage-metrics-publish/src/lib.rs

34 files reviewed, 2 comments
Edit PR Review Bot Settings | Greptile


// Sleep if not disabled
if (!CONFIG.disableSleep) {
const sleepDuration = (start + 60_000 - Date.now()) / 1000;
Copy link

Choose a reason for hiding this comment

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

logic: Using shadowed 'start' variable here. Will calculate wrong sleep duration. Should use outer 'start' variable.

Suggested change
const sleepDuration = (start + 60_000 - Date.now()) / 1000;
const sleepDuration = (actorStart + 60_000 - Date.now()) / 1000;

@MasterPtato MasterPtato force-pushed the 06-12-feat_pegboard_add_local_image_cache_and_overlay_fs_mounts branch from ac97bc8 to f048c99 Compare June 12, 2025 23:04
@MasterPtato MasterPtato force-pushed the 06-10-chore_guard_fix_log_levels branch from b3aa8b4 to 2e8e98f Compare June 12, 2025 23:04
@MasterPtato MasterPtato force-pushed the 06-12-feat_pegboard_add_local_image_cache_and_overlay_fs_mounts branch from f048c99 to 3a69467 Compare June 13, 2025 01:53
@MasterPtato MasterPtato changed the base branch from 06-10-chore_guard_fix_log_levels to graphite-base/2586 June 13, 2025 20:43
@MasterPtato MasterPtato force-pushed the 06-12-feat_pegboard_add_local_image_cache_and_overlay_fs_mounts branch from 3a69467 to e2238dc Compare June 13, 2025 22:55
@MasterPtato MasterPtato changed the base branch from graphite-base/2586 to 06-10-chore_guard_fix_log_levels June 13, 2025 22:55
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jun 13, 2025

Deploying rivet-hub with  Cloudflare Pages  Cloudflare Pages

Latest commit: ff90f58
Status:🚫  Build failed.

View logs

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jun 13, 2025

Deploying rivet-studio with  Cloudflare Pages  Cloudflare Pages

Latest commit: a94aa4a
Status:⚡️  Build in progress...

View logs

@NathanFlurry NathanFlurry force-pushed the 06-12-feat_pegboard_add_local_image_cache_and_overlay_fs_mounts branch from a5dffdd to a94aa4a Compare June 20, 2025 19:18
@NathanFlurry NathanFlurry force-pushed the 06-10-chore_guard_fix_log_levels branch from c33d751 to 5b30dea Compare June 20, 2025 19:18
@graphite-app
Copy link
Contributor

graphite-app bot commented Jun 20, 2025

Merge activity

  • Jun 20, 7:19 PM UTC: MasterPtato added this pull request to the Graphite merge queue.
  • Jun 20, 7:20 PM UTC: CI is running for this pull request on a draft pull request (#2630) due to your merge queue CI optimization settings.
  • Jun 20, 7:22 PM UTC: Merged by the Graphite merge queue via draft PR: #2630.

graphite-app bot pushed a commit that referenced this pull request Jun 20, 2025
<!-- Please make sure there is an issue that this PR is correlated to. -->

## Changes

<!-- If there are frontend changes, please include screenshots. -->
@graphite-app graphite-app bot closed this Jun 20, 2025
@graphite-app graphite-app bot deleted the 06-12-feat_pegboard_add_local_image_cache_and_overlay_fs_mounts branch June 20, 2025 19:22
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