SMB Server Shootout

With the advent of the ksmbd kernel module, CIFS/SMB shares on a Linux server should be faster than ever. Without the overhead of the samba package running in user space, performance should theoretically be higher. So let’s test that. And for good measure let’s compare against a native implementation on the latest Windows Server.

Test environment:

E5 2697V4 x4 Cores
4GiB RAM
NVME SSD Gen 3

3 virtual machines as hosts. All specs identical. Client is Windows 11.

Debian 13 + Samba4
Debian 13 + ksmbd
Windows Server 2025

Test #1: Random 4k IOPS

The in kernel ksmbd flexing right out of the gate! And Windows taking a surprising loss here by a substantial margin.

Test #2: Latency at 4k. Measured in Microseconds.

This is pretty much what we can expect from the results on Test #1 above. Just the inverse as we are measuring latency. Windows taking double the time of ksmbd to finish an IO operation.

Test #3: Sequential transfer at Queue Depth 1

When it comes to sequential workloads, there is a surprising turn of fortune for ksmbd. Samba4 is leading, with Windows not far behind.

Test #4: Sequential transfer at Queue Depth 8

This test would simulate a larger number of clients operating on larger files. We see Windows finally have a win. ksmbd is still lagging significantly. The reads here on Windows and Samba4 are just showing the limits of the NVME drive.

Conclusion

So what can we take away from this testing? The Windows Server results are interesting. You would think a native Microsoft protocol would be more optimized on their own platform, but in most tests Windows came in last. Another surprise was the lack of performance on ksmbd for sequential read and write operations. That suggests the possibility that some tuning in that area might be in order.

Other results were less surprising. ksmbd being a native kernel module reduced latency and correspondingly increased IOPS.

If you need advanced functionality, like running a Domain Controller, Windows and Samba4 can do that. ksmbd is relegated to pretty much just serving files currently. Though it is the only way on Linux to get RDMA support for SMB-Direct. Windows supports this as well, so for the highest performance networks that should be a consideration. ksmbd has other limitations such as a lack of shadow copy support.

For now I’ll keep my shares on samba4, as it has decent performance and great compatibility.

kyle