<@U078Y59KC3B> What would you recommend for the fl...
# ask-ai
s
@RunLLM What would you recommend for the flag values of
-Xms
,
-Xmx
and
-XX:MaxDirectMemorySize
for running Pulsar Broker on 8GB RAM instance?
r
For an 8GB RAM instance, set
-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.
s
@RunLLM what are the recommended set of flags to set via
PULSAR_GC
?
r
The recommended
PULSAR_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.