paritytech / paritytech/try-runtime-cli

try-runtime-cli Crashes Due to OOM (Out-of-Memory) & Long Execution Time – Resolved with 32GB RAM

オープン
#119 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Rust
スター
25
フォーク
29
PR マージ指標
30日以内にマージされた PR はありません

説明

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:

  1. Memory Exhaustion & OOM Termination: With the initial 16GB physical memory configuration, the system rapidly runs out of memory during try-runtime execution, causing severe system lag. Eventually, the try-runtime process is consistently killed by the operating system due to an Out-of-Memory (OOM) error.
  2. 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.
  3. Resolution with Increased RAM: After upgrading the system’s physical memory to 32GB (keeping other configurations unchanged), the issue is resolved: try-runtime completes 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:

  1. Is the 32GB RAM requirement expected for try-runtime-cli 0.8.0 when processing large snapshots (e.g., 3.1GB) for Bifrost runtimes?
  2. 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?
  3. Could the high memory usage be linked to runtime-specific logic in bifrost-polkadot/bifrost-paseo (e.g., unoptimized state handling during try-runtime validation) rather than just try-runtime-cli itself?

Steps to Reproduce

  1. Reproduce OOM/Long Execution (16GB RAM):
    • Use try-runtime-cli 0.8.0 to run validation against bifrost-polkadot (with 3.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.
  2. Verify Resolution (32GB RAM):
    • Upgrade the same system’s physical memory to 32GB.
    • Re-run the same try-runtime command: Execution completes quickly with no OOM errors.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

ソースファイル、テスト、エントリーポイントは指定されていません。まず、文書化されている16GBおよび32GB構成で、bifrost-polkadotの~3.1GBスナップショットを使ってtry-runtime-cli 0.8.0を再現し、その後、メモリとruntimeの差異がCLIに起因するのかtarget runtimeに起因するのかを判断します。再現可能な原因または実行可能な緩和策を特定できれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
rust, ubuntu
領域
blockchain, cli, performance
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。