Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Persistent account store #2952

Closed
wants to merge 10 commits into from
Closed

Conversation

sakridge
Copy link
Contributor

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


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);
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor Author

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?

Copy link
Contributor

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()...

@sakridge sakridge closed this Feb 27, 2019
behzadnouri pushed a commit to behzadnouri/solana that referenced this pull request Sep 27, 2024
yihau pushed a commit to yihau/solana that referenced this pull request Sep 28, 2024
…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]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants