Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix available_memory #1801

Merged
merged 2 commits into from
Aug 14, 2023
Merged

Fix available_memory #1801

merged 2 commits into from
Aug 14, 2023

Conversation

yito88
Copy link
Member

@yito88 yito88 commented Aug 9, 2023

Describe your changes

The available_memory unit was changed from KB to Byte when sysinfo was updated from v0.21.1 to v0.29.4 at #1695.

v0.21.1: https://docs.rs/sysinfo/0.21.1/sysinfo/trait.SystemExt.html#tymethod.available_memory

Returns the amount of available RAM in KB.

v0.29.4: https://docs.rs/sysinfo/0.29.4/sysinfo/trait.SystemExt.html#tymethod.available_memory

Returns the amount of available RAM in bytes.

The WASM cache size and the RocksDB cache size were huge due to this issue.

2023-08-09T19:07:13.014083Z  INFO namada_apps::node::ledger: VP WASM compilation cache size not configured, using 1/6 of available memory.
2023-08-09T19:07:13.014154Z  INFO namada_apps::node::ledger: Available memory: 29.93 TiB
2023-08-09T19:07:13.014163Z  INFO namada_apps::node::ledger: VP WASM compilation cache size: 4.99 TiB
2023-08-09T19:07:13.014169Z  INFO namada_apps::node::ledger: Tx WASM compilation cache size not configured, using 1/6 of available memory.
2023-08-09T19:07:13.014172Z  INFO namada_apps::node::ledger: Tx WASM compilation cache size: 4.99 TiB
2023-08-09T19:07:13.014177Z  INFO namada_apps::node::ledger: Block cache size not configured, using 1/3 of available memory.
2023-08-09T19:07:13.014181Z  INFO namada_apps::node::ledger: RocksDB block cache size: 9.98 TiB

Indicate on which release or other PRs this topic is based on

v0.20.1

Checklist before merging to draft

  • I have added a changelog
  • Git history is in acceptable state

@yito88 yito88 requested review from tzemanovic and sug0 August 9, 2023 19:50
@yito88
Copy link
Member Author

yito88 commented Aug 9, 2023

available_memory() in sysinfo v0.27.8 (downgrading at #1775) also returns Byte

Copy link
Contributor

@sug0 sug0 left a comment

Choose a reason for hiding this comment

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

nice find! lgtm

Fraccaman added a commit that referenced this pull request Aug 11, 2023
* origin/yuji/fix-available-memory:
  add changelog
  fix available_memory
@Fraccaman Fraccaman mentioned this pull request Aug 11, 2023
Fraccaman added a commit that referenced this pull request Aug 13, 2023
* origin/yuji/fix-available-memory:
  add changelog
  fix available_memory
@Fraccaman Fraccaman merged commit 4673da5 into main Aug 14, 2023
12 checks passed
@Fraccaman Fraccaman deleted the yuji/fix-available-memory branch August 14, 2023 09:53
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.

None yet

4 participants