TrueNAS SCALE 24.10.2 with ksmbd

I’m creating this thread as I haven’t found a single example on how to use ksmbd in TrueNAS SCALE on internet.

I’m coming from this thread Very slow SMB speed vs competitors

and the only reason I’m doing this is to investigate what performance can I achieve.

Hardware setup:

Server

24.10.2 in Proxmox
8 cores
96GB RAM
2 x PM983 in ZFS mirror passed-through
10G connection over Mellanox ConnectX 4-Lx passed-through
64G boot VirtIO drive
MTU 9000

Client

windows 11 pro
AMD 7960X + 128G ram
10G connection over Mellanox ConnectX 4-Lx
MTU 9014 (its windows)
Samsung 990 Pro

Super basic setup.

(If you want to see benchmarks of NVMes/NIC via fio/iperf3 - see other thread)

RSS enabled on both sides
SMB Multichannel works

The max read speed from Samba 4.20 share of TrueNAS SCALE that I could get was ~450mb/s

I decided to try ksmbd. 24.10.2 kernel already comes with required kernel module so just :slight_smile:

modprobe ksmbd

Next you need to install ksmbd-tools, which I just built from source as apt install tries to un-install truenas-samba. Rough guide how to do this is :

mount -o rw,remount /usr
export PATH=/usr/bin:/usr/sbin
chmod +x /bin/apt*
chmod +x /usr/bin/dpkg
apt-get update
apt install gcc
apt install libglib2.0-dev libnl-3-dev libnl-genl-3-dev make
tar -xf ksmbd-tools-3.5.3.tar.gz
cd ksmbd-tools-3.5.3/
./configure --with-rundir=/run --disable-dependency-tracking
make -j
make install

Now copy and edit /usr/local/etc/ksmbd/ksmbd.conf.example - its pretty much Samba config but very cut-down. Start user-space daemon and make sure ksmbd listens on 445 port

systemctl enable ksmbd.service
systemctl start ksmbd.service
netstat -atnup |grep 445

Connect from Windows and enjoy 2x speed up vs. Samba 4.20 of TrueNAS SCALE

image

Write speeds are amazing with ksmbd

image

Getting 10gbps speed easily

Not even the tiniest warning that modifying the OS in the way you describe will result in an install that, if you later need to report a bug, will likely result in iX just closing the ticket?

Not cool.

is this a tech forum or a cooking class ?

if you can’t figure out what apt install does mate, you should probably not use truenas in the first place.

installing a devtool hardly can be called modifying the OS. But doesnt look like you even know what devtool set is.

people who need performance will figure stuff out with this guide.

Cooking class, because you’re breaking eggs, and servers :grinning:

You are in the wrong in this case.
TrueNAS is not a typical Linux distro. It’s appliance software.

Here’s the relevant page from the official docs:

you are off-topic here mate

Not in the slightest.

Posting this thread without a warning of the consequences this will have for the supportability of the setup is irresponsible.

2 Likes

There is no supportability for free version of TrueNAS. you should study the product you’re using.

Reporting bug tickets are closed when the product is in Developer status. Default TrueNAS can report bugs and get support that way.

2 Likes

This isn’t called a support mate. This is called being a free quality tester for a company that makes money. Not even mentioning that you risk all your data doing that.

In a parallel universe, you reacted to the first reply by adding a disclaimer to start of your post.
After that we had an interesting discussion about your findings.

This really is the worst time line.

In that same universe you wouldn’t have an internet connection to spread toxicity over it.

Just for info I’m locking this thread as it’s moved well away from its original topic. Just a reminder to everyone that this is a place to support one another.