Skip to content

Commit

Permalink
set ideal storage size correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffwashington committed Sep 3, 2024
1 parent 14ee3f4 commit ea5653f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion accounts-db/src/ancient_append_vecs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ impl AccountsDb {
.saturating_sub(randoms as usize);
// ideal storage size is total alive bytes of ancient storages / half of max ancient slots
tuning.ideal_storage_size = NonZeroU64::new(
(infos.total_alive_bytes.0 / tuning.max_ancient_slots.max(1) as u64 / 2).max(1_000_000),
(infos.total_alive_bytes.0 / tuning.max_ancient_slots.max(1) as u64 * 2).max(1_000_000),
)
.unwrap();
self.shrink_ancient_stats
Expand Down

0 comments on commit ea5653f

Please sign in to comment.