mirror of https://github.com/milvus-io/milvus.git
Add compaction worker max parallel config item (#25834)
Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>pull/25855/head
parent
d92aac951a
commit
37636b2f4d
|
@ -431,7 +431,8 @@ func setResult(result *datapb.CompactionResult) compactionTaskOpt {
|
|||
|
||||
// 0.5*min(8, NumCPU/2)
|
||||
func calculateParallel() int {
|
||||
return 2
|
||||
// TODO after node memory management enabled, use this config as hard limit
|
||||
return Params.DataCoordCfg.CompactionWorkerParalleTasks.GetAsInt()
|
||||
//cores := runtime.NumCPU()
|
||||
//if cores < 16 {
|
||||
//return 4
|
||||
|
|
|
@ -1921,6 +1921,7 @@ type dataCoordConfig struct {
|
|||
|
||||
CompactionRPCTimeout ParamItem `refreshable:"true"`
|
||||
CompactionMaxParallelTasks ParamItem `refreshable:"true"`
|
||||
CompactionWorkerParalleTasks ParamItem `refreshable:"true"`
|
||||
MinSegmentToMerge ParamItem `refreshable:"true"`
|
||||
MaxSegmentToMerge ParamItem `refreshable:"true"`
|
||||
SegmentSmallProportion ParamItem `refreshable:"true"`
|
||||
|
@ -2093,6 +2094,14 @@ the number of binlog file reaches to max value.`,
|
|||
}
|
||||
p.CompactionMaxParallelTasks.Init(base.mgr)
|
||||
|
||||
p.CompactionWorkerParalleTasks = ParamItem{
|
||||
Key: "dataCoord.compaction.workerMaxParallelTaskNum",
|
||||
Version: "2.3.0",
|
||||
DefaultValue: "2",
|
||||
Export: true,
|
||||
}
|
||||
p.CompactionWorkerParalleTasks.Init(base.mgr)
|
||||
|
||||
p.MinSegmentToMerge = ParamItem{
|
||||
Key: "dataCoord.compaction.min.segment",
|
||||
Version: "2.0.0",
|
||||
|
|
Loading…
Reference in New Issue