HNSW在Search中遇到的问题,请帮助!!! #51059
Unanswered
llxingkongxia
asked this question in
Q&A and General discussion
Replies: 2 comments 2 replies
|
建议不要用python api,python本身就比较慢。 另外,建议部署个监控,看看milvus服务侧的响应时间,看看有没有排队的现象。 |
2 replies
|
seach的时候是否输出了向量字段数据或者某些较大的字段?比如这样: 一般来说如果仅仅输出ids + distances的话,sdk的耗时和内部耗时区别不大 |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Milvus的版本是2.5.13,在使用Mivus Standalone分析HNSW Search高吞吐性能的时候,发现Pymilvus返回的时间和Knowhere C++打印耗时存在较大差距。
C++端log如下:
--- a/src/index/hnsw/faiss_hnsw.cc
+++ b/src/index/hnsw/faiss_hnsw.cc
@@ -1164,6 +1164,8 @@ class BaseFaissRegularIndexHNSWNode : public BaseFaissRegularIndexNode {
if (index_id < 0) {
return expected::Err(Status::invalid_args, "partition key value not correctly set");
}
@@ -1231,6 +1233,8 @@ class BaseFaissRegularIndexHNSWNode : public BaseFaissRegularIndexNode {
}
hnsw_search_params.sel = id_selector;
@@ -1312,6 +1316,8 @@ class BaseFaissRegularIndexHNSWNode : public BaseFaissRegularIndexNode {
return expected::Err(Status::faiss_inner_error, e.what());
}
@@ -1323,6 +1329,8 @@ class BaseFaissRegularIndexHNSWNode : public BaseFaissRegularIndexNode {
res->SetJsonIdSet(json_id_set.dump());
}
128维,单个segment 100万的情况下,1000个query,C++端耗时只有23ms,而Pymilvus返回耗时为426ms。
直接使用attu也没有这么高的耗时,咨询大模型,告诉我是SearchResult(protobuf -> dict行式转换)导致性变差。
请问这个现象是否合理?我的测试方法是否正确?需要修改一下Milvus Docker相关配置吗?请帮忙,非常感谢!
All reactions