-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
why grpc-java uds is slower than dns? #11763
Comments
tested on grpc lastest version 1.69.0 and netty version 4.1.110.Final,it's same as 1.61.1 , grpc uds still slower than dns . and comparing the results,it seams uds on the 1.69.0 is slower than 1.61.0 . here are test result on grpc version on 1.69.0:
|
About DNS vs UDS speed, before blaming it on gRPC we need to see comparison results directly making connections to DNS resolved addresses vs UDS socket addresses, that show UDS is faster than DNS. |
maybe i will do a test using native libraries rather than gRPC, but I've observed that the new version is also slower than the old version. |
I use netty did a test about uds vs dns ,the result shows uds is faster than dns , expecially on the small message size . As message size bigger ,the performance will be worse . The test results are in line with our expectations. so why grpc test not same as netty and why grpc uds is slower than dns ,anybody has idea? here is netty result:
|
Discussed in #11761
Originally posted by zhangchao1171 December 18, 2024
Question:
We did a test to compare the performance between uds and dns. According to what said on the Internet, uds should be faster because it lacks many network layer protocols. However, the actual tested found that uds is at most the same as dns,in most cases The performance will be worse. Can anyone help explain ? The following are test cases and test results.
ENV:
jdk: jdk-17.0.10
grpc: 1.61.1
test machine: centos 7.9 & 64 cpu cores & 251 GB RAM
code detail
uds server core code:
uds client core code:
GreeterServiceImpl.java
dns sever core code:
dns client core code:
test result:
I expected grpc uds to be faster than dns , but it's not. all test cases are on the localhost machine , and i put the uds path to the ssd disk , but fount it's performance as same as hdd. I alse changed server and client memory from 2GB to 6 GB ,but it doesn't any improvement
The text was updated successfully, but these errors were encountered: