SOLVED File Scanning speeds over SMB vs. NFS (Plex Library Scanning)

Status
Not open for further replies.

ethanf

Dabbler
Joined
Jul 1, 2017
Messages
26
Maybe this will help others who have issues with a slow Plex library scan:

I have separate Windows 10 system for running Plex since it has a much newer and faster CPU. I used to have all my data on many USB drives and when Plex scanned my 50TB library it moved rather quickly--only about 5 minutes.

Now that I have my data on a separate FreeNAS box I initially connected to it using 1GB NIC via SMB. I noticed the time to scan the library went from 5 minutes to 5 hours. However when transferring files to and from I maxed out my 1GB NIC.

I then created a new NFS share and had Plex connect using that and I'm back to the 5 minute scan time. I suspect that since NFS is multi-threaded it is much quicker at traversing the files and folders. Also, for the number of servers NFS service setting I put 32. The help icon states 4-6 is usually fine but since I have 2x Xeon processors and does nothing else (no VMs and no jails) I set it to 32.
 

toadman

Guru
Joined
Jun 4, 2013
Messages
619
Interesting. Are you using the native nfs client on the Windows 10 box?
 

ethanf

Dabbler
Joined
Jul 1, 2017
Messages
26
I am using the native NFS Client for Windows 10. Had to install the feature since it's not included by default.

Here's some information on that process too. I had some trouble finding reliable help:
  1. Install the NFS Client from Windows Features (pretty standard stuff here).
  2. Change the default anonymous Uid (user ID) and Gid (group ID) in the Windows registry to the values you set for the Maproot User and Maproot Group in the Advanced mode of the NFS share.
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ClientForNFS\CurrentVersion\Default\AnonymousUid
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ClientForNFS\CurrentVersion\Default\AnonymousGid
    What you won't find readily documented is that the NFS Client service requires a restart after making the change. However, you cannot just restart the service from services.msc. If you try you'll get an error when trying to start it back up. You have to actually reboot.
  3. Map the share by using the mount command (make sure to use nolock):
    mount -o anon nolock \\{ip of freenas}\{path displayed in NFS share panel} {drive}:
  4. So mine looked like: mount -o anon nolock \\192.168.10.15\mnt\pool1\plex y:
  5. Verify that you're using the correct Uid and Gid by right-clicking on the mapped drives, Properties > NFS Mount Options. At the bottom you'll see User Authentication and make sure they're set properly. I believe the default would show -2 for both, so that means you did something wrong.
This was the most helpful page here:
http://www.ibmconnections.org/wordp...re-windows-nfs-client-with-write-permissions/
 
Last edited:
Status
Not open for further replies.
Top