【ceph】Messenger模块的基准测试工具ceph_perf_msgr_server/ceph_perf_msgr_client

CEPH_PERF_MSGR


ceph_perf_msgr仅用于做Messenger模块的基准测试,可以帮助您找到Messenger模块中的瓶颈或耗时。就像“ iperf”一样,我们需要首先启动服务器端程序:

server
 

#./ceph_perf_msgr_server 172.16.30.181:10001 1 0

./ceph_perf_msgr_server [bind ip:port] [server worker threads] [thinktime us]

[bind ip:port]: The ip:port pair to bind, client need to specify this pair to connect
[server worker threads]: threads will process incoming messages and reply(matching pg threads)
[thinktime]: sleep time when do dispatching(match fast dispatch logic in OSD.cc)

第一个参数:ip:port对,绑定IP:绑定端口号。

第二个参数:服务端线程数

第三个参数:模拟dispatch调度每个消息的耗时(“思考时间”(think_time)--代码中: usleep(think_time);)。在Giant之后,CEPH_OSD_OP消息(即实际的客户端读/写io请求)将快速分派,而无需排队到Dispatcher,以实现更好的性能。因此,CEPH_OSD_OP消息将进行内联处理,模拟“内联过程”过程将使用“思考时间”。

void MessengerClient::ClientDispatcher::ms_fast_dispatch(Message *m) {
  usleep(think_time);
  m->put();
  std::lock_guard l{thread->lock};
  thread->inflight--;
  thread->cond.notify_all();
}

client

#./ceph_perf_msgr_client  172.16.30.181:10001  1  32  10000  10  4096

第一个参数:服务器ip:port

第二个参数:客户端线程数

第三个参数:并发性(每个客户端线程的最大发送中的消息数

第四个参数:每个客户端线程发起的IO次数

第五个参数:接收消息时客户端线程的“思考时间”,这也用于模拟客户端快速分配过程。

最后一个参数:消息数据的长度

原文:http://docs.ceph.org.cn/dev/messenger/?highlight=ceph_perf_msgr_server

猜你喜欢

转载自blog.csdn.net/bandaoyu/article/details/114292690