Yesh Balachander
10/13/2024, 10:14 PMdruid.server.http.numThreads=66 (MAX(10, (vCPUs * 17) / 16 + 2) + 30)
druid.broker.http.numConnections=45
Historical
Count: 3 per tier | vCPUs: 64 | Tiers: 3
druid.server.http.numThreads=100 (MAX(10, (vCPUs * 17) / 16 + 2) + 30)
druid.processing.numThreads=63 (vCPUs - 1)
The numConnections on brokers is set such that each historical can handle all incoming connections from brokers (2 * 45). Also, we haven't setup broker tiering.
When we test on loads much above 150 QPS, we are noticing increase in queue size - which I think is expected. However the CPU utilization on the broker and Historicals are less than 50%. This makes me think the resources are under utilized.
Questions
If we have to scale brokers for future higher query loads
1. Should we start by increasing broker numConnections and historical numThreads without changing the instance type? If we do this, we will deviate from the formula suggested and what could be the implications?
2. Should we add a new broker node? This forces us to vertically scale each Historicals to ensure that each node can accept all incoming broker connections. Is this a right way to think about this or is it okay for Historicals to have fewer server threads than all incoming connections?
Considering the CPU utilization is low on Historicals, I think we should do (1) till we hit an optimal CPU utilization. I also feel (2) is very restrictive. Would be helpful to hear your thoughts.
We also understand that making queries faster is also essential to improve QPS. We are also working on that but this question was specific to scaling brokers.Yesh Balachander
10/16/2024, 5:40 PMBenjamin Hopp
10/16/2024, 5:59 PMYesh Balachander
10/16/2024, 6:46 PMmergeBuffer/pendingRequests metric doesn't seem to show up despite enabling the QueryCountStatsMonitor module. Are there other symptoms for mergeBuffer contention?Benjamin Hopp
10/16/2024, 7:05 PMjetty/threadPool/queueSize metric jump.Benjamin Hopp
10/16/2024, 7:05 PMYesh Balachander
10/16/2024, 8:18 PMyou probably don't need to increase the http.numThreads on the historicals unless you see theThis makes sense. Will experiment on this. So it looks like Thanks We are on v 30.0.0. We do see the other metrics published bymetric jump.jetty/threadPool/queueSize
QueryCountStatsMonitor