mirror of
https://github.com/kvcache-ai/AgentENV.git
synced 2026-11-05 01:17:36 +00:00
[GH-ISSUE #46] feat: support per-sandbox disk I/O rate limiting via Firecracker TokenBucket #21
Labels
No labels
bug
documentation
enhancement
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/AgentENV#21
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @rogeroger-yu on GitHub (Jul 28, 2026).
Original GitHub issue: https://github.com/kvcache-ai/AgentENV/issues/46
Summary
Add configurable per-sandbox disk I/O rate limiting using Firecracker's built-in TokenBucket rate limiter. This provides hard bandwidth (bytes/sec) and IOPS caps for each sandbox's root disk, ensuring no single sandbox can monopolize host disk I/O.
Motivation
Currently all sandboxes on a node share disk I/O resources without any isolation. A single sandbox performing heavy disk I/O can starve other sandboxes, causing performance degradation and unpredictable latency.
Proposed Solution
Wire Firecracker's per-drive
RateLimiterinto the sandbox lifecycle:[machine.disk_rate_limit]section inconfig/default.tomlbandwidth_bytes_per_sec(default: 100 MB/s)bandwidth_burst_bytes(default: 10 MB)iops(default: 3000)iops_burst(default: 500)refill_time_ms(default: 1000ms)add_drive()timePATCH /drives/{drive_id}after VM resumeTest Results
@yingdi-shan commented on GitHub (Jul 29, 2026):
Despite the design in #47 still needs further discussion, hard per-sandbox I/O limits remain necessary in some scenarios. Firecracker’s TokenBucket provides a clear limit on guest-visible disk throughput and can already serve many practical use cases.