https://questdb.io logo
Title
k

Kurt

05/24/2023, 11:37 PM
hey I'm struggling to find documentation around setting java heap settings, specifically when running the questdb container, can anyone point me at an example/docs?
n

Nicolas Hourcard

05/25/2023, 8:51 AM
@Jaromir Hamala could you steer @Kurt to the right docs? thanks!
j

Jaromir Hamala

05/25/2023, 9:07 AM
Sure thing! Hello Kurt, are you interested in a guide how to size your heap or how to actually set a Java heap inside a container to a specific value? I’m afraid we do not have a step-by-step guide to follow. QuestDB is designed to be extremely conservative with on-heap memory allocations and it usually does not require heap tuning. Most of our memory allocations are outside of the Java heap. I see we do not set heap size explicitly in our docker container hence it relies on JVM ergonomics. Are you having issues with Java heap?
k

Kurt

05/25/2023, 10:25 AM
potentially having issues with heap - wanted to tune as part of debugging. nevermind then
j

Jaromir Hamala

05/25/2023, 10:36 AM
can you please be more specific? are you observing slowdowns? or OOM exceptions? or perhaps suspicious metrics?
k

Kurt

05/25/2023, 10:37 AM
OOMs
b

Bolek Ziobrowski

05/25/2023, 10:44 AM
Could you share crash dump file or specific error message ?
j

Jaromir Hamala

05/25/2023, 10:48 AM
also: if you want to experiment with explicit heap sizing then you can pass arguments to your container - our
docker-entrypoint-sh
will pass them to JVM. so you can try things like
docker run questdb/questdb -Xmx5g -m io.questdb/io.questdb.ServerMain -d /var/lib/questdb
You could add something like `
-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/some/mount/dir/from/your/host"
to allow further investigation. You could also consider enabling the verbose GC log - to see what the heap usage pattern look like.
k

Kurt

05/25/2023, 10:50 AM
thanks - i can't get it right now but i may have another look tomorrow
j

Jaromir Hamala

05/25/2023, 10:57 AM
I created https://github.com/questdb/questdb/issues/3401 to make heap (and other) changes simpler. so thank you for raising this!