Slow SMB Shares

novacrasher

Dabbler
Joined
Nov 25, 2018
Messages
11
I seem to have multiple issues that are likely all related.

First, occasionally when I map a network drive in Windows 10 to my SMB share, the NAS will just sit with the HDD light solid. If I wait long enough it will finally allow me to map the drive. This doesn't happen every time but occasionally.

Second, when I try to access a folder that has a lot of files in it, it can take forever to view the contents of that folder. For example, if I have a folder with 10k+ pictures in it, I sometimes have to wait more than 10 minutes before I can see the files. Once I click on the folder, the HDD light on the NAS goes solid and you can hear the drives doing something (same as above). Even closing the explorer window doesn't help and the NAS remains with the HDD light solid for some time until it completes whatever process was initiated. This same situation can occur when opening a folder that contains only a few subfolders but one of those subfolders contains many files. How can I check the logs to see what is slowing the NAS down?

Third, when I access "folder properties" on my smb share, under "security" it shows the following users/groups: Everyone, Account Unknown (S-15-21...), nobody (MJNAS\nobody). Not sure why the one user is showing up at Account Unknown but that is the main group I think that the matt/jenny users belong to.

Once I am able to view files the NAS works great. I can write to the NAS at 120 MB/s which I am happy with. I mainly use my NAS to store pictures.

I currently have two user accounts (matt, jenny) which are part of a group called MJNAS. MJNAS is the owner group to my shared folders.

I have a volume called "nasdrive" and for some reason seem to have a dataset in that volume called "nasdrive" (I set this up many years ago). I have my NAS_Pics subdataset under under my nasdrive dataset which is my main shared folder with all my pictures. I mostly connect to my NAS from one Windows 10 machine which also has two main user accounts (matt, jenny).


Any help you can provide would be greatly appreciated. The NAS is almost not usable with the current browsing speeds. I'm not super fluent with FreeNAS in terms of troubleshooting so if you want me to provide a log or other info, please give me a few details on how to do so.


System Information:
FreeNAS-11.1-U6
Inetl Pentium CPU G3220 @ 3.00GHz
Memory: 16039 MB
2x 3.0 TB WD Red HDDs (drives are mirrored)

Thank you!
 

kdragon75

Wizard
Joined
Aug 7, 2016
Messages
2,457
Are you running scrubs and smart tests? To me this sounds like a bad disk hanging things up.
 

novacrasher

Dabbler
Joined
Nov 25, 2018
Messages
11
When I go to "storage" and then to "scrubs", it shows I am doing scrubs. I do not know how to see any report from it though.

In terms of SMART, it is enabled for both drives but I'm not sure it has been running any tests. I just added a SMART Tests task but again I don't know how to see those results. There also doesn't seem to be a way to run these tests manually from the GUI.

I should also note that under "reporting" and then "disk", disk busy goes up to about 55% for each of the mirrored disks whenever the HDD light is solid as mentioned above. Something is keeping those drives busy but I don't know what. The fact that this really only seems to be a problem when browsing file folders leads me to believe the HDDs aren't the issue. Seems to me like it may be a permission issue between windows/freeNAS but I am no expert...
 

kdragon75

Wizard
Joined
Aug 7, 2016
Messages
2,457
In terms of SMART, it is enabled for both drives but I'm not sure it has been running any tests. I just added a SMART Tests task but again I don't know how to see those results. There also doesn't seem to be a way to run these tests manually from the GUI.
Yeah these are all shortcomings of the GUI (new and old) in FreeNAS. You can run all of this from the CLI. Search the forms or even google something like "FreeBSD smart test". You want to run a long test (its non-destructive) and read back the results. Post them back here in [ code ] tags. It could be something else but its good to check things out. If FreeNAS does see an error in one of the tests, you will see the alert in the GUI and if you have email setup, you will get an email as well.
 

kdragon75

Wizard
Joined
Aug 7, 2016
Messages
2,457
I do smart short tests one per day and a long once per week just to keep a close eye on the drives.
 

novacrasher

Dabbler
Joined
Nov 25, 2018
Messages
11
Thanks kdragon75 for the help.

I did a short test on each drive. Both completed with no errors.

Code:
[root@MJNAS ~]# smartctl -l selftest /dev/ada0								 
smartctl 6.6 2017-11-05 r4594 [FreeBSD 11.1-STABLE amd64] (local build)		 
Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org	 
																			   
=== START OF READ SMART DATA SECTION ===										
SMART Self-test log structure revision number 1								 
Num  Test_Description	Status				  Remaining  LifeTime(hours)  LBA
_of_first_error																 
# 1  Short offline	   Completed without error	   00%	 15715		 - 

[root@MJNAS ~]# smartctl -l selftest /dev/ada1								 
smartctl 6.6 2017-11-05 r4594 [FreeBSD 11.1-STABLE amd64] (local build)		 
Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org	 
																			   
=== START OF READ SMART DATA SECTION ===										
SMART Self-test log structure revision number 1								 
Num  Test_Description	Status				  Remaining  LifeTime(hours)  LBA
_of_first_error																 
# 1  Short offline	   Completed without error	   00%	 15715		 -



I'm running the long tests tonight and will post results tomorrow. Assuming everything comes back clean, any other suggestions? If I use a photo program such as ACDsee, I can browse through my files without issue / lag. Still seems like a Win10 smb issue...
 

novacrasher

Dabbler
Joined
Nov 25, 2018
Messages
11
Here's what the CLI says about recent Scrubs:
Code:
[root@MJNAS ~]# zpool status																										
  pool: freenas-boot																												
 state: ONLINE																													 
  scan: scrub repaired 0 in 0 days 00:00:23 with 0 errors on Mon Nov 26 03:45:24 2018											   
config:																															 
																																   
	   NAME		STATE	 READ WRITE CKSUM																					 
	   freenas-boot  ONLINE	   0	 0	 0																					
		 da0p2	 ONLINE	   0	 0	 0																					 
																																   
errors: No known data errors																										
																																   
  pool: nasdrive																													
 state: ONLINE																													 
  scan: scrub repaired 0 in 0 days 08:46:27 with 0 errors on Sun Oct 28 08:46:41 2018											   
config:																															 
																																   
	   NAME											STATE	 READ WRITE CKSUM												 
	   nasdrive										ONLINE	   0	 0	 0												 
		 mirror-0									  ONLINE	   0	 0	 0												 
		   gptid/8b20e3d9-8f56-d54f-89e8-874fc066eedb  ONLINE	   0	 0	 0												 
		   gptid/ce4a6361-948f-ee4f-9c08-f9f221905e3a  ONLINE	   0	 0	 0												 
																																   
errors: No known data errors


Here are the results of the long SMART tests:

Code:
[root@MJNAS ~]# smartctl -l selftest /dev/ada0																					 
smartctl 6.6 2017-11-05 r4594 [FreeBSD 11.1-STABLE amd64] (local build)															 
Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org														 
																																   
=== START OF READ SMART DATA SECTION ===																							
SMART Self-test log structure revision number 1																					 
Num  Test_Description	Status				  Remaining  LifeTime(hours)  LBA_of_first_error									 
# 1  Extended offline	Completed without error	   00%	 15722		 -													 
# 2  Short offline	   Completed without error	   00%	 15715		 -													 


[root@MJNAS ~]# smartctl -l selftest /dev/ada1																					 
smartctl 6.6 2017-11-05 r4594 [FreeBSD 11.1-STABLE amd64] (local build)															 
Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org														 
																																   
=== START OF READ SMART DATA SECTION ===																							
SMART Self-test log structure revision number 1																					 
Num  Test_Description	Status				  Remaining  LifeTime(hours)  LBA_of_first_error									 
# 1  Extended offline	Completed without error	   00%	 15724		 -													 
# 2  Short offline	   Completed without error	   00%	 15715		 -													 
																																																													 
 

novacrasher

Dabbler
Joined
Nov 25, 2018
Messages
11
So it appears the drives are in good shape. Any other suggestions? Are there any logs I can check to see why the disks are busy or what it is doing? Once Windows tries to access one of the folders containing many files, the disks become busy and remain busy even if I terminate windows explorer and turn off the computer. This can sometimes take up to 30 minutes and then the NAS goes back to idle... Typically once you have accessed the folder once, browsing is faster for a short while but after logging out / rebooting it takes a long time again. Maybe indexing or something?
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Do you have any Macs? If not, try adding the following as auxiliary parameters for the share:
Code:
ea support = no
store dos attributes = no
map archive = no
map readonly = no
mangled names = illegal

Once you have done this, remove the "streams_xattr" vfs object from the share. You may also consider enabling the "offline" vfs object. This marks the share as "offline storage" which prevents Windows clients from trying to generate thumbnails of the pictures.
 

novacrasher

Dabbler
Joined
Nov 25, 2018
Messages
11
If by "Macs" you mean Mac computers on the network then no. Pretty much just one Windows 10 desktop computer connected. I have some phones and tablets connected to the network as well but haven't set up access to the NAS from these devices yet due to the slow speed issue.

After a few short tests and a reboot, this seems to have resolved the issue. Time will tell. I did not enable "offline" vfs object yet but if I run into issues I'll try that next. Any idea which one of the above parameters likely fixed the problem? Out of curiosity I may remove one auxiliary parameter at a time and see when it breaks.

I have a really basic setup and spent a lot of time combing through forums and troubleshooting before posting the question and asking for help. I'm just curious as to why one has to add these special parameters and why they aren't done be default. I'm not an advanced network guru so maybe FreeNAS just isn't geared toward newbs such as myself.

Thank you very much for the support though. My wife has been trying to comb through pictures to put together Christmas presents for parents/grandparents and has been getting very frustrated with the painfully slow speeds. :smile:
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
If by "Macs" you mean Mac computers on the network then no. Pretty much just one Windows 10 desktop computer connected. I have some phones and tablets connected to the network as well but haven't set up access to the NAS from these devices yet due to the slow speed issue.

After a few short tests and a reboot, this seems to have resolved the issue. Time will tell. I did not enable "offline" vfs object yet but if I run into issues I'll try that next. Any idea which one of the above parameters likely fixed the problem? Out of curiosity I may remove one auxiliary parameter at a time and see when it breaks.

I have a really basic setup and spent a lot of time combing through forums and troubleshooting before posting the question and asking for help. I'm just curious as to why one has to add these special parameters and why they aren't done be default. I'm not an advanced network guru so maybe FreeNAS just isn't geared toward newbs such as myself.

Thank you very much for the support though. My wife has been trying to comb through pictures to put together Christmas presents for parents/grandparents and has been getting very frustrated with the painfully slow speeds. :)

The combination of all of them is pretty much required. They mostly deal with DOS modes (Archive | Readonly | System | Hidden), and 8x3 names (legacy DOS crap). I'm in the process of writing a VFS module that will significantly improve performance for directory listings.
 

novacrasher

Dabbler
Joined
Nov 25, 2018
Messages
11
Well thank you again for the support!

How will your new vfs module be incorporated? Will it just automatically be included and enabled in newer versions of FreeNAS and will it automatically be enabled? At that point will I need to remove those extra auxillary parameters that I added?
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Well thank you again for the support!

How will your new vfs module be incorporated? Will it just automatically be included and enabled in newer versions of FreeNAS and will it automatically be enabled? At that point will I need to remove those extra auxillary parameters that I added?

It will be non-default and experimental.
 

marcus8699

Dabbler
Joined
May 4, 2020
Messages
17
It will be non-default and experimental.

Hi Anodos,

I read through this thread and tried enabling the aux parameters and disabling "streams_xattr" and adding offline. I seem to still get an issue when accessing a folder it takes a while to load. I have tried accesing the same folder on another PC and it works fine from time to time but every now and then it hangs for an extended period of time and I have to close windows explorer and then try to re-access. Any suggestions?
 

marcus8699

Dabbler
Joined
May 4, 2020
Messages
17
Not sure if the SMB is the problem. I did a CrystalDiskMark to the shared drive from my Server VM on the same ESXi box and got some strange results. (posted below). I then compared them to my 1Gig Desktop PC but was able to see results for the sequential rate. Gonna try to reinstall Windows Server as I was playing with a lot of settings recently within Windows Server to try and achieve 10Gig and may have screwed something up.

WindowsServer.PNG
 

Attachments

  • DesktopPC.PNG
    DesktopPC.PNG
    33.9 KB · Views: 308

marcus8699

Dabbler
Joined
May 4, 2020
Messages
17
WinServerReIn.PNG
Mustve been some setting. Now I am back to being curious to why I get 1200 Read and only 400+ write thats for another forum post I suppose....
 
Top