matthewowen01
Guru
- Joined
- May 27, 2011
- Messages
- 566
I've seen a lot of people disabling zfs prefetch (zfs_prefetch_disable=1) citing improved performance. but all the testing I've seen so far will not benefit with prefetch enabled (zfs_prefetch_disable=0). Prefetch is designed to read more than requested and cache it with the hope that it will be used soon before it gets ejected from cache for other data. this has some overhead and only helps if the read head is bouncing around the hard disks working on multiple requests. i decided to do some benchmarking that is more real world then a single linear request.
The test consists of 8 workers, each reading in 4k chunks, linearly 80% of the time, and jumping 20% of the time working on an 80 GB file, my system has 8 GB of memory. here is what i found.
in all cases performance was better with prefetch enabled(zfs_prefetch_disable=0).
iops improved by 5.6%
throughput improved by 4.7%
latency decreased by 5.6%
Disabling zfs prefetch (zfs_prefetch_disable=1) will improve performance for single linear operations, ie, reading with dd. but you'll take a performance hit the more things you do in parallel.
all of my drives are the 'green' drives, slower spin == longer latency. when i have more time (it's 3 am) I'll try tweaking how much it caches and how large the cache is. I'm hoping to get even more performance. when the head stays put, my drives read fast, but they are slow to seek to a new spot. reducing that should give me a boost.
The test consists of 8 workers, each reading in 4k chunks, linearly 80% of the time, and jumping 20% of the time working on an 80 GB file, my system has 8 GB of memory. here is what i found.
in all cases performance was better with prefetch enabled(zfs_prefetch_disable=0).
iops improved by 5.6%
throughput improved by 4.7%
latency decreased by 5.6%
Disabling zfs prefetch (zfs_prefetch_disable=1) will improve performance for single linear operations, ie, reading with dd. but you'll take a performance hit the more things you do in parallel.
all of my drives are the 'green' drives, slower spin == longer latency. when i have more time (it's 3 am) I'll try tweaking how much it caches and how large the cache is. I'm hoping to get even more performance. when the head stays put, my drives read fast, but they are slow to seek to a new spot. reducing that should give me a boost.