mirror of https://github.com/milvus-io/milvus.git
set knowhere thread pool size in index node (#25804)
Signed-off-by: cqy123456 <qianya.cheng@zilliz.com>pull/25850/head
parent
eecf229b59
commit
0f3350ded4
|
@ -17,11 +17,12 @@
|
||||||
package indexnode
|
package indexnode
|
||||||
|
|
||||||
/*
|
/*
|
||||||
#cgo pkg-config: milvus_common milvus_indexbuilder
|
#cgo pkg-config: milvus_common milvus_indexbuilder milvus_segcore
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "common/init_c.h"
|
#include "common/init_c.h"
|
||||||
|
#include "segcore/segcore_init_c.h"
|
||||||
#include "indexbuilder/init_c.h"
|
#include "indexbuilder/init_c.h"
|
||||||
*/
|
*/
|
||||||
import "C"
|
import "C"
|
||||||
|
@ -162,6 +163,9 @@ func (i *IndexNode) initSegcore() {
|
||||||
cCPUNum := C.int(hardware.GetCPUNum())
|
cCPUNum := C.int(hardware.GetCPUNum())
|
||||||
C.InitCpuNum(cCPUNum)
|
C.InitCpuNum(cCPUNum)
|
||||||
|
|
||||||
|
cKnowhereThreadPoolSize := C.uint32_t(hardware.GetCPUNum() * paramtable.DefaultKnowhereThreadPoolNumRatioInBuild)
|
||||||
|
C.SegcoreSetKnowhereThreadPoolNum(cKnowhereThreadPoolSize)
|
||||||
|
|
||||||
localDataRootPath := filepath.Join(Params.LocalStorageCfg.Path.GetValue(), typeutil.IndexNodeRole)
|
localDataRootPath := filepath.Join(Params.LocalStorageCfg.Path.GetValue(), typeutil.IndexNodeRole)
|
||||||
initcore.InitLocalChunkManager(localDataRootPath)
|
initcore.InitLocalChunkManager(localDataRootPath)
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,6 +47,7 @@ const (
|
||||||
DefaultLogFormat = "text"
|
DefaultLogFormat = "text"
|
||||||
DefaultLogLevelForBase = "debug"
|
DefaultLogLevelForBase = "debug"
|
||||||
DefaultRootPath = ""
|
DefaultRootPath = ""
|
||||||
|
DefaultKnowhereThreadPoolNumRatioInBuild = 1
|
||||||
)
|
)
|
||||||
|
|
||||||
// Const of Global Config List
|
// Const of Global Config List
|
||||||
|
|
Loading…
Reference in New Issue