在使能UCX之前,需要配置UCX参数以及所有节点的配置文件,只使能SPDK则跳过此章节。
- 进入Ceph集群容器。
- 配置UCX参数。
|
ceph config set global ms_type async+ucx
ceph config set global ms_public_type async+ucx
ceph config set global ms_cluster_type async+ucx
ceph config set global ms_async_ucx_device mlx5_bond_0:1,mlx5_bond_1:1
ceph config set global ms_async_ucx_tls rc_verbs
ceph config set global ms_async_ucx_event_polling true
|
- 退出容器,在所有服务端节点(ceph1/ceph2/ceph3)物理机中mon的配置文件中增加如下配置。
|
/var/lib/ceph/[fsid]/mon*/config
ms_type = async+ucx
ms_public_type = async+ucx
ms_cluster_type = async+ucx
ms_async_ucx_device = mlx5_bond_0:1,mlx5_bond_1:1
ms_async_ucx_tls = rc_verbs
ms_async_ucx_event_polling = true
|

- ms_async_ucx_device中的设备名称可通过show_gids查看,可填写多个网络设备。该字段选中的设备(一个或多个)需要同时包含该节点配置的公共网络IP地址和集群网络IP地址。如不支持该命令,需更新网卡固件和驱动,参见更新网卡固件和驱动。
- [fsid]为实际Ceph集群的fsid,可通过cephadm ls命令查看。
- 请务必保证服务端节点的RDMA网络设备名一致,否则OSD节点无法正常拉起,不一致时可以使用/usr/lib/udev/rdma_rename等工具修改,客户端节点无需保持一致。
- cluster_network和public_network的IP地址应与UCX设备(RoCE/IB网口)的IP地址一致。
- ms_async_ucx_event_polling设置为true,代表开启事件轮询,可以减少延迟,提高Ceph集群吞吐量,提供更好的并发性能,但是会带来CPU占用的增加,部分没有事件的场景会带来资源的浪费,增加系统调试复杂性。用户需根据实际情况需要选择开启与否。
- 在所有节点中将MON的修改同步到MGR和OSD。
|
ls /var/lib/ceph/*/*/config|grep 'osd\|mgr\|crash'|xargs -I {} cp -r /var/lib/ceph/*/mon.*/config {}
|
- 在所有节点中修改service文件。
|
sed -i 's/on-failure/always/g' /etc/systemd/system/ceph-*\@.service
sed -i 's/30min/1min/g' /etc/systemd/system/ceph-*\@.service
sed -i '/StartLimitBurst=/c\StartLimitBurst=20' /etc/systemd/system/ceph-*\@.service
|
- 在所有节点重启Ceph集群。
|
systemctl daemon-reload
systemctl restart ceph.target
|
- 待所有容器启动完成后,需重新进入Ceph集群容器查看集群状态。