[PR #287] [MERGED] perf: tune DAMON reclaim profile and cover full guest memory #320

Closed
opened 2026-10-29 14:22:10 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/kvcache-ai/AgentENV/pull/287
Author: @zlzGithub-0801
Created: 9/14/2026
Status: ✅ Merged
Merged: 9/15/2026
Merged by: @yingdi-shan

Base: main ← Head: fix/damon-reclaim-profile-and-memory-range


📝 Commits (1)

  • 9f81b31 perf: tune DAMON reclaim profile and cover full guest memory

📊 Changes

3 files changed (+183 additions, -15 deletions)

View changed files

📝 config/default.toml (+1 -1)
📝 src/sandbox/firecracker/config.rs (+14 -14)
📝 src/sandbox/firecracker/sandbox.rs (+168 -0)

📄 Description

What

Tune the default DAMON reclaim profile and automatically set its monitoring range to cover the full Firecracker guest memory span.

Why

The previous automatic DAMON range could omit guest RAM above the architecture-specific memory hole. The updated profile improves memory usage with a limited runtime impact. See #281

Scope and non-goals

Includes DAMON defaults and x86_64/arm64 guest memory range calculation. Does not change Firecracker’s memory layout or dirty-page settings.

Design and behavior changes

When neither monitor range parameter is explicitly configured, AgentENV appends a range covering the guest RAM span. Explicit user values remain unchanged.

Compatibility and operations

  • Public API or generated protocol: N/A.
  • Configuration or defaults: DAMON reclaim defaults are updated.
  • Snapshot manifest, artifact layout, or storage format: N/A.
  • Upgrade and rollback: N/A.
  • Host requirements, permissions, ports, or dependencies: N/A.

Validation

  • make fmt
  • make clippy
  • make test-unit
  • Relevant Rust integration tests
  • make -C services test (required when services/ changes)
  • Generated clients/server regenerated with the documented make target
  • Documentation updated
  • Benchmarks or performance comparison completed

Skipped checks and reasons: Services, generated protocol, and documentation checks are not applicable to the changed files.

Risks and reviewer notes

More aggressive reclaim can increase page faults and runtime for cache-sensitive workloads. The monitoring span may include architecture-specific address holes, which DAMON safely skips because they have no mapped pages.

Checklist

  • The PR contains one coherent change and no unrelated formatting or refactoring.
  • New behavior is covered by tests, or I explained why testing is impractical.
  • Logs and examples contain no credentials, tokens, or private registry information.
  • I did not manually edit generated code without updating its source and regenerating it.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/kvcache-ai/AgentENV/pull/287 **Author:** [@zlzGithub-0801](https://github.com/zlzGithub-0801) **Created:** 9/14/2026 **Status:** ✅ Merged **Merged:** 9/15/2026 **Merged by:** [@yingdi-shan](https://github.com/yingdi-shan) **Base:** `main` ← **Head:** `fix/damon-reclaim-profile-and-memory-range` --- ### 📝 Commits (1) - [`9f81b31`](https://github.com/kvcache-ai/AgentENV/commit/9f81b310a359d63b104a07343ccf9ec70795db4e) perf: tune DAMON reclaim profile and cover full guest memory ### 📊 Changes **3 files changed** (+183 additions, -15 deletions) <details> <summary>View changed files</summary> 📝 `config/default.toml` (+1 -1) 📝 `src/sandbox/firecracker/config.rs` (+14 -14) 📝 `src/sandbox/firecracker/sandbox.rs` (+168 -0) </details> ### 📄 Description ## What Tune the default DAMON reclaim profile and automatically set its monitoring range to cover the full Firecracker guest memory span. ## Why The previous automatic DAMON range could omit guest RAM above the architecture-specific memory hole. The updated profile improves memory usage with a limited runtime impact. See #281 ## Related issue ## Scope and non-goals Includes DAMON defaults and x86_64/arm64 guest memory range calculation. Does not change Firecracker’s memory layout or dirty-page settings. ## Design and behavior changes When neither monitor range parameter is explicitly configured, AgentENV appends a range covering the guest RAM span. Explicit user values remain unchanged. ## Compatibility and operations - Public API or generated protocol: N/A. - Configuration or defaults: DAMON reclaim defaults are updated. - Snapshot manifest, artifact layout, or storage format: N/A. - Upgrade and rollback: N/A. - Host requirements, permissions, ports, or dependencies: N/A. ## Validation - [x] `make fmt` - [x] `make clippy` - [x] `make test-unit` - [x] Relevant Rust integration tests - [ ] `make -C services test` (required when `services/` changes) - [ ] Generated clients/server regenerated with the documented `make` target - [ ] Documentation updated - [x] Benchmarks or performance comparison completed Skipped checks and reasons: Services, generated protocol, and documentation checks are not applicable to the changed files. ## Risks and reviewer notes More aggressive reclaim can increase page faults and runtime for cache-sensitive workloads. The monitoring span may include architecture-specific address holes, which DAMON safely skips because they have no mapped pages. ## Checklist - [x] The PR contains one coherent change and no unrelated formatting or refactoring. - [x] New behavior is covered by tests, or I explained why testing is impractical. - [x] Logs and examples contain no credentials, tokens, or private registry information. - [x] I did not manually edit generated code without updating its source and regenerating it. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-29 14:22:10 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
kvcache-ai/AgentENV#320
No description provided.