sriramdas sivasai
09/29/2024, 6:39 AMAmatya Avadhanula
09/30/2024, 8:13 AMAmatya Avadhanula
09/30/2024, 8:16 AMJRob
09/30/2024, 3:02 PMsriramdas sivasai
10/03/2024, 3:38 PMJRob
10/03/2024, 7:11 PMtuningConfig
See also splitHintSpec and partitionsSpec in tuningConfig
If you have 10 hosts and plenty of available slots, I would use a config that looks something like this:
"tuningConfig" : {
"type": "index_parallel",
"maxNumConcurrentSubTasks": 10, // Max number of concurrent tasks. This must be > 1 to enable parallel indexing. Be careful not to over-allocate your available slots or you may block ingestion tasks.
"splitHintSpec": {
"type": "maxSize",
"maxSplitSize": 1073741824, // Default is 1GiB
"maxNumFiles": 1000 // Default is 1000
},
"partitionsSpec": {
"type": "dynamic", // Fastest strategy but has imperfect rollup.
"maxRowsPerSegment": 5000000, // Target segment sizes < 1 GiB. Default is 5000000
}
},
Phase 1: With 10 TiB to read; the first phase will create ~10,240 tasks and start by assigning the first 10 (up to maxNumConcurrentSubTasks) tasks to run in parallel and assign additional tasks to worker threads as they free up.
Phase 2: An estimate of how many rows will be created is established in phase 1. Assuming we end up with ~75 billion rows; the second phase will create ~15,000 tasks and will work as assigned similar to phase 1.
Since you have 15K segment files per day; I would strongly recommend a smaller segment granularity such as hour or even five_minute. Having ~50 segment files per 5 minutes will still have a nice split across your historical servers.
I'm unsure how changing your segment granularity from hour to day results in fewer segments, unless you weren't compacting your data until now or are using rollup with queryGranularity=day.
Regarding performance; typically fewer files means less disk I/O and therefore better performance.
Depending on your use case, if you can rollup the data this could result in significant space and query time savings. Be aware this truncates your timestamp (__time field) and comes with other considerations on how to roll up your metrics. For ideal rollup, I would set segmentGranularity >= queryGranularity
Good luck and happy tuning!