This message was deleted.
# general
s
This message was deleted.
j
Hi Guillaume, Compaction is limited to using only a portion of the worker task slots available on the nodes ... I think the default is 10%. There is a parameter that allows you to adjust it ... looking for it now ...
g
I have configured those parameters
j
It should be able to run multiple compactions on the same datasource (different time chunks) simultaneously though ...
g
yes it is
but not "in between"
let's say I have 5 compaction tasks started at 06:00 because there are enough slots available
at 07:00, one completes, at 08:00 another one, etc.
it looks like there won't be any new compaction task started until ALL 5 are completed
j
I thought they were independent ... i.e. when a slot opens, a new job should be able to use it.
g
while I would expect to have all the time roughly 5 compact tasks running all the time
modulo "indexingperiod", which in our case is 10m
j
compactionTaskSlotRatio
is the parameter I was referring to ... I see it in Github but not in the published docs ...
g
"compactionTaskSlotRatio" : 0.6, "maxCompactionTaskSlots" : 225 yep it's tuned like that on our side
j
Then possible the subTasks are taking up the task slots. It is stated somewhere that once a task starts, if it needs more subtasks than there are slots available, it will still launch the subtasks. So for a while you will be oversubscribed on task slot usage. which means when some of the jobs complete, you still may be consuming all of the available task slots with the subtasks of the remaining jobs running. Can you monitor the "Services" tab to check the available task slots during this time?
g
they are freed properly
This is the status right now
s
which version of Druid are you running? Starting in Druid 23, you can configure the compact segments duty to run more frequently than other indexing duties - https://github.com/apache/druid/pull/12263
This will make it so that Druid checks for available capacity for compaction more frequently.
Druid does not necessarily know the actual capacity needed for a compaction task, so it assumes each compact task will take the
maxNumConcurrentSubtasks
configured in the compaction spec. This is another area for cluster capacity optimization, if you know compaction tasks do not need as many sub tasks as the configured maxNumConcurrentSubtasks, then reducing that setting will allow more compaction jobs to run concurrently.
g
Yep the concept is clear, and we've tuned the parameter accordingly. It's really about the synchronous start of all tasks. Since they don't have the same duration, when the fastest compact task is completed, a new one should be started, and slowly they should all no longer be in sync. But I do see them always with the same start date, which makes me think that no new compaction tasks are started for a datasource as long as at least one is still running. And that doesn't seem right/efficient.
Anyway I'll open a github ticket for that
j
Hi Guillaume, others can confirm, but I believe the "Created time" for tasks is the time when the entry is added to the task table, not when the task actually starts ... for ingestion for example, the task will actually start when a worker slot opens up. We've seen this with ingestion task cycling for taskDuration ... so if you are making assumptions as to when tasks are starting -- or getting held up from starting -- based on those Created dates, that might be misleading.