• Slow SMB performance


    ptr727
    • Minor



    User Feedback

    Recommended Comments



    Adjacent for Mac Users: Carbon Copy Cloner to a .sparsebundle mounted on SMB with Case Sensitive names isn't horrible. 

     

    As I understand it, it's largely a front end for rsync. I stopped using Time Machine. Never (knock on wood) have I had to restore from Time Machine anyway in something like 2 decades, so...

     

    The big thing is to change the setting 'find and replace corrupt files' to once a month vs once a backup (much faster of course), but I'll take rebuttals. So you've got the parity check scans once a week on Unraid and once a month backup corruption check.

     

    So every 4th backup on weeklies checks for corruption. 

     

    Thread drift over, but I expect Mac users in the future might like this info as it's adjacent.

     

    I haven't counted but I would bet that the band / filecounts on a reasonable size .sparsebundle don't have a problem with SMB.

     

    Initial backup of my 256gig SSD over 1gig Ethernet was 110GB in 6hr 16 mins. 35,000 files.

     

    Not great, but useable. I do not have a cache drive yet.

     

    Edited by RealActorRob
    Link to comment
    1 hour ago, RealActorRob said:

    @TexasUnraid

     

    Case-sensitive names is somewhat (to me) strangely under security settings for the Share.

     

    Shares > 'Click Sharename' then it's there under SMB Security Settings.

     

     


    it is a Samba specific issue, so if it is going to be settable at the share level that was probably as good a place as any to put the setting.

    Link to comment
    On 2/14/2021 at 2:24 PM, itimpi said:


    it is a Samba specific issue, so if it is going to be settable at the share level that was probably as good a place as any to put the setting.

     

    Mmm....it would make more sense to me to have it in "Share Settings" and have it say: "Case Sensitive names for SMB Shares" as it is definitely NOT a security setting. 

    Link to comment

    this is unraid copying the same set of files i did all the test with to a new 2TB Cache SSD using disk share over a 1 Gbit network.

    This thing just cannot handle small files properly. I have bought so much hardware to have quicker backups and unraid just always disappointing me more and more

    image.png.1c0e943873b56a16176e653e9aa035a2.png

    i can even parallelly write to the same disk from the same computer at full speed

    image.thumb.png.135d38048ee1b1011cf20a9a3187deec.png

    Edited by theruck
    Link to comment

    If you need to work with very small files and if possible for your use case you should use disk shares instead, user shares perform much worse with small files.

    Link to comment
    2 hours ago, theruck said:

    using disk share

    @JorgeB it seems he already used disk shares.

     

    @theruck

    If this is ok for you I would like to check your setup through a remote desktop software. Feel free to contact me through PM.

    Link to comment

    It may be worth trying SSHFS as an alternative to SMB. I have done some simple testing with Windows -> Unraid and it appears to process small files 3x faster for my setup vs SMB. 

     

    To set it up:

     

    On the Unraid side, you can use the openssh-server docker in the community application to "share" a folder - it allows you to setup a username and password (or ssh keys) to connect to Unraid and to restrict access to specific folders - e.g. /mnt/user/Media.

     

    For windows you can use sshfs-win (https://github.com/billziss-gh/sshfs-win) as a way to map the SSHFS to a drive letter.

     

    Performance thoughts:

     

    Doing this gives around 3x performance with small files, but peak throughput is around half.... probably due to the small file efficiencies in the protocol, but larger overheads of ssh encryption/decryption and docker filesystem layers that need to be traversed. 

     

    Connecting directly to Unraid SSH as root is the same for peak throughput and small file processing is around 30% faster. But is not something I would want to do generally due to having to use root access.

     

    Might be an option for the specific use case of backing up millions of small files.

    Link to comment

    I came across this performance comparison between SMB/NFS 4/SSHFS and it indicates from the testing performed that SSHFS should be on a par with NFS for most operations in their testing environment. Although I am seeing a larger difference between SMB and SSHFS. 

    Link to comment
    12 hours ago, mgutt said:

    @JorgeB it seems he already used disk shares.

    Yes, I didn't look close enough, also didn't look at what was being transferred, @theruckI don't know what kind of performance you expect with very small files but in my experience, when using disk shares, Unraid is no slower than any other SMB share, user shares on the other hand can be a lot slower, especially with small files, but you'll always get much lower performance when transferring small files vs large files.

     

    Here's an example with even smaller files:

     

    Unraid

    967843814_Screenshot2021-04-0809_23_07.png.276f808a0a90f110d31554f89b430611.png

     

    Windows share on another PC

     

    1094968935_Screenshot2021-04-0809_27_25.png.139f59d838025288063b2236fb796d35.png

     

    FreeNAS share

     

    944573647_Screenshot2021-04-0809_24_55.png.68f8056abdea2ae0420ee4633f73d575.png

    Link to comment

    I'm also suffering from poor SMB speeds from Mac OS Big Sur. (UnRAID 6.9.1)

     

    Via CCC and gigabit ethernet, backups run 10 times for an average...

     

    NFS (direct to disk 1)

    Disk 1: ~4 mins

    Disk 2: 1 min

     

    SMB2/3 (2 vs 3 makes sod all difference!)

    Disk 1: ~46 mins

    Disk 2: ~10 mins


    SMB mount points have their own entry in SMB-Conf, e.g....

     

    SMB performance is terrible...!!

     

    Any ideas why it is just so bad?

     

    Quote

     

    veto files = /._*/.DS_Store/
    case sensitive = yes

     

    [BU-Mac HD 2]
            path = /mnt/disk1/Backup/Mac HD 2/
            comment =
            browseable = no
            # Private
            writeable = no
            read list = 
            write list = bu-ccc
            valid users = bu-ccc
            vfs objects = catia fruit streams_xattr

     

     

    Edited by Interstellar
    Link to comment

    it is so bad because mac uses sparse bundle disks for backups which is basically thousands of small files which can grow in size so any read/write means reading/writing thousands of small files in small chunks which just sucks.

    i just bought a 2TB SSD to have a normally working backup over time machine and iphone backups. Have to use AFP with the older unraid 6.8.x as SMB is absolutely unusable for the sparse bundles and the latest unraid does not support AFP anymore.

    But if i have 16 GB RAM and i am copying over just 5GB of files even though they are less than 4k size, i would expect from the software to be able to utilize the 4GHz CPU, 1gbit network, the 500 MB/s SSD and the 10 GB of free RAM with multible GB/s speed as all the components can perform well if i measure them one by one. they just do not work together properly just because of software over the network.

    it might bee just linux problem but having the problem since the first install and spending some time on the forums here reading many hints and tricks i must say that the vendor support here is just non-existent.

    FTP transfers work with small size files way better so if you want backups of MACs just use SSD disk share and if you need small files then use FTP. But then there is the question why would you need unraid for?

    Edited by theruck
    Link to comment
    On 4/7/2021 at 9:37 PM, mgutt said:

     

     

    @theruck

    If this is ok for you I would like to check your setup through a remote desktop software. Feel free to contact me through PM.

    thanks again for the offer but if you remember we tried this already few weeks ago and we found nothing but big wa when the copy occurs.

     

    • Like 1
    Link to comment

    can someone elaborate on how is it possible that

    the same set of files i can copy from a HDD from a user share over the network in 15:57 minutes (including 3 minutes of files to copy listing) while writing it to a SSD disk share takes 19:10 minutes?

     

    same server same client same network just few seconds one after another

     

    the same data set can be copied from withing unraid OS in 56 seconds so we are hitting the protocol problem here for sure

     

    or another question. is there anyone here who is not having problem with SMB performance over LAN with small files? (html pages, pictures below 4KB etc)

     

    Link to comment
    6 hours ago, theruck said:

    can someone elaborate on how is it possible that

    the same set of files i can copy from a HDD from a user share over the network in 15:57 minutes (including 3 minutes of files to copy listing) while writing it to a SSD disk share takes 19:10 minutes?

     

    same server same client same network just few seconds one after another

     

    the same data set can be copied from withing unraid OS in 56 seconds so we are hitting the protocol problem here for sure

     

    or another question. is there anyone here who is not having problem with SMB performance over LAN with small files? (html pages, pictures below 4KB etc)

     

    I still have the issue, takes what used to be a 45 mins to 1 hour job on windows to a 6-8 hour job on unraid. Just comparing files and getting the file lists takes forever, no data is even being transferred.

    Link to comment
    On 4/8/2021 at 10:41 AM, JorgeB said:

    Unraid

    967843814_Screenshot2021-04-0809_23_07.png.276f808a0a90f110d31554f89b430611.png

     

    Windows share on another PC

     

    1094968935_Screenshot2021-04-0809_27_25.png.139f59d838025288063b2236fb796d35.png

     

    FreeNAS share

     

    944573647_Screenshot2021-04-0809_24_55.png.68f8056abdea2ae0420ee4633f73d575.png

    so what is the explanation/excuse here? everybody else sucks too? why are we not able to utilize the hardware to its potential? if you complain to limetech about the performance they tell you you have wrong this and that and if you replace all hardware for the supported one it still sucks. so if it is unreal to expect the use of your hardware then it could just be stated in the documentation that dear users we suck at writing small files over the SMB protocol and the reason for that is this and that and there is no bright future. But nothing like that anywhere in sight. Limetech even disabled AFP in the next release instead, the only protocol beside FTP that worked actually.

    Link to comment

    I’ve decided to ditch SMB and move over to NFS.

     

    I’ve configured CCC to mount NFS shares when required and generated some desktop commands to mount other shares.

     

    I don’t think there is going to be an acceptable solution anytime soon so I’ve put the effort in to using a different method!

    Link to comment
    9 hours ago, Orfeous said:

    @TexasUnraid have you consider setting up a windows server for better performence? maybe a windows server vm?
    Any improvements?

     

    I did try a windows VM with mixed results. The issue is that the VM still has to communicate with unraid over SMB internally and thus still had a bad bottleneck.

     

    I used windows before unraid and the performance was much better for small files but the other features of unraid made the switch worth it.

     

    Docker in particular has been a life changing experience.

    Link to comment

    I have the same problems, except worse.

    It takes literally 1-2 seconds for each file that gets transferred to the unraid server, even though they are all 8kb in size. This is just a pain in the a...

    • Like 1
    Link to comment

    Is there any workaround/fix in the forseeable future? I started on 6.8 and all was good and smooth, so I consolidated EVERY-FU-THING into this one X299 Powerhouse and now I have to get revert back to my 10y old QNAP NAS for acceptable file-transfer-speeds??

    I'm running 6.10RC2 and I can't transfer single 10kb files onto shares without reestablishing the connection ultiple-times. SSH (winscp) doesn't work well currently too. Tried with different shares and settings, rebooting the server, this is driving me nuts.

    I blasted well over 3K€ into this HEDT for what? Sub 20Mbps writes? I've got the biggest UR-Licence too, for what?

    This problem has to be fixed ASAP!

    Link to comment
    8 minutes ago, Hank Moody said:

    I'm running 6.10RC2 and I can't transfer single 10kb files onto shares without reestablishing the connection ultiple-times. SSH (winscp) doesn't work well currently too. Tried with different shares and settings, rebooting the server, this is driving me nuts.

     

    You problem is different. Nobody in this topic suffers from reconnects.

    Link to comment
    14 minutes ago, mgutt said:

     

    You problem is different. Nobody in this topic suffers from reconnects.

     

    Depends on if he is talking packet sniffing reconnects or something larger.

     

    IIRC when some packet sniffing was done there was something like reconnects/timeouts happening at the protocol level in this thread but that was some time ago and might not remember correctly.

    Link to comment

    Is there any development on fixing this issue with small files? I invested money into a licence for this software and at its current state it is not usable as an SMB server.

    Link to comment
    6 hours ago, ncoolidg said:

    Is there any development on fixing this issue with small files? I invested money into a licence for this software and at its current state it is not usable as an SMB server.

     

    Unraid fixed their side of the issue, the rest of the issue seems to be a linux/windows issue.

     

    I have found that a faster CPU on the unraid machine helps some.

    Also use direct disk share access and not the user share, this also improves things.

     

    It is still much slower then when I was using windows but the other features of unraid make the switch well worth it. Docker alone is worth the hassle in my case, I have like 20+ of them running and they are just so nice.

     

    BTRFS file system is also Super nice to have. Already caught a few corrupted files here and there that windows would not of (or other linux file systems outside of ZFS).

     

    If you are just setting things up, highly recomend using BTRFS for the file system on all drives, easy to do now, hard later.

     

    Also recommend disk encryption, just good peace of mind. If you ever have to RMA a drive, you don't have to worry about wiping it first.

    Link to comment



    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.
    Note: Your post will require moderator approval before it will be visible.

    Guest
    Add a comment...

    ×   Pasted as rich text.   Restore formatting

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.


  • Status Definitions

     

    Open = Under consideration.

     

    Solved = The issue has been resolved.

     

    Solved version = The issue has been resolved in the indicated release version.

     

    Closed = Feedback or opinion better posted on our forum for discussion. Also for reports we cannot reproduce or need more information. In this case just add a comment and we will review it again.

     

    Retest = Please retest in latest release.


    Priority Definitions

     

    Minor = Something not working correctly.

     

    Urgent = Server crash, data loss, or other showstopper.

     

    Annoyance = Doesn't affect functionality but should be fixed.

     

    Other = Announcement or other non-issue.