Jump to content

Optimal SAMBA settings to get better MacOS to Unraid performance


ChannelD

Recommended Posts

Posted

all i have to say is wow....i made these changes to sonoma 14.4.1 /unraid 6.12.10 and the mac experience is far better.  i have a large array and directory listings are almost instant.  

Posted
6 hours ago, oliver said:

all i have to say is wow....i made these changes to sonoma 14.4.1 /unraid 6.12.10 and the mac experience is far better.  i have a large array and directory listings are almost instant.  

I presume that you have gotten several backup to go? or do you do a manual back up?

Posted
3 hours ago, ijuarez said:

I presume that you have gotten several backup to go? or do you do a manual back up?

 

i don't use unraid for time machine, couldn't say. 

  • 2 months later...
Posted (edited)
On 10/22/2023 at 12:04 PM, ChannelD said:

(and it is not being Unraid's fault).

 

I suppose you might say it's the underlying OS Unraid is using, but that's not really here nor there. MacOS in my experience only has issues with Unraid's SMB shares. I've been using NFS shares for years now because nothing I've tried has improved the situation for SMB. Even if I can see a few file transfers at 100MB/s on a 1GBe connection, the fact that a folder listing will hang for 5-30 or more minutes makes it unusable.

 

I've been using Unraid close to 7 years and I just recently mentioned I wanted to split docker and VM out of the array system. I was thinking about using Proxmox and CasaOS webUI on a new system I'm setting up for VM/Docker and keeping Unraid on the general NAS. Maybe I should do it the other way around, and move my Unraid key over to the new system for VM/Docker only and set up TrueNAS Scale for the NAS-only system.

...or maybe I just run Unraid on both systems because everything else out there has a pretty large nightmare component to it...  But that damned SMB performance..

Edited by Espressomatic
Posted (edited)
On 12/16/2023 at 6:29 PM, Nano said:

So I have tried this, simply making a fresh truenas VM within Unraid with base settings is insane fast and works out of the box, has anyone else got the time to confirm and spin up a Truenas VM, It must be something in the OS, we should NOT need a million settings to get better performance

 

Here's a suggestion (which I intend to try myself): Spin up a Debian/Ubuntu VM, let it access Unraid's share folders, set up SAMBA and export shares from within that VM.

 

Looks like there was a much simpler alternative. I just had to share an unassigned device to realize full speed testing on Samba. 117MB/s up or down without issue, multiple times over.

Edited by Espressomatic
  • 4 months later...
Posted
On 12/17/2023 at 12:29 AM, Nano said:

So I have tried this, simply making a fresh truenas VM within Unraid with base settings is insane fast and works out of the box, has anyone else got the time to confirm and spin up a Truenas VM, It must be something in the OS, we should NOT need a million settings to get better performance

thank you so much for your opinion. I think this true. 

 

let me add some tests and experiences from today:
 

I mainly use MacOS and I am accessing SMB shares from UNRAID. The shares are mounted via Finder on the Mac. 
I usually have big problems with this access: Data transfer is slow. Finder takes a long time to load when opening folders. Preview of images loads slowly. Folders with many files (approx. 1000 - 5000) can hardly be scrolled through without the Finder having to “pause and load”. Performance in Adobe Lightroom Classic very poor. 
(all negligible if you just look at e.g. pdfs or similar, but all the worse with pictures or videos)
 
How can it be that everyone has to find their own parameters for themselves and their setup to set the SMB connection? I have seen so many different combinations of smb settings in Unraid and tested a few. For me, they rarely made a significant difference. 
In between I found a configuration that was “ok”. When importing large amounts of data into Lightroom, I still have “endless” waiting times.

 

Therefore two small but interesting tests:
1. Windows10 VM under UNRAID: I create a folder and share it via the Windows share in the network. 
2. Ubuntu VM under UNRAID: Samba server installed and a shared folder created
 
I mounted both shares under MacOS and copied some files and tested Lightroom imports. 
The shares perform perfectly: no waiting times when opening folders, the preview of images is practically instant, I achieve the full gigabit speed of my network and a Lightroom import with writing metadata and creating previews is super fast. 
Interesting: these shares are both displayed as “PC” under Mac, sometimes with an “old PC” as an icon. Unraid is displayed as “Mac Server”. 
The test setup also shows: this is not due to disks, other hardware, network, macOS, ...
 
For this reason, I honestly don't think it makes sense to reconfigure SMB in MacOS... also recommended often
 
Are we overseeing something? On all systems (windows, Mac, Ubuntu) nothing has been reconfigured, everything standard. Why doesn't this work with UNRAID?
 

Happy to hear any recommendations 
 
Thanks in advance. 
 

Stefan

Posted (edited)

Unraid is just as fast as TrueNAS if you're accessing a share that has "Exclusive access" enabled - it must not be set up to use mover and can't be part of a regular array. So using Unraid 7, where you don't need an array, you can use a nice ZFS Pool and there are no such issues with MacOS and SMB. Wicked fast always.

 

No (other) special configuration on Unraid or MacOS - except to turn on Exclusive Access in the Unraid Disk settings and the restrictions I mentioned above.

Edited by Espressomatic
Posted (edited)
14 hours ago, Espressomatic said:

Unraid is just as fast as TrueNAS if you're accessing a share that has "Exclusive access" enabled - it must not be set up to use mover and can't be part of a regular array. So using Unraid 7, where you don't need an array, you can use a nice ZFS Pool and there are no such issues with MacOS and SMB. Wicked fast always.

 

No (other) special configuration on Unraid or MacOS - except to turn on Exclusive Access in the Unraid Disk settings and the restrictions I mentioned above.

Is Exclusive Access a Unraid 7 feature?

 

Never mind I answer my own question.

 

I tried this also and maybe got 3 backups to work and then it would stop.

 

 

Edited by ijuarez
Posted (edited)

Your share should look like this, right?

 

Exclusive yes, no secondary storage, no mover.

 

image.png.26feb53827dc216208925b6f2bcef41b.png

 

Then this is my SMB settings page:

 

image.png.4755b40b8cf6b1af1fa7ca427dd269e5.png

 

That's my setup on three systems. On a fourth system, it turns out I still have some left-over SMB Extra parameters specified from before I updated to Unraid 7 and switched to using ZFS Pools. However, all 4 systems seem to work as reliably as each other.

 

#vfs_fruit compatibility for Apple SMB
[global]
vfs objects = catia fruit streams_xattr
fruit:nfs_aces = no
fruit:zero_file_id = yes
fruit:encoding = native
spotlight backend = tracker

fruit:metadata = stream
fruit:posix_rename = yes
readdir_attr:aapl_max_access = no
readdir_attr:aapl_finder_info = no
readdir_attr:aapl_rsize = no

 

Edited by Espressomatic
Posted

@Espressomaticthank you so much for this game changing hint! I configured two of my shares like that.

 

in the shares I put on exclusive, I (mostly) get the same performance now (compared to windows shares and my Lightroom test from above)

but there are still some limitations:

 

  • finder browsing into folders with >1000 files still takes some seconds of loading time
  • further, finder is always collecting all the image thumbnails, which makes scrolling pretty laggy in the beginning. not sure if there is a solution for that. 
  • but, preview of images is instant
  • upload and download saturates the gigabit network on an ssd raid. But, writing to the HDD RAID1 btrfs pool seems to be limited to 50MB/s most of the time. Sometimes it jumps to 100MB/s, then down to zero... (drives are definitely capable of >100MB/s, tested on windows)
  • different smb-extra settings don't seem to make any changes to the speed. 

 

some further thoughts: 

luckily I already had my media share sitting on a pool (raid 1 hdds with btrfs), so I could quickly give that a try. 

but in general, so far as I understand, there is no chance to reach this performance with the ease of use of the unraid array. transferring files with the mover back and forth...

we are bound to the pools, correct?

the main disadvantage I see is: you have to think about the storage structure, space, performance and so on before adding files. this restricts the whole flexibility of the unraid system which actually makes it special

 

and another question to @Nano:

can you please explain the most important steps for your "UNRAID > TrueNAS VM > SMB" setup?

(virtual disks on array?, passthrough of unraid shares?, zfs pool setup,...)

 

thank you

 

 

Posted
2 hours ago, stebwen said:

but in general, so far as I understand, there is no chance to reach this performance with the ease of use of the unraid array. transferring files with the mover back and forth...

 

Not yet. But there is support for FUSE passthrough coming in an eventual kernel update which may change that.

 

 

  • Like 1
  • 2 weeks later...
Posted (edited)

So, I have 3 UnRaid systems running 7.0.0 b4. 
 

I am trying to access shares on multiple Macs running Ventura latest.  Using the UnRaid UI>Main>SMB Shares>Add Remote Share

 

Select Windows, select server, username, password, domain=WORKGROUP, select share.  
 

OK that works.  The share shows on UI>Main.  I click mount and it won’t mount.   Log shows errors. 
 

The shares on the Macs are seen by the other Macs.  
 

What am I missing?

 

I did try creating remote shares from another UnRaid box and that works fine.  They will mount and can be browsed. 

 

 

Edited by DWomack
Correction
Posted
21 minutes ago, DWomack said:

So, I have 3 UnRaid systems running 7.0.0 b4. 
 

I am trying to access shares on multiple Macs running Ventura latest.  Using the UnRaid UI>Main>SMB Shares>Add Remote Share

 

Select Windows, select server, username, password, domain=WORKGROUP, select share.  
 

OK that works.  The share shows on UI>Main.  I click mount and it won’t mount.   Log shows errors. 
 

The shares on the Macs are seen by the other Macs.  
 

What am I missing?

 

 

I would suggest posting on the UD support thread since it sounds like that’s what you are using to attempt the mount.

https://forums.unraid.net/topic/92462-unassigned-devices-managing-disk-drives-and-remote-shares-outside-of-the-unraid-array/

Posted
On 11/4/2024 at 12:21 AM, Espressomatic said:

Unraid is just as fast as TrueNAS if you're accessing a share that has "Exclusive access" enabled - it must not be set up to use mover and can't be part of a regular array. So using Unraid 7, where you don't need an array, you can use a nice ZFS Pool and there are no such issues with MacOS and SMB. Wicked fast always.

 

No (other) special configuration on Unraid or MacOS - except to turn on Exclusive Access in the Unraid Disk settings and the restrictions I mentioned above.

Damn. I didn't understand what this does when 12.6 came out and I've been living under a rock all this time.

Thanks for this. Just tried it and everything loads in an instant on a folder with hundreds of raw images. I can finally use my NAS properly.
I was really considering switching to Qnap/Synology because of the slow user experience using macOS and Unraid.

 

  • Upvote 1

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
Reply to this topic...

×   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.

×
×
  • Create New...