Slackbot
09/01/2022, 8:49 PMGian Merlino
09/01/2022, 11:24 PMGian Merlino
09/01/2022, 11:25 PMGian Merlino
09/01/2022, 11:25 PMMichael Kutz
09/02/2022, 6:12 AMjvmMaxDirectMemorySize: 3G
jvmMemory: '1G'
runtime:
bufferSizeBytes: 100MiB
processingThreads: 4
httpThreads: 150
cacheSizeBytes: 256MiB
and broker config:
jvmMaxDirectMemorySize: 2G
jvmMemory: '2G'
runtime:
bufferSizeBytes: 100MiB
numConnections: 60
processingThreads: 2
httpThreads: 70
and I see that the scan times spike to 1.5 seconds, the scan pending is very low now, and the CPU usage is also low.
The query/cpu/time is quite high, 160ms. Not sure whether it's bad.
What more can I look at to understand the bottleneck?Michael Kutz
09/02/2022, 6:16 AMGian Merlino
09/02/2022, 3:14 PMIt sounds weird that 75 small segments are so slowthis is mainly due to per-segment overheads: each segment has its own dictionary, indexes, etc, & it's generally faster to amortize this stuff across multiple segments
I suppose it needs to lock the segments I want to compact. Is it possible to keep the compaction running in parallel to the supervisor?compaction and active ingestion do indeed mutually lock out: so, generally, when using auto-compaction people will use the
skipOffsetFromLatest config such that they don't run for the same time ranges
when doing a manual compaction just for testing purposes, generally I suspend the supervisor while compacting to keep things simple (& then use skipOffsetFromLatest in production)
What more can I look at to understand the bottleneck?to analyze bottlenecks i like to use flame graphs: https://support.imply.io/hc/en-us/articles/360033747953-Profiling-Druid-queries-using-flame-graphs if you capture these on your Broker and Historical, feel free to post them here with your query and we can see if we have additional suggestions
One more thing, we are doing some sub-querying to group by some columns.this may be relevant, if your subqueries are returning larger amounts of results, that can create a bottleneck (as all subquery results need to be written into merge buffers and then sent out to the Broker) if you're in this situation, you could potentially benefit from more merge buffers, or from new option in 24.0 (not out yet! but soon š) added here: https://github.com/apache/druid/pull/12513 (
mergeThreadLocal). each of these things targets different bottlenecks, so the thing that would benefit you the most could be learned from the query + flame graphsGian Merlino
09/02/2022, 3:14 PMMichael Kutz
09/03/2022, 5:18 AMDidip Kerabat
09/03/2022, 6:42 PM