Suhas Karanth
08/18/2025, 1:37 PM-Xms, -Xmx and -XX:MaxDirectMemorySize for running Pulsar Broker on 8GB RAM instance?RunLLM
08/18/2025, 1:37 PM-Xms and -Xmx (JVM heap size) to 4-6GB, and -XX:MaxDirectMemorySize (direct memory) to 2GB. This balances heap and direct memory, leaving some RAM for OS and other processes. Example: -Xms4g -Xmx4g -XX:MaxDirectMemorySize=2g or up to -Xms6g -Xmx6g -XX:MaxDirectMemorySize=2g if the broker is the main workload. Adjust based on observed memory pressure and workload needs.
According to StreamNative documentation and Pulsar docs, this allocation is typical for an 8GB broker node. For more details or tuning guidance, let me know.
Sources:
- StreamNative: CPU and Memory Resources
- Pulsar docs 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.Suhas Karanth
08/19/2025, 4:33 AMPULSAR_GC?RunLLM
08/19/2025, 4:33 AMPULSAR_GC flags for Pulsar Broker (Java 17+) are: -XX:+UseZGC -XX:+PerfDisableSharedMem -XX:+AlwaysPreTouch. ZGC is preferred for low latency and scalability, and these flags optimize startup and avoid GC pause due to performance data writes. For older Java versions or if ZGC is unavailable, use -XX:+UseG1GC and related G1GC tuning flags.
For details and rationale, see Pulsar PR #15762. Would you like a breakdown of each flag and its effect?
Sources:
- Pulsar PR #15762 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.