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
|
||||
|
||||
/*
|
||||
#cgo pkg-config: milvus_common milvus_indexbuilder
|
||||
#cgo pkg-config: milvus_common milvus_indexbuilder milvus_segcore
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include "common/init_c.h"
|
||||
#include "segcore/segcore_init_c.h"
|
||||
#include "indexbuilder/init_c.h"
|
||||
*/
|
||||
import "C"
|
||||
|
@ -162,6 +163,9 @@ func (i *IndexNode) initSegcore() {
|
|||
cCPUNum := C.int(hardware.GetCPUNum())
|
||||
C.InitCpuNum(cCPUNum)
|
||||
|
||||
cKnowhereThreadPoolSize := C.uint32_t(hardware.GetCPUNum() * paramtable.DefaultKnowhereThreadPoolNumRatioInBuild)
|
||||
C.SegcoreSetKnowhereThreadPoolNum(cKnowhereThreadPoolSize)
|
||||
|
||||
localDataRootPath := filepath.Join(Params.LocalStorageCfg.Path.GetValue(), typeutil.IndexNodeRole)
|
||||
initcore.InitLocalChunkManager(localDataRootPath)
|
||||
}
|
||||
|
|
|
@ -44,9 +44,10 @@ const (
|
|||
DefaultMinioIAMEndpoint = ""
|
||||
DefaultEtcdEndpoints = "localhost:2379"
|
||||
|
||||
DefaultLogFormat = "text"
|
||||
DefaultLogLevelForBase = "debug"
|
||||
DefaultRootPath = ""
|
||||
DefaultLogFormat = "text"
|
||||
DefaultLogLevelForBase = "debug"
|
||||
DefaultRootPath = ""
|
||||
DefaultKnowhereThreadPoolNumRatioInBuild = 1
|
||||
)
|
||||
|
||||
// Const of Global Config List
|
||||
|
|
Loading…
Reference in New Issue