Slackbot
06/29/2023, 7:03 AMJooHyukKim
06/29/2023, 7:31 AMJooHyukKim
06/29/2023, 7:34 AMSandip
06/29/2023, 7:43 AMLari Hotari
06/29/2023, 9:16 AM• Segment rollover period: basically, the segment rollover period is how often a new segment is created. Once a new segment is created, the old segment will be deleted. By default, this happens either when you have written 50,000 entries (messages) or have waited 240 minutes. You can tune this in your broker.
• Entry log rollover period: multiple ledgers in BookKeeper are interleaved into an entry log. In order for a ledger that has been deleted, the entry log must all be rolled over. The entry log rollover period is configurable but is purely based on the entry log size. For details, see here. Once the entry log is rolled over, the entry log can be garbage collected.
• Garbage collection interval: because entry logs have interleaved ledgers, to free up space, the entry logs need to be rewritten. The garbage collection interval is how often BookKeeper performs garbage collection. which is related to minor compaction and major compaction of entry logs. For details, see here.Bookkeeper compaction is described here: https://bookkeeper.apache.org/docs/getting-started/concepts#data-compaction There are multiple tunable parameters for rollover and multiple tunable parameters for BookKeeper compaction / garbage collection.
Muni Chada
06/29/2023, 2:54 PMmanagedLedgerMaxEntriesPerLedger=10000
managedLedgerMinLedgerRolloverTimeMinutes=5
managedLedgerMaxLedgerRolloverTimeMinutes=10
managedLedgerMaxSizePerLedgerMbytes=512
Or Throttle the compaction bytes rate to 10MB/s on bookkeeper.conf to get faster cleanup
isThrottleByBytes=true
compactionRateByBytes=10485760Shravan Narayan
06/29/2023, 8:01 PMIf you do not have any retention period and you never have much of a backlog, the upper limit for retained messages, which are acknowledged, equals the Pulsar segment rollover period + entry log rollover period + (garbage collection interval * garbage collection ratios).