-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Conversation
Add Accounts::has_accounts function for hash_internal_state calculation.
- Fix format check warnings
Also reduce some code duplication with cleanup_dirs fn.
|
||
bank | ||
} | ||
|
||
/// Create a new bank that points to an immutable checkpoint of another bank. | ||
/// TODO: remove me in favor of _and_id(), id should not be an assumed value | ||
pub fn new_from_parent(parent: &Arc<Bank>) -> Self { | ||
static BANK_ID: AtomicUsize = AtomicUsize::new(1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this because ID figures in the path?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well it figures in the account set, so it has to be unique because the accounts store is shared between all banks in the system.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It kind of hijacks this id, which was one of my concerns. Does it ruin it for what you wanted to do with it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only added the += 1 stuff for tests. all other callers are calling new_from_parent_with_id()...
…a-labs#2952) (solana-labs#3005) Fix: Corrected the derivation command format (solana-labs#2952) (cherry picked from commit d2cc71f) Co-authored-by: Asten <[email protected]>
Problem
The cost of RAM is much higher that adds up to the cost of operating a full node (16GB of RAM is the same cost as 500GB of high speed NVMe SSDs). Look into ways to reduce the RAM usage by moving some of the data onto SSDs and have them loaded / stored on demand.
Summary of Changes
Implements #2769
To help reduce RAM usage of the nodes, persist storage of accounts across NVMe SSDs and load / store them on a need basis from SSDs.
Store account information across two files: Index and Data
Index: Contains offset into data
Data: Contains the length followed by the account data
The accounts are split across NVMe SSDs using the pubkey as the key.
Fixes: #2499