Hi Everyone We need help to adjust runtime and mem...
# troubleshooting
r
Hi Everyone We need help to adjust runtime and memory parameters for historical nodes. We are running historical nodes on AWS i7ie.2xlarge (64GB RAM + 5TB HDD) instances. Current historical runtime.properties:
Copy code
# HTTP server threads
druid.server.http.numThreads=41

# Processing threads and buffers
druid.processing.buffer.sizeBytes=536870912 #0.5GB
druid.processing.numThreads=7
druid.processing.numMergeBuffers=2

# Segment storage
druid.segmentCache.locations=[{"path":"/data/druid/segment-cache","maxSize":5000000000000}]
druid.server.maxSize=5000000000000 #5TB

# Query cache
# For performance reasons, QueryCache is enabled on Historical nodes instead of Brokers
druid.historical.cache.useCache=true
druid.historical.cache.populateCache=true
druid.cache.type=caffeine
druid.cache.sizeInBytes=8589934592 #8.5GB
druid.segmentCache.numLoadingThreads=5
druid.segmentCache.numBootstrapThreads=5
jvm:
Copy code
-server
-Xms20g
-Xmx20g
-XX:+UseG1GC
-XX:InitiatingHeapOccupancyPercent=40
-XX:+ExplicitGCInvokesConcurrent
-XX:+HeapDumpOnOutOfMemoryError
-XX:HeapDumpPath=/opt/apche_druid/heapdumps
-XX:+PrintGCDetails
-XX:+PrintGCDateStamps
-XX:+PrintGCApplicationStoppedTime
-XX:MaxDirectMemorySize=30g
Using these settings above historical node crashes from time to time with OOM: # There is insufficient memory for the Java Runtime Environment to continue. # Native memory allocation (mmap) failed to map 65536 bytes for committing reserved memory. and eventually getting OutOfMemory: Meatspace error There is no proper documentation to configure the memory settings for druid historical. Can someone please suggest the recommended configuration for i7ie.2xlarge historical instance type?
j
Hi Rajesh, Can you monitor the Clarity metric sys/mem/free to see if there are times when the memory dips, or if it is just a gradual reduction until you run out? Are you running MM and tasks on these same nodes? -- John
k
I think the memory part of this message often causes confusion (it's not actually a Java memory issue). Have a look at https://druid.apache.org/docs/latest/operations/basic-cluster-tuning#max_map_count - if you have more than 65k segments you will need to raise your
vm.max_map_count
above the default of 65535
r
Thanks @John Kowtko and @Kyle Hoondert, raising vm.max_map_count to 262144 resolved the issue.
@John Kowtko MM and tasks are running on same nodes.
But, how do we calculate the value for this parameter?
is it directly proportional to segment count/historical node? what is the ideal value? setting higher value will have any other implications on memory/performance?