Hi All, In some of the MSQ ingestion jobs, the Que...
# general
a
Hi All, In some of the MSQ ingestion jobs, the Query Controller is going OOM. Below is the last few lines of the log from the Query Controller:
Query[...] sending out partition boundaries for stage 0 for workers {0, 1, 2, 3}
Query[...] starting 4 workers for stage 1.
Terminating due to java.lang.OutOfMemoryError: Java heap space
There are 5 workers in total for the MSQ job - 1 controller & 4 workers. The heap space allocated is 2GB for each worker along with a direct memory of 500MB. What does the Query Controller keep in memory that would fill up the entire 2GB? Would it help if the number of workers is increased or is the solution only to increase the heap size of each worker? Thanks, AR
Majority of the MSQ ingestion jobs don't have much data so increasing the JVM heap size to >2GB for each worker would be a waste. Is there any way to dynamically change the JVM memory size of the workers when submitting the MSQ job? If not, can we specify -Xms1g & -Xmx3g for the peon? Currently we specify the same value (2g) for both Xms & Xmx. Thanks, AR.
k
You should be able to control this in the
context
Copy code
"context":{
    "druid.indexer.runner.javaOptsArray": ["-XX:MaxDirectMemorySize=10g", "-Xms2g","-Xmx2g"]
}
a
Thanks Kyle. I will try setting it in the context and check. Also, can we set -Xms1g -Xmx3g for the peon? Do both of them have to be set to same value?
k
you would most likely have a big data sketch
Are the partition keys jumbo
or lot of keys in an interval
Then you can run into this issue
Please file a github ticket with the heap dump
a
Hi Karan, There are no data sketches at all. We are trying to aggregate at daily level. Around 875K records in total. But there are a lot of columns - ~72 columns. And some of them are arrays. Thanks, AR.
k
There are data sketches used for partition sizes internally by MSQ for partition boundary calculation. Like I said, we would need the heapdump to help further.
a
We are seeing this issue only in PROD. I will check how to get the heap dump out from there. But is it ok to set "-Xms1g -Xmx3g" for the peon? We want to avoid hitting the OOM suddenly but also don't want to allocate too much memory for the other tasks. Thanks, AR.