Slackbot
02/27/2023, 7:39 AMBrandon Tan
02/27/2023, 7:41 AMBrandon Tan
02/27/2023, 7:43 AM宋考俊
02/27/2023, 7:45 AM宋考俊
02/27/2023, 7:46 AMBrandon Tan
02/27/2023, 7:54 AM宋考俊
02/27/2023, 9:46 AMJohn Kowtko
02/27/2023, 1:59 PMSergio Ferragut
02/27/2023, 7:52 PM宋考俊
02/28/2023, 6:10 AMBrandon Tan
02/28/2023, 6:38 AMIf replication is 1 you will need 20T across the 3 historicals, so like 6.66T / historical (20/3)宋考俊
02/28/2023, 6:45 AMSELECT * FROM table WHERE iri='xxx'
But it is pretty slow now, it takes 300 seconds to return the result. Now the historical pods are launched with 2 cores and 10G memory, does it make sense to increase the cpu and memory if I want to optimize the query time?Brandon Tan
02/28/2023, 6:50 AMiri with other commonly filtered dimensions
2. Are you using any emitters like Prometheus ( or Imply Clarity) to determine where the bottleneck is? If segment scanned time is >=250ms and < 500 ms, the historicals are ok in general
3. Broker-wise, you can check the wait time for query and the httpNumThreads availableSergio Ferragut
03/01/2023, 7:55 PMiri as @Brandon Tan suggests would be ideal in either case, if you are using SQL ingestion, this is a CLUSTERED BY iri . It can be specified as range partitioning in native batch ingestion under the partitionsSpec which will also reduce the segments to process when you use WHERE iri='xxx' . Without clustering/partitioning and no time filter, the query would need to process all 138,745 segments.
If you have 6 pods * 2 cores = 12 total for the historicals, this means that a maximum of 12 segments will be processing at any one time, and if each segment scan uses 250ms average, that means 138,745/12 = 2890 seconds.
Given that you are seeing 300 second response, some of my assumptions are wrong, perhaps you are filtering segments with time or the segment scan time is faster given that the automatic index on iri will likely quickly eliminate any segments that don't contain the value. The overhead of opening the segments to inspect them will still be at play though.
Let us know how it goes.Sergio Ferragut
03/01/2023, 8:03 PMpartitionsSpec in the tuningConfig for the job.Sergio Ferragut
03/01/2023, 8:06 PM