why grpc-java uds is slower than dns? #11761
Replies: 2 comments 6 replies
-
How about test with newer version of netty grpc and netty |
Beta Was this translation helpful? Give feedback.
-
The answer is going to be of various forms of "don't know" and "that would be interesting for you to figure out." A good way to start that would be to use One thing to note, it seems your benchmark is closed-loop and you have fewer concurrent RPCs than cores. So your benchmark may not be a throughput benchmark as much as a latency benchmark. Unless you can show it takes about the same amount of time when you vary the number of concurrent RPCs, then you should keep in mind it may be a latency benchmark. The answer could turn out to be very easy. For example, TCP might have bigger buffer sizes in the kernel. Or the Linux scheduler just so happens to do a better job with TCP. As a shot-in-the-dark, you might try setting |
Beta Was this translation helpful? Give feedback.
-
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
Beta Was this translation helpful? Give feedback.
All reactions