SMB Share too slow

Hello Guys,

after setting up my Turris Omnia I decided to use a USB Stick as Network Share (just to supply some files in the LAN etc.) I had a Kingston HyperX around and decided to use it for that. Under Windows this gives some pretty good perfomance but when using it as NFTS formatted device on the Turris Omnia and as SMB Share the perfamnce is awfully slow. I get around 5 MB/s with 5GhZ WLAN, 25 MB/s with a wired connection. I Normally write with around 200MB/s to this device…

I know what i probably won’t get this performance using this setup - but I think it is too slow. Is this performance normal? Whats the cause? The filesystem (NTFS)? Should i use another one and how could I speed things up?..

Thanks in advance :smiley:

When you use NTFS, you’re using ntfs-3g filesystem, which is implemented user-space. That is probably the reason for low speeds.

NTFS certainly is not best choice, especially if using fuse based ntfs-3g. So trying different filesystem might help.

You can also measure raw device speed to see if it’s not some USB problem…

I just formatted the stick with btrfs and now i have 30 MB/s… which is not much better :frowning:

As @nijel request, I also measured the raw device speed:

root@turris:/# hdparm -Tt /dev/sda1

/dev/sda1:
 Timing cached reads:   1300 MB in  2.00 seconds = 649.66 MB/sec
 Timing buffered disk reads: 748 MB in  3.01 seconds = 248.78 MB/sec

I have USB disk, ext4 formatted, I get around 50 MB/s over Gbit LAN. Connected to Omnia, USB3.0, default samba.

hdparm -Tt /dev/sdb1

/dev/sdb1:
 Timing cached reads:   1298 MB in  2.00 seconds = 648.40 MB/sec
 Timing buffered disk reads: 320 MB in  3.02 seconds = 106.11 MB/sec

Desktop I use for test is Win7, HDD in HDD Tune benchmark is able something around 106 MB/sec.

Dont know, where are half of HDDs thoroughput lost, but at least its 4-5 times faster than 100Mbit.

It start with 70 MB/s but after about 2 second it goes down to ~ 20 MB/s

Hmm, I tried this. I have an external hard drive mounted through the usb3 port using ntfs-3g. I then pass that through to an lxc-container running debian jessie which runs samba 4.2. I then mount a share on my desktop and run dd and get

dd if=reallylargefile of=/dev/null 22914988+1 records in 22914988+1 records out 11732473978 bytes (12 GB, 11 GiB) copied, 178,324 s, 65,8 MB/s
This is over the wired interface, so no wireless.

I did just attach the USB Stick to the Port (back) and using smb (Network Share of the Router) want to transfer files to the stick over a wired connection. The result (speed) is pretty bad, i trief with ntfs, ext4, btrfs - anything else i could try?

@justsomeguy just to make sure it is not my fault could you tell me your lxc config? Mine does not allow me to see the usb device in the lxc container…

lxc.cgroup.devices.allow = c 8:* rwm
lxc.mount.entry = /dev/sda1 /dev/sda1 none bind,optional 0 0

I don’t have any hard evidence, but I can also confirm that the speed of Samba shares is topped somewhere around ~50 MB/s. I am almost sure that the bottleneck is Samba, since writes to the disk itself (7.2k SATA HDD - both direct, RAID0 and RAID1 - connected to an mPCIe controller) reach 150+ MB/s and transfers through the Gbit network also reach its practical limits, yet 50 MB/s is something I can live with, considering the scenarios I am using Samba in… Maybe tweaking the configuration might yield a few megabytes/s but it’s not worth the effort for me.

1 Like

I have two old 2TB SATA HDDs connected in Omnia NAS and 7.2k NTFS formated one can reach 25MB/s only while slower 5.4k but ext4 formated one can reach 80MB/s without problems (default Omnia Samba / 1 Gbit network).

Well … I could live with 50 MB/s but not with 20 MB/s…
I wanted to use a newer SAMBA Version in an LXC Container, but with the above config i can’t get the usb device recognized inside the container…
//Edit: I finally got the LXC Container/Samba setup running (suing this guide), but the speed is the same as before. what else could i try? 20 MB/s is just …

You must have found the correct syntax somewhere, but I have

lxc.mount.entry=/mnt/disk1 mnt/disk1 none bind 0 0

The 65 I got is real, but it is using an usb3 external hard drive, not a usb stick.

Thank you for the answer. I do not think that the stick is the Bottleneck. I usually write with 250 MB/s to it.

USB 3.1 Gen 1 (USB 3.0)
350MB/s read, 250MB/s write (128GB–512GB)

The only thing I can now think of is that I have the 2GB model.

Me too, @cznic team, suggestions? :smile:

It doesnt struck me at first, but seems that also free space on disk takes part of this. My first posts was with also empty disc, now, when its half full, transfers are ~75 MB/s (write). At least I am not aware to change anything important on Omnia configuration.

So now I am satisfied even above expectations (I use to live with 38-50MB/s)