sync vs async vs zfs

Paul Kraus paul at kraus-haus.org
Fri Sep 25 01:11:13 UTC 2015


On Sep 24, 2015, at 16:53, Quartz <quartz at sneakertech.com> wrote:

>> Very short answer…
> 
> OK, thanks. So far that lines up with what I thought I knew. I still think I might be fuzzy on what constitutes an 'app' in this context though, presumably you're also counting services like nfs, etc?

Anything that generates a FS read or write request :-) So yes, the kernel NFS server counts.

>  Basically, when considering just boring file copies, which things are or are not async and when? Under what circumstances is sync actually used in the real world?

I expect that system utilities like cp and tar do not do sync writes. sync writes are supposed to be a special case, used only when needed. I run into them with VBox writing to <>.vmdk files.

> you can
>> use a device which is much faster than the main zpool devices
> 
> Also
> 
> 1) A SLOG's only purpose is to reduce fragmentation and increase sync speed, correct? Re: speed, using a SLOG that's the same speed as the other drives in a pool is mostly pointless, right?

Correct. And I proved that on one of my servers in pre-prodcuction testing. I was able to find the bottleneck using iozone -o and then added a mirrored pair of SSD as SLOG write performance went _down_ for 4KB random writes! I then tested the SSDs on their own and confirmed that the performance I was seeing was the native performance of the SSDs. I asked for recommendations of a good, fast SSD over on the OpenZFS list and ordered a pair of Intel 200 GB S3710 SSDs, they are back ordered, so the server awaits full production use.  

> 2) Async doesn't really care how your pool is constructed, and a SLOG is really the only thing that seriously makes a difference for sync, correct?

Not quite true. Once you get through the ARC the configuration of the zpool _will_ matter to performance. In fact, for reads, unless you workload closely matches the prefetch algorithm, the zpool layout will have an effect on performance. Remember, as a general rule, you get one spindle’s (drive’s) worth of performance per top level vdev in the zpool. So a zpool with one vdev that is an 8 drive RAIDz2 will have much less performance than a set of 4 2-way mirrors.

--
Paul Kraus
paul at kraus-haus.org



More information about the freebsd-questions mailing list