-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
High CPU Usage During Insertions in milvus-sdk-java #1061
Comments
Thanks for pointing out this problem. I didn't realize it was a problem before. For the requests that could pass large/complicated data, we should manually customize the toString() method. For insertParam, we just want to print out the target collection name, the number of vectors, no need to print out all the vectors. |
good catch! |
Fixed by this pr: #1064 |
the good code is:
构建调试日志信息之前,就调用isDebugEnabled进行控制,这样性能才佳 |
Hi, everyone, thank Hi everyone,
Thank you for providing such a convenient Java SDK; it has been very useful.
While using version
2.4.3
of the milvus-sdk-java, I have encountered some performance issues. Here are some metrics and analysis that I have gathered.When performing insertions in a single thread, I noticed unusually high CPU usage. After profiling with async-profiler, I pinpointed the most time-consuming operation at this line: AbstractMilvusGrpcClient.java#L1569.
The attached flame graph can attest to this issue.
The high CPU usage seems to be caused by premature calls to
toString
. In practice, when I set the log level to INFO, there is no need for thetoString
method to be called. I suggest checking the log level before callingtoString
.Thank you for considering this improvement.
The text was updated successfully, but these errors were encountered: