Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
milvus
milvus
提交
71cd7ba6
M
milvus
项目概览
milvus
/
milvus
11 个月 前同步成功
通知
261
Star
22476
Fork
2472
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
milvus
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
71cd7ba6
编写于
4月 08, 2022
作者:
C
Cai Yudong
提交者:
GitHub
4月 08, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add configuration common.indexSliceSize (#16438)
Signed-off-by:
N
yudong.cai
<
yudong.cai@zilliz.com
>
上级
27b4cbc0
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
50 addition
and
4 deletion
+50
-4
configs/milvus.yaml
configs/milvus.yaml
+1
-1
internal/core/src/config/ConfigKnowhere.cpp
internal/core/src/config/ConfigKnowhere.cpp
+5
-0
internal/core/src/config/ConfigKnowhere.h
internal/core/src/config/ConfigKnowhere.h
+3
-0
internal/core/src/indexbuilder/init_c.cpp
internal/core/src/indexbuilder/init_c.cpp
+5
-0
internal/core/src/indexbuilder/init_c.h
internal/core/src/indexbuilder/init_c.h
+3
-0
internal/core/src/segcore/segcore_init_c.cpp
internal/core/src/segcore/segcore_init_c.cpp
+6
-0
internal/core/src/segcore/segcore_init_c.h
internal/core/src/segcore/segcore_init_c.h
+3
-0
internal/core/thirdparty/knowhere/CMakeLists.txt
internal/core/thirdparty/knowhere/CMakeLists.txt
+2
-2
internal/indexnode/indexnode.go
internal/indexnode/indexnode.go
+4
-0
internal/querynode/query_node.go
internal/querynode/query_node.go
+4
-0
internal/util/paramtable/component_param.go
internal/util/paramtable/component_param.go
+10
-1
internal/util/paramtable/component_param_test.go
internal/util/paramtable/component_param_test.go
+4
-0
未找到文件。
configs/milvus.yaml
浏览文件 @
71cd7ba6
...
...
@@ -274,7 +274,7 @@ common:
# Valid values: [auto, avx512, avx2, avx, sse4_2]
# This configuration is only used by querynode and indexnode, it selects CPU instruction set for Searching and Index-building.
simdType
:
auto
indexSliceSize
:
4
# MB
storage
:
vector
:
minio
internal/core/src/config/ConfigKnowhere.cpp
浏览文件 @
71cd7ba6
...
...
@@ -62,4 +62,9 @@ KnowhereSetSimdType(const char* value) {
}
}
void
KnowhereSetIndexSliceSize
(
const
int64_t
size
)
{
knowhere
::
KnowhereConfig
::
SetIndexFileSliceSize
(
size
);
}
}
// namespace milvus::config
internal/core/src/config/ConfigKnowhere.h
浏览文件 @
71cd7ba6
...
...
@@ -25,4 +25,7 @@ KnowhereInitImpl();
std
::
string
KnowhereSetSimdType
(
const
char
*
);
void
KnowhereSetIndexSliceSize
(
const
int64_t
size
);
}
// namespace milvus::config
internal/core/src/indexbuilder/init_c.cpp
浏览文件 @
71cd7ba6
...
...
@@ -27,3 +27,8 @@ IndexBuilderSetSimdType(const char* value) {
ret
[
real_type
.
length
()]
=
0
;
return
ret
;
}
void
IndexBuilderSetIndexSliceSize
(
const
int64_t
value
)
{
milvus
::
config
::
KnowhereSetIndexSliceSize
(
value
);
}
internal/core/src/indexbuilder/init_c.h
浏览文件 @
71cd7ba6
...
...
@@ -22,6 +22,9 @@ IndexBuilderInit();
char
*
IndexBuilderSetSimdType
(
const
char
*
);
void
IndexBuilderSetIndexSliceSize
(
const
int64_t
);
#ifdef __cplusplus
};
#endif
internal/core/src/segcore/segcore_init_c.cpp
浏览文件 @
71cd7ba6
...
...
@@ -50,4 +50,10 @@ SegcoreSetSimdType(const char* value) {
return
ret
;
}
extern
"C"
void
SegcoreSetIndexSliceSize
(
const
int64_t
value
)
{
milvus
::
config
::
KnowhereSetIndexSliceSize
(
value
);
LOG_SEGCORE_DEBUG_
<<
"set config index slice size: "
<<
value
;
}
}
// namespace milvus::segcore
internal/core/src/segcore/segcore_init_c.h
浏览文件 @
71cd7ba6
...
...
@@ -25,6 +25,9 @@ SegcoreSetChunkRows(const int64_t);
char
*
SegcoreSetSimdType
(
const
char
*
);
void
SegcoreSetIndexSliceSize
(
const
int64_t
);
#ifdef __cplusplus
}
#endif
internal/core/thirdparty/knowhere/CMakeLists.txt
浏览文件 @
71cd7ba6
...
...
@@ -11,8 +11,8 @@
# or implied. See the License for the specific language governing permissions and limitations under the License.
#-------------------------------------------------------------------------------
set
(
KNOWHERE_VERSION v1.1.
2
)
set
(
KNOWHERE_SOURCE_MD5
"7
c6043bfaa073c6580a1c5b1e904c995
"
)
set
(
KNOWHERE_VERSION v1.1.
3
)
set
(
KNOWHERE_SOURCE_MD5
"7
497e91053608b354de7ef7f6c6ee54b
"
)
if
(
DEFINED ENV{MILVUS_KNOWHERE_URL}
)
set
(
KNOWHERE_SOURCE_URL
"$ENV{MILVUS_KNOWHERE_URL}"
)
...
...
internal/indexnode/indexnode.go
浏览文件 @
71cd7ba6
...
...
@@ -153,6 +153,10 @@ func (i *IndexNode) initKnowhere() {
Params
.
CommonCfg
.
SimdType
=
C
.
GoString
(
cRealSimdType
)
C
.
free
(
unsafe
.
Pointer
(
cRealSimdType
))
C
.
free
(
unsafe
.
Pointer
(
cSimdType
))
// override segcore index slice size
cIndexSliceSize
:=
C
.
int64_t
(
Params
.
CommonCfg
.
IndexSliceSize
)
C
.
IndexBuilderSetIndexSliceSize
(
cIndexSliceSize
)
}
func
(
i
*
IndexNode
)
initSession
()
error
{
...
...
internal/querynode/query_node.go
浏览文件 @
71cd7ba6
...
...
@@ -185,6 +185,10 @@ func (node *QueryNode) InitSegcore() {
Params
.
CommonCfg
.
SimdType
=
C
.
GoString
(
cRealSimdType
)
C
.
free
(
unsafe
.
Pointer
(
cRealSimdType
))
C
.
free
(
unsafe
.
Pointer
(
cSimdType
))
// override segcore index slice size
cIndexSliceSize
:=
C
.
int64_t
(
Params
.
CommonCfg
.
IndexSliceSize
)
C
.
SegcoreSetIndexSliceSize
(
cIndexSliceSize
)
}
func
(
node
*
QueryNode
)
initServiceDiscovery
()
error
{
...
...
internal/util/paramtable/component_param.go
浏览文件 @
71cd7ba6
...
...
@@ -28,6 +28,9 @@ import (
const
(
// DefaultRetentionDuration defines the default duration for retention which is 5 days in seconds.
DefaultRetentionDuration
=
3600
*
24
*
5
// DefaultIndexSliceSize defines the default slice size of index file when serializing.
DefaultIndexSliceSize
=
4
)
// ComponentParam is used to quickly and easily access all components' configurations.
...
...
@@ -115,7 +118,8 @@ type commonConfig struct {
DefaultIndexName
string
RetentionDuration
int64
SimdType
string
SimdType
string
IndexSliceSize
int64
}
func
(
p
*
commonConfig
)
init
(
base
*
BaseTable
)
{
...
...
@@ -149,6 +153,7 @@ func (p *commonConfig) init(base *BaseTable) {
p
.
initRetentionDuration
()
p
.
initSimdType
()
p
.
initIndexSliceSize
()
}
func
(
p
*
commonConfig
)
initClusterPrefix
()
{
...
...
@@ -325,6 +330,10 @@ func (p *commonConfig) initSimdType() {
p
.
SimdType
=
p
.
Base
.
LoadWithDefault2
(
keys
,
"auto"
)
}
func
(
p
*
commonConfig
)
initIndexSliceSize
()
{
p
.
IndexSliceSize
=
p
.
Base
.
ParseInt64WithDefault
(
"common.indexSliceSize"
,
DefaultIndexSliceSize
)
}
///////////////////////////////////////////////////////////////////////////////
// --- rootcoord ---
type
rootCoordConfig
struct
{
...
...
internal/util/paramtable/component_param_test.go
浏览文件 @
71cd7ba6
...
...
@@ -40,10 +40,14 @@ func TestComponentParam(t *testing.T) {
t
.
Logf
(
"default index name = %s"
,
Params
.
DefaultIndexName
)
assert
.
Equal
(
t
,
Params
.
RetentionDuration
,
int64
(
DefaultRetentionDuration
))
t
.
Logf
(
"default retention duration = %d"
,
Params
.
RetentionDuration
)
assert
.
NotEqual
(
t
,
Params
.
SimdType
,
""
)
t
.
Logf
(
"knowhere simd type = %s"
,
Params
.
SimdType
)
assert
.
Equal
(
t
,
Params
.
IndexSliceSize
,
int64
(
DefaultIndexSliceSize
))
t
.
Logf
(
"knowhere index slice size = %d"
,
Params
.
IndexSliceSize
)
// -- proxy --
assert
.
Equal
(
t
,
Params
.
ProxySubName
,
"by-dev-proxy"
)
t
.
Logf
(
"ProxySubName: %s"
,
Params
.
ProxySubName
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录