mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-06 17:18:35 +08:00
fix: Reduce task slot for standalone to 1/4 of normal datanode (#42808)
issue: #42129 --------- Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
This commit is contained in:
parent
e15926b40c
commit
8f8ffe9989
@ -98,7 +98,7 @@ func CalculateNodeSlots() int64 {
|
||||
|
||||
totalSlot := max(slot, 1) * paramtable.Get().DataNodeCfg.WorkerSlotUnit.GetAsInt64() * paramtable.Get().DataNodeCfg.BuildParallel.GetAsInt64()
|
||||
if paramtable.GetRole() == typeutil.StandaloneRole {
|
||||
totalSlot = max(totalSlot/2, 1)
|
||||
totalSlot = max(int64(float64(totalSlot)*paramtable.Get().DataNodeCfg.StandaloneSlotRatio.GetAsFloat()), 1)
|
||||
}
|
||||
return totalSlot
|
||||
}
|
||||
|
||||
@ -5191,7 +5191,8 @@ type dataNodeConfig struct {
|
||||
// index services config
|
||||
BuildParallel ParamItem `refreshable:"false"`
|
||||
|
||||
WorkerSlotUnit ParamItem `refreshable:"true"`
|
||||
WorkerSlotUnit ParamItem `refreshable:"true"`
|
||||
StandaloneSlotRatio ParamItem `refreshable:"false"`
|
||||
}
|
||||
|
||||
func (p *dataNodeConfig) init(base *BaseTable) {
|
||||
@ -5618,6 +5619,14 @@ if this parameter <= 0, will set it as 10`,
|
||||
Doc: "Indicates how many slots each worker occupies per 2c8g",
|
||||
}
|
||||
p.WorkerSlotUnit.Init(base.mgr)
|
||||
|
||||
p.StandaloneSlotRatio = ParamItem{
|
||||
Key: "dataNode.standaloneSlotFactor",
|
||||
Version: "2.5.14",
|
||||
DefaultValue: "0.25",
|
||||
Doc: "Offline task slot ratio in standalone mode",
|
||||
}
|
||||
p.StandaloneSlotRatio.Init(base.mgr)
|
||||
}
|
||||
|
||||
type streamingConfig struct {
|
||||
|
||||
@ -625,6 +625,8 @@ func TestComponentParam(t *testing.T) {
|
||||
assert.Equal(t, int64(2), Params.ClusteringCompactionWorkerPoolSize.GetAsInt64())
|
||||
|
||||
assert.Equal(t, 2, Params.BloomFilterApplyParallelFactor.GetAsInt())
|
||||
assert.Equal(t, 16, Params.WorkerSlotUnit.GetAsInt())
|
||||
assert.Equal(t, 0.25, Params.StandaloneSlotRatio.GetAsFloat())
|
||||
})
|
||||
|
||||
t.Run("test streamingConfig", func(t *testing.T) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user