Transfer between two drives-slow when done via linux but fast from windows

rustigsmed

Dabbler
Joined
Jul 25, 2022
Messages
12
Hi there,

I have truenas scale on baremetal - details below.

CPU 5950x Mobo Asrock phantom gaming 4 wifi ax x570
128GB ecc Ram; boot drive 2x crucial mx500 ssd
Storage16tb seagate exos enterprise raidz1 / 1x 2tb gigabyte nvme. (with a dataset & share on each)
TrueNAS-SCALE-22.02.2.1

I have a strange thing occur when I copy the same folder from the NVME to the 16tb mirror from two different PC's on my home network.

From my Linux PC (connected to router via ethernet EoP) I was getting approximately 12-16MB/s. (which felt v slow) (thunar file manager)
From my Windows PC (connected to router via wifi) I was getting on average 260MB/s. (windows explorer)

As it is copying from TrueNAS to TrueNas internally they really should be the same?

Any idea what is happening with the linux connection - I think it is moving the data from NVME -> router -> linux pc -> router -> Mirror hdds. Whereas Windows doesn't appear to 'go' via the pc.

Sorry I am very new to NAS' and networking - its been a bit of a learning curve - so thanks in advance.

cheers

Russell
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399

Check your mount options on the Linux side. In particular, make sure you're using SMB3+ in the Samba client.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554

Check your mount options on the Linux side. In particular, make sure you're using SMB3+ in the Samba client.

Thunar uses userspace libsmbconf library IIRC and so it may not actually implement the necessary FSCTLs to perform a server-side copy. User may have better success using mount.cifs on Linux (which uses the Linux kernel SMB client).
 
Joined
Oct 22, 2019
Messages
3,641
Thunar uses userspace libsmbconf library IIRC and so it may not actually implement the necessary FSCTLs to perform a server-side copy.
This is most likely the culprit.

The same is true with other GUI file browsers, such as Dolphin and Nemo.

You need to mount your SMB shares via the fstab, systemd-mount (automount), or manual mount using cifs. Then you can make a shortcut or side-panel bookmark to easily access the shares with Thunar.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
This is most likely the culprit.

The same is true with other GUI file browsers, such as Dolphin and Nemo.

You need to mount your SMB shares via the fstab, systemd-mount (automount), or manual mount using cifs. Then you can make a shortcut or side-panel bookmark to easily access the shares with Thunar.

Yeah, I never really understood why there was preference to use libsmbconf over the kernel SMB client (at least on Linux). The kernel SMB client is actually quite good (though you'll want to use a modern-ish kernel for this). Old versions didn't do such a good job of compounding SMB operations and so performance (especially metadata ops) can be worse on them.
 

rustigsmed

Dabbler
Joined
Jul 25, 2022
Messages
12
OK thankyou for all the comments and suggestions. unfortunately, i am battling to get automount working for the share drives on the linux pc (xubuntu 22.04). I will report back when I get to the bottom of it. As I can dual boot into this machine i also tested windows transfer speeds from here and they were working fine - so I'm fairly convinced you're all correct. thanks
 
Joined
Oct 22, 2019
Messages
3,641
unfortunately, i am battling to get automount working for the share drives on the linux pc (xubuntu 22.04).
Can you post the contents of your .mount and .automount unit files?

You can change/filter out anything private.
 

rustigsmed

Dabbler
Joined
Jul 25, 2022
Messages
12
Hi winnielinnie,
is this what you mean? unfortunately, i'm also a fairly casual linux user...

Mounting

russ@workstation03:~$ sudo mount -t cifs -o rw,vers=3.0,username=smb_usr,password=smbpassw //192.168.1.115/nvme2tb /mnt/win_share1
russ@workstation03:~$ df -h
Filesystem Size Used Avail Use% Mounted on
tmpfs 3.2G 3.8M 3.2G 1% /run
/dev/nvme0n1p2 1.8T 1.2T 605G 66% /
tmpfs 16G 0 16G 0% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 16G 0 16G 0% /run/qemu
/dev/sda 3.6T 2.8T 641G 82% /mnt/Linux4tbssd
/dev/nvme0n1p1 511M 5.3M 506M 2% /boot/efi
tmpfs 3.2G 92K 3.2G 1% /run/user/1000
//192.168.1.115/store16d 15T 1.8T 13T 13% /mnt/win_share2
//192.168.1.115/nvme2tb 1.5T 26G 1.5T 2% /mnt/win_share1


I have tried many iterations but here is my last attempt in /etc/fstab
Code:
# <file system>             <dir>          <type> <options>                                                   <dump>  <pass>
//192.168.1.115/store16d  /mnt/win_share2  cifs vers=3.0,username=smb_usrname,password=smb_passw


# <file system>             <dir>          <type> <options>                                                   <dump>  <pass>
//192.168.1.115/nvme2tb  /mnt/win_share1  cifs vers=3.0,username=smb_usrname,password=smb_passw


any suggestions appreciated.

thanks
 
Joined
Oct 22, 2019
Messages
3,641
That looks fine for the most part.

It shows that you've successfully mounted them at /mnt/win_share1 and /mnt/win_share2

You can create side-panel shortcuts/bookmarks for convenient access to these locations.

So it's working now?
 

rustigsmed

Dabbler
Joined
Jul 25, 2022
Messages
12
That looks fine for the most part.

It shows that you've successfully mounted them at /mnt/win_share1 and /mnt/win_share2

You can create side-panel shortcuts/bookmarks for convenient access to these locations.

So it's working now?
well the short answer is no.

I created shortcuts in thunar from the '/mnt/win_share' locations, but they were not writeable. sudo'ing into thunar, i was getting transfer speeds about 16MB/s.
trying again from the network address within thunar it was about 1/3 the speed (same files). either way they both appear to be going via the pc. so I'm not sure what is happening.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Have you tried just a cp --reflinks from a shell window? Thunar, as stated before, uses a library lacking the necessary server-side copy FSCTLs.
 

rustigsmed

Dabbler
Joined
Jul 25, 2022
Messages
12
thanks for the help everyone. I had no luck copying via terminal - truenas was showing network traffic at about 16MB/s. it's ok though i can work around this using windows when i need to. I'm mostly dealing with many large raw image/video files which i why I prefer the gui so I can see the file preview.
I've got other issues to sort out I would like to spend my time on but thanks for point me in the right direction - I'll come back to this when I have more time.
 
Top