From 68782de006cc0128c2b9c46ef8d4ec3c22c35ce8 Mon Sep 17 00:00:00 2001 From: jeff washington Date: Mon, 9 Oct 2023 16:35:32 -0500 Subject: [PATCH 1/2] stop padding new append vecs to page size --- accounts-db/src/accounts_db.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/accounts-db/src/accounts_db.rs b/accounts-db/src/accounts_db.rs index 4291cdfe9a24ad..d0290a4d6962ac 100644 --- a/accounts-db/src/accounts_db.rs +++ b/accounts-db/src/accounts_db.rs @@ -5733,11 +5733,7 @@ impl AccountsDb { .create_store_count .fetch_add(1, Ordering::Relaxed); let path_index = thread_rng().gen_range(0..paths.len()); - let store = Arc::new(self.new_storage_entry( - slot, - Path::new(&paths[path_index]), - Self::page_align(size), - )); + let store = Arc::new(self.new_storage_entry(slot, Path::new(&paths[path_index]), size)); debug!( "creating store: {} slot: {} len: {} size: {} from: {} path: {:?}", From cec2e55e38a67c83747576f06741abbd69db3c6c Mon Sep 17 00:00:00 2001 From: jeff washington Date: Mon, 9 Oct 2023 19:14:36 -0500 Subject: [PATCH 2/2] for creating test accounts, allocate larger like we used to --- accounts-db/src/accounts_db.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/accounts-db/src/accounts_db.rs b/accounts-db/src/accounts_db.rs index d0290a4d6962ac..d31f9a04222e68 100644 --- a/accounts-db/src/accounts_db.rs +++ b/accounts-db/src/accounts_db.rs @@ -9907,7 +9907,7 @@ pub mod test_utils { // allocate an append vec for this slot that can hold all the test accounts. This prevents us from creating more than 1 append vec for this slot. _ = accounts.accounts_db.create_and_insert_store( slot, - bytes_required as u64, + AccountsDb::page_align(bytes_required as u64), "create_test_accounts", ); }