Page 1 of 1

Samba ZFS very slow work

Posted: 13 Oct 2014 18:23
by aklyuk
Hi
I am Nas4free server. (i3-3220, asus P8Z77-V LX, 8Gb memory Kingston NonECC, and 4 hard drive WD Red 2Tb). I have Gigabit Ethernet. Gateway is Mikrotik.
Nas4Free is 9.2.0.1 - Shigawire (revision 972)

I create Raidz-2 array:
zpool status
pool: pool1
state: ONLINE
scan: none requested
config:

NAME STATE READ WRITE CKSUM
pool1 ONLINE 0 0 0
raidz2-0 ONLINE 0 0 0
ada0 ONLINE 0 0 0
ada1 ONLINE 0 0 0
ada2 ONLINE 0 0 0
ada3 ONLINE 0 0 0

errors: No known data errors
And i setup CIFS Share.
cat /vat/etc/smb.conf
[global]
encrypt passwords = yes
netbios name = storageserver
workgroup = WORKGROUP
server string = NAS4Free Server
security = user
max protocol = SMB2
dns proxy = no
# Settings to enhance performance:
strict locking = no
read raw = yes
write raw = yes
oplocks = yes
max xmit = 65535
deadtime = 15
getwd cache = yes
socket options = TCP_NODELAY SO_SNDBUF=64240 SO_RCVBUF=64240
# End of performance section
unix charset = UTF-8
store dos attributes = yes
local master = no
domain master = no
preferred master = no
os level = 0
time server = no
guest account = ftp
map to guest = Bad User
display charset = LOCALE
max log size = 100
syslog only = yes
syslog = 3
load printers = no
printing = bsd
printcap name = /dev/null
disable spoolss = yes
log level = 3
dos charset = CP1251
smb passwd file = /var/etc/private/smbpasswd
private dir = /var/etc/private
passdb backend = tdbsam
idmap config * : backend = tdb
idmap config * : range = 10000-39999
aio read size = 4096
aio write size = 4096

[CommonShare]
comment = commshare
path = /mnt/pool1/WinShare/CommonShare/
writeable = yes
printable = no
veto files = /.snap/.sujournal/
hide dot files = yes
guest ok = yes
inherit permissions = yes
vfs objects = zfsacl
veto files = /.zfs/

[ParolShare]
comment = WithPassword
path = /mnt/pool1/WinShare/ParolShare/
writeable = yes
printable = no
veto files = /.snap/.sujournal/
hide dot files = yes
guest ok = no
inherit permissions = yes
vfs objects = zfsacl
veto files = /.zfs/

I have client Windows 7 Ultimate. Copy speed with Windows 7 to Nas4free very good (70-90 Mbs) but authorization/authentication very slow.
Example:

1. Double click on the icon server --> wait over 30 seconds --> the icon opened
2. Double click on the folder (acces without password) --> wait over 30 seconds --> the folder opened
3. Double clibck on the folder (access with password) --> wait over 30 seconds --> password request

What could be the problem? Why samba is slow work?

Thank for help

Re: Samba ZFS very slow work

Posted: 15 Oct 2014 07:14
by crowi
8Gb memory Kingston NonECC
First of all, don't run ZFS without ECC RAM. Never!

Re: Samba ZFS very slow work

Posted: 15 Oct 2014 11:54
by aklyuk
Yes, I know. I have not other memory.
I installed FreeNAS and ZFSGuru for test. Samba behaves in the same.

Re: Samba ZFS very slow work

Posted: 15 Oct 2014 14:54
by crowi
work through this
http://n4f.siftusystems.com/index.php/2 ... /comments/

and switch either to UFS or ECC memory, if your data is valuable

Re: Samba ZFS very slow work

Posted: 15 Oct 2014 20:05
by aklyuk
Thanks for the answer. This didn't help.
I have two shares.
CommonShare -- without password. Guest access.
ParolShare -- with password. Guest access disabled.

CommonShare opens quickly. But, ParolShare opens very slow. (Windows querying password opens very slow.) I think, the problem is in the authorization. But how can i solve it???

I setup FTP server. Access without anonymous, only local user. Here, athorization is slow. I user GoogleChrome and Filezilla. Filezilla is a little bit faster.

Where there may be a problem??

Re: Samba ZFS very slow work

Posted: 16 Oct 2014 15:46
by vkyk
Dear crowi,

I run ZFS (3x 2T HDDs + 1x640G HDD for system) without ECC ram and the speed is very slow. As per your above advice, I should switch back to UFS. How about Software RAID? Any advices how to switch back to UFS by using these 3 HDDs + 1 system HDD as I don't have spare HDD.

Re: Samba ZFS very slow work

Posted: 16 Oct 2014 16:20
by crowi
1 system HDD as I don't have spare HDD
Use an USB stick to boot from and install the embedded system.

Converting:
a) Back up your data
b) destroy the ZFS pool
c) re-format the disks to UFS
d) create SoftRAID device
e) restore the data from the backup

Re: Samba ZFS very slow work

Posted: 16 Oct 2014 16:46
by vkyk
Crowi,

I remember it is difficult to destroy ZFS pool as the system will not reformat ZFS disks. Any further instructions to destroy ZFS pools and reformat them? Will Software RAID be better than UFS in speeding the system?

Re: Samba ZFS very slow work

Posted: 16 Oct 2014 17:22
by crowi
http://lmgtfy.com/?q=destroy+zpool+

http://docs.oracle.com/cd/E19253-01/819 ... index.html
and
http://docs.oracle.com/cd/E19253-01/819 ... index.html
Use

Code: Select all

zpool destroy -f Poolname
in the shell to destroy the pool.

then you can use

Code: Select all

gpart destroy -F adaX
for each drive to destroy the partitions, following this you can format the drives again.

Re: Samba ZFS very slow work

Posted: 25 Oct 2014 01:58
by 00Roush
Not really sure if this might apply but you might try turning off store dos attributes in Samba. It might help but generally this is only if you have lots of files and folders.

00Roush