-
Notifications
You must be signed in to change notification settings - Fork 68
[NodeStorage] Expose the ability to set custom rocksdb::Options #671
Comments
From reading rocksdb doc, I believe the memtable size for each column family is by default bounded to 64MB ( This jemalloc heap profile can be displayed fully in a new tab. It was taken for Having observability into the memtable sizes of individual rocksdb and column families could be useful in deciding an appropriate memtable size limit, as @gdanezis mentioned elsewhere. In the short term we can try limiting memtable size per db to e.g. 512MB, and make sure it reduces total memtable size across dbs in the common case. Longer term, I would like to understand better the rationale for using many rocksdb instances, instead of only relying on column families for isolation. Then maybe we can come up with a sensible way to limit total memory usage. |
Investigating out of curiosity instead, because the memory usage here is much less than the peaks we see on devnet e.g 40GB. I learned that in Sui, each struct deriving With MystenLabs/mysten-infra#109, At the current scale how column families are configured likely does not matter much, except when we want to set cross-DB or cross-CF limits. In future for read and write perf, we can try to group data read or written together in the same column families. |
@oxade would you be up, to close up the above issue, to porting MystenLabs/mysten-infra#110 to Narwhal once done? |
@huitseeker no problem. |
See this PR for one way we could do it. The previous approach allows configuring the options, but only in one place. Let me know thoughts folks. |
Great @oxade! I'm taking a look. Btw two things that I want to make a case for, maybe out of the scope of this issue and related PRs:
|
I understand your points. This simplification something I wanted to move toward but as @gdanezis pointed out, it compromises controllability which is higher priority right now. We can simplify after. But I'll let @gdanezis give his feedback.
Interesting. I think the |
Currently we open the NodeStorage database with None as options, which does not allow callers (like Sui) to set limits on the size of memtables. We should allow opening with custom DB Options:
narwhal/node/src/lib.rs
Lines 57 to 70 in 442d853
The text was updated successfully, but these errors were encountered: