sindhushree
10/22/2025, 4:34 AMRunLLM
10/22/2025, 4:35 AMjournalMaxSizeMB for journals and the total size of ledger volumes for ledgers. These sizes can be monitored and managed, but there is no built-in "calculator" utility mentioned in the documentation or code references provided.
To estimate or monitor these sizes, you typically review BookKeeper configuration and use monitoring tools or commands to check current usage. For example, you can use the pulsarctl bookkeeper bookie list-disk-file command to list journal and ledger files and their sizes on disk, but this is for inspection, not calculation or estimation in advance. Would you like more detail on how to monitor or configure these sizes in practice?
Sources:
- BookKeeper data management concepts
- Pulsar architecture: managed ledgers and journals 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.sindhushree
10/22/2025, 4:46 AMsindhushree
10/22/2025, 4:46 AMRunLLM
10/22/2025, 4:46 AMjournalMaxSizeMB
- Description: Sets the maximum size (in MB) of a single journal file. When this size is reached, a new journal file is created.
- Location: bookkeeper.conf
- Example:
journalMaxSizeMB=2048
This sets each journal file to a maximum of 2GB.
Ledger Size
- Parameter: entryLogFilePreAllocationSizeMB and disk size for ledger directories
- Description: Controls the pre-allocation size for entry log files (where ledger entries are stored). The total ledger size is determined by the available disk space in the ledger directories.
- Location: bookkeeper.conf
- Example:
entryLogFilePreAllocationSizeMB=2048
This pre-allocates 2GB for each new entry log file.
---
*2. Monitoring Ledger and Journal Sizes*
A. Using BookKeeper Shell
You can use the BookKeeper shell commands to inspect the current state of ledgers and journals.
- List all ledgers:
bin/bookkeeper shell listledgers
- Show disk usage:
bin/bookkeeper shell listdiskfiles
This will show you the sizes of journal and ledger files on disk.
B. Using Metrics
BookKeeper exposes metrics that can be scraped by Prometheus or viewed in Grafana:
- `bookie_ledgers_count`: Number of ledgers stored in the bookie.
- `bookie_entries_count`: Number of entries stored in the bookie.
- `bookie_journal_JOURNAL_SYNC_count`: Number of journal fsync operations.
- `bookie_write_cache_size`: Write cache size in bytes.
More details: BookKeeper Metrics Reference
C. File System Inspection
You can also directly inspect the disk usage on the bookie hosts:
du -sh /path/to/bookkeeper/journal
du -sh /path/to/bookkeeper/ledgersRunLLM
10/22/2025, 4:46 AM