paritytech / paritytech/try-runtime-cli
try-runtime-cli Crashes Due to OOM (Out-of-Memory) & Long Execution Time – Resolved with 32GB RAM
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Rust
- Star
- 25
- Fork
- 29
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
Description
We encounter critical resource and performance issues when running try-runtime-cli with our target runtimes, which improve drastically only after upgrading system memory. Key details are as follows:
- Memory Exhaustion & OOM Termination: With the initial 16GB physical memory configuration, the system rapidly runs out of memory during
try-runtimeexecution, causing severe system lag. Eventually, thetry-runtimeprocess is consistently killed by the operating system due to an Out-of-Memory (OOM) error. - Extreme Execution Time (16GB RAM Scenario): In the rare cases where the process avoids OOM and completes successfully with 16GB RAM, execution takes approximately 3 hours—far exceeding acceptable workflow limits.
- Resolution with Increased RAM: After upgrading the system’s physical memory to 32GB (keeping other configurations unchanged), the issue is resolved:
try-runtimecompletes execution quickly (no specific long delays observed) and no OOM crashes occur.
Environment Configuration
| Component | Initial Configuration (Problematic) | Updated Configuration (Working) |
|---|---|---|
| try-runtime-cli Version | 0.8.0 | 0.8.0 |
| Target Runtime(s) | - bifrost-polkadot (snapshot: ~3.1GB) - bifrost-paseo |
- bifrost-polkadot (snapshot: ~3.1GB) - bifrost-paseo |
| Operating System | Ubuntu 24.04 | Ubuntu 24.04 |
| System Resources | - CPU: 8 cores - Physical Memory: 16GB - Swap Space: 16~32GB (enabled) |
- CPU: 8 cores - Physical Memory: 32GB - Swap Space: 16~32GB (enabled) |
Additional Context
This behavior suggests the try-runtime process (especially when handling the ~3.1GB bifrost-polkadot snapshot and Bifrost-specific runtimes) has a higher minimum memory requirement than initially anticipated. While upgrading to 32GB RAM resolves the issue for us, we have questions for further optimization:
- Is the 32GB RAM requirement expected for
try-runtime-cli 0.8.0when processing large snapshots (e.g., 3.1GB) for Bifrost runtimes? - Are there CLI flags, runtime configurations, or snapshot optimization techniques (e.g., pruning) that could reduce the memory footprint, allowing reliable execution with 16GB RAM?
- Could the high memory usage be linked to runtime-specific logic in
bifrost-polkadot/bifrost-paseo(e.g., unoptimized state handling duringtry-runtimevalidation) rather than justtry-runtime-cliitself?
Steps to Reproduce
- Reproduce OOM/Long Execution (16GB RAM):
- Use
try-runtime-cli 0.8.0to run validation againstbifrost-polkadot(with3.1GB snapshot) on a system with 8 cores, 16GB RAM, and 1632GB swap. - Monitor memory usage: Observe rapid memory depletion, system lag, and eventual OOM killing. If successful, execution takes ~3 hours.
- Use
- Verify Resolution (32GB RAM):
- Upgrade the same system’s physical memory to 32GB.
- Re-run the same
try-runtimecommand: Execution completes quickly with no OOM errors.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Không có tệp mã nguồn, bài kiểm thử hoặc entry point nào được nêu tên. Trước tiên, hãy tái hiện try-runtime-cli 0.8.0 với snapshot ~3.1GB của bifrost-polkadot theo các cấu hình 16GB và 32GB được ghi trong tài liệu, sau đó xác định liệu các khác biệt về bộ nhớ và runtime bắt nguồn từ CLI hay target runtime; được xem là hoàn tất khi xác định được nguyên nhân có thể tái hiện hoặc biện pháp giảm thiểu có thể triển khai.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- rust, ubuntu
- Lĩnh vực
- blockchain, cli, performance
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 25/100