Stanislaw Makarawec
10/09/2025, 12:54 PMRunLLM
10/09/2025, 12:54 PMStanislaw Makarawec
10/09/2025, 1:01 PMRunLLM
10/09/2025, 1:01 PMStanislaw Makarawec
10/09/2025, 1:05 PMRunLLM
10/09/2025, 1:05 PMStanislaw Makarawec
10/09/2025, 1:20 PMRunLLM
10/09/2025, 1:20 PMStanislaw Makarawec
10/09/2025, 1:22 PMRunLLM
10/09/2025, 1:22 PMStanislaw Makarawec
10/09/2025, 1:26 PMRunLLM
10/09/2025, 1:26 PMbookkeeperClientHealthCheckErrorThresholdPerInterval (number of errors before quarantine), bookkeeperClientHealthCheckQuarantineTimeInSeconds (quarantine duration), and bookkeeperClientTimeoutInSeconds (timeout for BookKeeper operations). These are set in broker.conf as described in ServiceConfiguration.java. Lowering the error threshold or quarantine time can make recovery faster, but may increase risk if a bookie is truly unhealthy.
For a bookie handling 50,000 messages/sec and 8 MB/s throughput, the hardware recommendations suggest at least 4 vCPUs, 8 GB RAM, SSD journal (256 GB), and 2 TB HDD for ledgers. This matches the recommended config for high-throughput clusters. Ensure your network and disk I/O can sustain the required throughput.
Would you like a sample configuration file or more detail on tuning these parameters?
Sources:
- ServiceConfiguration.java
- Pulsar hardware recommendations 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.Stanislaw Makarawec
10/09/2025, 1:32 PMRunLLM
10/09/2025, 1:32 PM-Xms and -Xmx to 4-8g (or higher if RAM allows), and set -XX:MaxDirectMemorySize to at least 4g. Use G1GC: -XX:+UseG1GC. See StreamNative JVM tuning guide.
For BookKeeper, in bookkeeper.conf, set:
- dbStorage_writeCacheMaxSizeMb and dbStorage_readAheadCacheMaxSizeMb to 1024 (1GB) or higher if RAM allows.
- dbStorage_rocksDB_blockCacheSize to 10% of direct memory (e.g., 409600000 for 4GB).
- dbStorage_rocksDB_writeBufferSizeMB to 128 or 256.
- dbStorage_rocksDB_sstSizeInMB to 128.
- dbStorage_rocksDB_numLevels to 6.
- dbStorage_rocksDB_numFilesInLevel0 to 8.
- dbStorage_rocksDB_maxSizeInLevel1MB to 512.
These values are based on defaults and tuning advice in BookKeeper issue 3507, Pulsar PR 23178, and StreamNative JVM docs. Adjust upward if you have more RAM and monitor for GC or memory pressure. Would you like a sample config file or more details on monitoring?
Sources:
- BookKeeper issue 3507
- Pulsar PR 23178 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.Stanislaw Makarawec
10/09/2025, 1:52 PMRunLLM
10/09/2025, 1:52 PMStanislaw Makarawec
10/09/2025, 1:55 PMRunLLM
10/09/2025, 1:55 PM-Xms4g -Xmx4g (heap) and -XX:MaxDirectMemorySize=4g (direct memory), you need at least 8 GB RAM for the JVM process alone. However, you should add extra headroom (2–4 GB) for non-heap memory (e.g., code cache, thread stacks, native libraries, and RocksDB native memory), so a minimum of 10–12 GB RAM per bookie is recommended for stability, as also suggested in BookKeeper tuning discussions.
Non-heap memory includes direct memory, thread stacks, code cache, and native allocations (like RocksDB). If you use 4 GB heap and 4 GB direct memory, plan for at least 2–4 GB extra for these non-heap usages. Would you like a breakdown of each memory component?
Sources:
- BookKeeper tuning discussions 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.