make pruned_bank channel unbonded.
In kin-sim, we found that bounded channel causes halt for account background services. As the number of accounts grows, the time for pruning and cleaning increases, which would leads to longer intervals between the pruning of deaded bank slots. With 1.7B accounts, we will exceed the 10K bounded channel threshold that causes halt of account back ground services. Without pruning, the node will eventually run out of memory.
This commit is contained in:
parent
59d61ee094
commit
5b64107626
|
@ -1477,7 +1477,6 @@ fn load_blockstore(
|
|||
// is processing the dropped banks from the `pruned_banks_receiver` channel.
|
||||
let pruned_banks_receiver =
|
||||
AccountsBackgroundService::setup_bank_drop_callback(bank_forks.clone());
|
||||
|
||||
{
|
||||
let hard_forks: Vec<_> = bank_forks
|
||||
.read()
|
||||
|
|
|
@ -53,8 +53,6 @@ pub type DroppedSlotsReceiver = Receiver<(Slot, BankId)>;
|
|||
|
||||
/// interval to report bank_drop queue events: 60s
|
||||
const BANK_DROP_SIGNAL_CHANNEL_REPORT_INTERVAL: u64 = 60_000;
|
||||
/// maximum drop bank signal queue length
|
||||
const MAX_DROP_BANK_SIGNAL_QUEUE_SIZE: usize = 10_000;
|
||||
|
||||
/// Bank drop signal queue events
|
||||
#[allow(dead_code)]
|
||||
|
@ -609,8 +607,7 @@ impl AccountsBackgroundService {
|
|||
pub fn setup_bank_drop_callback(bank_forks: Arc<RwLock<BankForks>>) -> DroppedSlotsReceiver {
|
||||
assert_eq!(bank_forks.read().unwrap().banks().len(), 1);
|
||||
|
||||
let (pruned_banks_sender, pruned_banks_receiver) =
|
||||
crossbeam_channel::bounded(MAX_DROP_BANK_SIGNAL_QUEUE_SIZE);
|
||||
let (pruned_banks_sender, pruned_banks_receiver) = crossbeam_channel::unbounded();
|
||||
{
|
||||
let root_bank = bank_forks.read().unwrap().root_bank();
|
||||
root_bank.set_callback(Some(Box::new(
|
||||
|
|
Loading…
Reference in New Issue