Browsing file system(NFS) with ZFS sync=disable is faster then sync=standard. Why?

Status
Not open for further replies.

kling

Dabbler
Joined
Oct 26, 2014
Messages
13
Hi all!
I have a question regarding reads of a NFS mapped networked drive from an FreeNAS system, see signature, towards my MacBook Air.

When zfs sync is set to standard the browsing of a directory take "ages", seconds... (dir with a couple of 100 files in it).
When zfs sync is set to disabled the browsing of the same directory or other directory is lightning fast.
On the same wireless network, I have not moved the MBA.

Why is that? I thought that sync was only for writes? I know that ESXI and NFS is a performance hit when it comes to writes. But reads? When I´m seeing this behaviour I´m thinking of buying two small SSDs and using them in mirror as SLOG. But that will only help with writes.. or have I totally missed something?

I mount my NFS on the MBA using this command:
mount -t nfs -o soft,intr,rsize=8192,wsize=8192,timeo=900,retrans=3,proto=tcp 192.168.0.110:/mnt/tank /Volumes/tank

Regards,
Magnus
 
Last edited:

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Well, multiple things are going on. I can't tell you what is going on for your exact situation, but it's like this:

1. sync=disabled is dangerous (I think you know this)
2. Setting sync=disabled (or using SLOG) increases the efficiency of the pool I/O, which does, in turn, affect read performance both directly and indirectly.
3. Many times when you are doing reads there are writes taking place as a direct and/or indirect consequence. For example, atime (access time) can generate quite a bit of writes for the file system. If you don't need access times for the files you should disable it for performance reasons. Your client may also be doing things that are automatically taking place in the background that are causing writes either directly or indirectly.
4. Based on what you just demonstrated, it's obvious that an slog will help. The "easy test" is to disable sync and see if the pool performs better. If it does then you should look at an slog. So go shopping. ;)

Intel SSDs seem to be the performance king for slogs. Lots of other brands seem to work, but they don't work 'as well' and some downright suck. So be careful what brand you buy. ;)
 

kling

Dabbler
Joined
Oct 26, 2014
Messages
13
Well, multiple things are going on. I can't tell you what is going on for your exact situation, but it's like this:

1. sync=disabled is dangerous (I think you know this)
2. Setting sync=disabled (or using SLOG) increases the efficiency of the pool I/O, which does, in turn, affect read performance both directly and indirectly.
3. Many times when you are doing reads there are writes taking place as a direct and/or indirect consequence. For example, atime (access time) can generate quite a bit of writes for the file system. If you don't need access times for the files you should disable it for performance reasons. Your client may also be doing things that are automatically taking place in the background that are causing writes either directly or indirectly.
4. Based on what you just demonstrated, it's obvious that an slog will help. The "easy test" is to disable sync and see if the pool performs better. If it does then you should look at an slog. So go shopping. ;)

Intel SSDs seem to be the performance king for slogs. Lots of other brands seem to work, but they don't work 'as well' and some downright suck. So be careful what brand you buy. ;)

Thanks for the information. Yes, I´m well aware of sync=disable.
Now, shopping for 2x ~60GB SSD! :)

EDIT: Changed atime=off made ALOT for browsing a folder. Almost the same as setting sync=disable.
Now I only need to dig into what atime does for the data...
 
Last edited:
Status
Not open for further replies.
Top