<@U078Y59KC3B> what can I do to reduce the memory ...
# ask-ai
s
@RunLLM what can I do to reduce the memory consumption of a standalone Pulsar docker container? I have specified
PULSAR_MEM=-Xms128m -Xmx128m -XX:MaxDirectMemorySize=128m
already but the container is still getting killed by docker with code 137
r
Setting
PULSAR_MEM=-Xms128m -Xmx128m -XX:MaxDirectMemorySize=128m
limits the JVM heap and direct memory, but Pulsar and its dependencies (like RocksDB, BookKeeper, and Zookeeper) may still require more memory, especially for metadata and off-heap allocations. Also, Docker may kill the container with code 137 (OOM) if the total memory usage (including all processes and off-heap) exceeds the container's memory limit. You can further reduce memory usage by lowering the JVM heap and direct memory, but going below 128m is not recommended for Pulsar stability. Consider increasing the container's memory limit if possible, or try disabling unnecessary services (e.g., use
-nss -nfw
flags to skip functions and web workers) to reduce resource usage. Additionally, ensure you are not running other memory-intensive tools in the same container, and check for any memory requests/limits set at the Docker or Kubernetes level. For more details, see Pulsar Docker memory settings and related troubleshooting. Would you like more detail on tuning specific Pulsar components or JVM options? Sources: - Pulsar Docker memory settings - related troubleshooting 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.