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

Tune RocksDB memory usage #1486

Closed
teor2345 opened this issue Dec 9, 2020 · 5 comments
Closed

Tune RocksDB memory usage #1486

teor2345 opened this issue Dec 9, 2020 · 5 comments
Labels
C-bug Category: This is a bug

Comments

@teor2345
Copy link
Contributor

teor2345 commented Dec 9, 2020

Analysis

We think RocksDB is the major Zebra memory user.

Here is the RocksDB memory tuning guide:
https://github.com/facebook/rocksdb/wiki/Memory-usage-in-RocksDB

We probably want to add sprout and sapling anchors, and finish transaction validation, before we try to tune memory. Those changes will increase the database size, and change data access patterns.

Unbounded block queues can also use a lot of memory, see #1389

Version

v1.0.0-alpha.0

Platform

Unknown

Description

Zebra uses 4.3 GB, but zcashd uses 1.5 GB of RAM.

@teor2345 teor2345 added C-bug Category: This is a bug S-needs-triage Status: A bug report needs triage labels Dec 9, 2020
@rex4539
Copy link
Contributor

rex4539 commented Dec 9, 2020

I would argue that zebrad uses less memory than zcashd.

Screen Shot 2020-12-09 at 11 10 06

@teor2345
Copy link
Contributor Author

zebrad and zcashd memory usage will depend on:

  • what they are each doing at the time they are measured
  • how they are each configured
  • network speed
  • open files limit (changes RocksDB memory usage)
  • the OS
  • debug/release builds
  • missing checks and features in Zebra

So different users will probably get different measurements.

@mpguerra
Copy link
Contributor

Do we want to investigate this further or close it out for now?

@mpguerra mpguerra removed the S-needs-triage Status: A bug report needs triage label Dec 14, 2020
@teor2345
Copy link
Contributor Author

We probably want to add sprout and sapling anchors, and finish transaction validation, before we try to tune memory. Those changes will increase the database size, and change data access patterns.

I don't think we can do anything about this issue right now.

@teor2345
Copy link
Contributor Author

PR #1523 will help us monitor Zebra's memory usage over time, in a consistent environment.

@teor2345 teor2345 changed the title Zebra uses more memory than zcashd Tune RocksDB memory usage Jan 11, 2021
@teor2345 teor2345 mentioned this issue Jan 13, 2021
44 tasks
@teor2345 teor2345 closed this as completed Jan 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug
Projects
None yet
Development

No branches or pull requests

3 participants