咨询一下关于RDMA延迟问题
如果通信的数据很小,通常都是数百字节的情况下,使用rdma能降低延迟么? 因为现在公司网络环境问题,暂时没有rdma环境,借用服务器验证echo示例,循环百万次发现rdma和tcp方式的延迟差不多,这种是符合预期的么? 麻烦解答一下,谢谢
这个量级时延可以看到差异。
具体是如何测试的?结果如何?
这个量级时延可以看到差异。
具体是如何测试的?结果如何?
使用echo-c++的示例进行修改,client和server的option都加了use_rdma=true client循环请求部分代码如下:
// Normally, you should not call a Channel directly, but instead construct
// a stub Service wrapping it. stub can be shared by all threads as well.
example::EchoService_Stub stub(&channel);
// Send a request and wait for the response every 1 second.
for (size_t i = 0; i < 1000000; i++)
{
if(i%100000==0){
time_t current_time = time(NULL); // 获取当前的 Unix 时间戳
struct tm* local_time = localtime(¤t_time); // 将时间戳转换为本地时间
printf("当前时间:%d年%d月%d日 %d:%d:%d\n",
local_time->tm_year + 1900, local_time->tm_mon + 1, local_time->tm_mday,
local_time->tm_hour, local_time->tm_min, local_time->tm_sec);
}
example::EchoRequest request;
example::EchoResponse response;
brpc::Controller cntl;
request.set_message("hello world");
// cntl.request_attachment().append(FLAGS_attachment);
// Because `done'(last parameter) is NULL, this function waits until
// the response comes back or error occurs(including timedout).
stub.Echo(&cntl, &request, &response, NULL);
if (!cntl.Failed()) {
LOG(WARNING) << cntl.ErrorText();
}
}
LOG(INFO) << "EchoClient is going to quit";
有尝试过使用rdma_performance的example进行测试吗
有尝试过使用rdma_performance的example进行测试吗
没有,现在借用的环境已经还回去了,主要没什么环境了
从理论上将,是不是rdma延迟会低一点?即便是小字节数据的情况
在同样负载的情况下,小数据的时延能看到差异。需要有明确的信息来定位问题。
有尝试过使用rdma_performance的example进行测试吗 大佬,rdma_performance这个example我已经编译好了,请问能给个运行参数示例么?就只需要服务名、端口号这两个命令行入参就可以了么?比如 服务端: ./server 30801 客户端: ./client 服务端ip 30801
server设置port,client设置servers=ip:port。其他参数可以设置attachment_size、thread_num等。 更详细的可以看下.c里面开放的参数
server设置port,client设置servers=ip:port。其他参数可以设置attachment_size、thread_num等。 更详细的可以看下.c里面开放的参数
感谢答疑!