FreeNAS 8.3.0p1 CIFS "Support DOS File Attributes" and list file/folder performance

Status
Not open for further replies.

rluiten

Cadet
Joined
Jan 26, 2013
Messages
6
I noticed some performance issues when I list files and folders on the NAS unit.
One of the most visible scenario's for me was backing up my PC with FreeFileSync to the NAS.
It scans my local folder and the destination folder and copies across changes - this was taking very long to scan the NAS.
I am posting this in the hope to get some feedback if I might have missed something and possibly it might help someone else.

-------- RESULTS SUMMARY --------

When "Support DOS File Attributes" is Disabled
The time to recursive list the file system does not vary a lot.
The difference in time to recursively scan path my test paths (D5 and D6 see below) are both under 12 seconds.

When "Support DOS File Attributes" is Enabled
The copying of the 30000 files and folders took a fair bit longer (twice) than when it is disabled.
The time to recursive list the file system is much much slower for a hierarchy created with DOS File Attributes Enabled.
Over 10 times slower, this is the behavior that first got my notice.

I can just disable "Support DOS File Attributes" and things work well enough - which is what I have done at the moment.

I would like to understand what Samba is doing when its on and how the data is stored and looked up.
ZFS is capable of holding extended attributes 'xattr' feature - but his feature under FreeBSD is not supported.
When I try to enable it i get back this error "property 'xattr' not supported on FreSD: permission denied"
So I assume Samba cant use this on FreeNAS.

This means that Samba is storing the dos file attributes some other way.
I have been trying to find out how it is being stored and if there might be shell tools i could look at the data with.
Any pointers to information would be appreciated.

-------- SETUP AND TESTING --------

Hardware I have a HP Microserver N36L with 8 GB of ram and 6 * 1.5 TB drives,
I have included my smb.conf file at end for reference.
I have Freenas 8.3.0 p1 installed on it.
I created zpool of all 6 drives a single non redundant volume called tank.
ZFS options atime is disabled. Compression is off, Deduplication is off.

Created a local user with group membership in staff.
Created a top level data store 'b1' on zpool with owner root group staff.

Network options machine called "mynas"

CIFS Server Options (unlisted options here are defaults afaik)
Authenticatoin Modle "Local User"
NetBIOS name "mynas"
Workgroup "WORKGROUP"
Large RW support ON
Send files with sendfile(2) ON
Extended Attributes ON
Support DOS File Attributes ON
Unix Extensions OFF
Enable AIO OFF

CIFS Share of b1
Data store b1 as b1.
Browsable to Network Clients ON
Show Hidden Files ON

Reboot the Freenas server to make sure all options apply.

Some of my testing has demonstrated to me that changing "Support DOS File Attributes" and restarting CIFS is not sufficient to change the operation of the NAS. (This surprised me and I have no idea why it appears to behave this way for me)

My test PC runs Windows 7 SP1 64 bit up to date with windows patches.
It is an Intel CPU i5 3570 with 16GB of ram and an SSD boot drive with a few other sata data drives.
I am using FreeFileSync to copy these files but its just a folder of misc files I have on my drive FreeFileSync is pretty efficient at copying.

The folllowing steps set up the NAS file and folders to demonstrate the performance I am observing, in the hope that someone may point out something I may have done wrong and or reproduce it for themselves. The target Nas folders D5 and D6 are initially empty

Copy 30000 files and 135 folders in one hierarchy (18.4GB total files size) to NAS. This took 21 minutes to path \\mynas\b1\D5
Disable Support DOS File Attributes in CIFS Service Configuration
Reboot (Note just restarting CIFS service is not sufficient to always change behaviour I have noticed)

Copy 30000 files and 135 folders in one hierarchy (18.4GB total files size) to NAS. This took 12 minutes minutes to path \\mynas\b1\D6
Reboot the NAS - this is to ensure any cached data is cleared.

Using Powershell to measure duration I will list recursive all files and folders in the D5 and D6 paths.
Please note I do not use get-childitem -recurse in Powershell v2 as it has very high overhead compared to cmd dir /s.

Launch Powershell to take list file folder measurements.

List recursive on nas path D5 (was created with DOS File Attributes Enabled)
COMMAND
(measure-command {cmd /c dir /s \\mynas\b1\D5}).TotalMilliseconds
OUTPUT
11363.7146 milliseconds

List recursive on nas path D6 (was created with DOS File Attributes Disabled)
COMMAND
(measure-command {cmd /c dir /s \\mynas\b1\D6}).TotalMilliseconds
OUTPUT
7836.9603 milliseconds

Now on the NAS
Enable Support DOS File Attributes in CIFS Service Configuration
Reboot

List recursive on nas path D5 (was created with DOS File Attributes Enabled)
COMMAND
(measure-command {cmd /c dir /s \\mynas\b1\D5}).TotalMilliseconds
OUTPUT
113911.5103 milliseconds

List recursive on nas path D6 (was created with DOS File Attributes Disabled)
COMMAND
(measure-command {cmd /c dir /s \\mynas\b1\D6}).TotalMilliseconds
OUTPUT
9036.8774 milliseconds


I have included my smb.conf below for reference this case is with "Support DOS File Attributes" Enabled.
-------- My smb.conf file --------
[global]
encrypt passwords = yes
dns proxy = no
strict locking = no
read raw = yes
write raw = yes
oplocks = yes
max xmit = 65535
deadtime = 15
display charset = LOCALE
max log size = 10
syslog only = yes
syslog = 1
load printers = no
printing = bsd
printcap name = /dev/null
disable spoolss = yes
smb passwd file = /var/etc/private/smbpasswd
private dir = /var/etc/private
getwd cache = yes
guest account = nobody
map to guest = Bad Password
obey pam restrictions = Yes
# NOTE: read smb.conf.
directory name cache size = 0
netbios name = tink
workgroup = WORKGROUP
server string = tink is a FreeNAS Server
use sendfile = yes
ea support = yes
store dos attributes = yes
unix extensions = no
local master = yes
time server = yes
null passwords = yes
security = user
create mask = 0666
directory mask = 0777
client ntlmv2 auth = yes
dos charset = CP437
unix charset = UTF-8
log level = 1


[b1]
path = /mnt/tank/b1
printable = no
veto files = /.snap/.windows/.zfs/
comment = b1 share
writeable = yes
browseable = yes
inherit owner = no
inherit permissions = no
vfs objects = zfsacl
hide dot files = no
guest ok = no
inherit acls = Yes
map archive = No
map readonly = no
nfs4:mode = special
nfs4:acedup = merge
nfs4:chown = yes

Yours Sincerly, Rob.
I appreciatte any feedback or ideas.
 
Status
Not open for further replies.
Top