SMB Direct – SMB3 over RDMA – Linux 内核文档
SMB Direct – SMB3 over RDMA

原始链接: https://docs.kernel.org/filesystems/smb/smbdirect.html

要启用SMB Direct,一种使用RDMA的高性能SMB传输协议,需要几个步骤。首先,安装兼容的RDMA设备——硬件(InfiniBand、RoCE、iWARP)或软件模拟器(soft RoCE、soft iWARP),确保内核驱动程序支持。 接下来,需要内核版本5.15或更高版本,以及用于挂载SMB共享的`cifs-utils`软件包。至关重要的是,内核在编译期间*必须*配置为启用RDMA支持,具体而言是Infiniband/iWARP适配器支持和IP-over-InfiniBand(如果适用),或者软RDMA模块。 使用`iproute2`和`rdma link add`创建RDMA接口(例如`siw0`)。最后,在内核配置中启用SMB Direct支持,分别在服务器端(网络文件系统 -> SMB3服务器支持)和客户端(网络文件系统 -> SMB3和CIFS支持)中。重建并安装内核,以激活`cifs.ko`和`ksmbd.ko`模块中的SMB Direct功能。

## SMB Direct & 内核支持总结 最近的 kernel.org 更新为 Linux 内核(5.15 版本及更高版本)添加了对 SMB Direct 的支持——SMB3 over RDMA。这使得应用程序无需 Microsoft 软件即可访问 SMB 共享,从而为更快速、更低延迟的网络存储打开了可能性。 讨论的重点在于潜在的应用场景,例如在 Mac 之间编辑视频文件,或利用 SMB 传输大型文件,如 LLM 模型权重。用户对与传统 SMB 相比的性能提升,以及该实现是否充分利用 RDMA 功能感到好奇。 此次更新似乎源自三星,一些人推测这是由 Tuxera 推动,以提高其 Fusion SMB 的性能。对话还涉及 SMB 总体上出人意料的强大性能,尽管存在一些看法,以及微软长期以来对网络存储优化的关注——以及安全问题。最后,一些评论员指出文件管理器(Windows 和 macOS)中潜在的效率低下,这可能会影响感知性能,而与底层协议无关。
相关文章

原文
  • Install an RDMA device. As long as the RDMA device driver is supported by the kernel, it should work. This includes both software emulators (soft RoCE, soft iWARP) and hardware devices (InfiniBand, RoCE, iWARP).

  • Install a kernel with SMB Direct support. The first kernel release to support SMB Direct on both the client and server side is 5.15. Therefore, a distribution compatible with kernel 5.15 or later is required.

  • Install cifs-utils, which provides the mount.cifs command to mount SMB shares.

  • Configure the RDMA stack

    Make sure that your kernel configuration has RDMA support enabled. Under Device Drivers -> Infiniband support, update the kernel configuration to enable Infiniband support.

    Enable the appropriate IB HCA support or iWARP adapter support, depending on your hardware.

    If you are using InfiniBand, enable IP-over-InfiniBand support.

    For soft RDMA, enable either the soft iWARP (RDMA _SIW) or soft RoCE (RDMA_RXE) module. Install the iproute2 package and use the rdma link add command to load the module and create an RDMA interface.

    e.g. if your local ethernet interface is eth0, you can use:

    sudo rdma link add siw0 type siw netdev eth0
    
  • Enable SMB Direct support for both the server and the client in the kernel configuration.

    Server Setup

    Network File Systems  --->
        <M> SMB3 server support
            [*] Support for SMB Direct protocol
    

    Client Setup

    Network File Systems  --->
        <M> SMB3 and CIFS support (advanced network filesystem)
            [*] SMB Direct support
    
  • Build and install the kernel. SMB Direct support will be enabled in the cifs.ko and ksmbd.ko modules.

  • 联系我们 contact @ memedata.com