Wong, James (Nagi Long)
2009-May-20 21:55 UTC
[zfs-discuss] Any fragmentation issue with zfs, espeically loaded with lots of snapshots
Hi, I''d like to know more about this topic. However, googling doesn''t give me much. If you guys know of any info, please point me to it. I understand zfs has high performance write, even with lots snapshots. How about read performance? To me, it will be a very fragmented due to the COW. And no matter how careful you allocate the blocks, you can only put a SHARED block in the proximity of one particular snapshot and to other snapshots, the shared block won''t be in proximity - a fragmentation situation. Appreciate any help, James _____________________________________________________________________________ ATTENTION: The information contained in this message (including any files transmitted with this message) may contain proprietary, trade secret or other confidential and/or legally privileged information. Any pricing information contained in this message or in any files transmitted with this message is always confidential and cannot be shared with any third parties without prior written approval from Syncsort. This message is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any use, disclosure, copying or distribution of this message, in any form, is strictly prohibited. If you have received this message in error, please immediately notify the sender and/or Syncsort and destroy all copies of this message in your possession, custody or control. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20090520/60756f2b/attachment.html>
Richard Elling
2009-May-20 22:23 UTC
[zfs-discuss] Any fragmentation issue with zfs, espeically loaded with lots of snapshots
Wong, James (Nagi Long) wrote:> > Hi, > > > > I?d like to know more about this topic. However, googling doesn?t > give me much. If you guys know of any info, please point me to it. > > > > I understand zfs has high performance write, even with lots snapshots. > How about read performance? To me, it will be a very fragmented due > to the COW. And no matter how careful you allocate the blocks, you > can only put a SHARED block in the proximity of one particular > snapshot and to other snapshots, the shared block won?t be in > proximity ? a fragmentation situation. >To begin, you should look at how blocks are allocated. Jeff Bonwick wrote a good blog on this: http://blogs.sun.com/bonwick/entry/zfs_block_allocation Next, you''ll need to understand that high performance and magnetic hard disks are becoming mutually exclusive. High performance today is owned by SSDs, which have no seek/rotate latency and tend to be able to saturate the channel bandwidth. The "fragmentation" problem with HDDs is very different than "fragmentation" in SDDs. To understand how that is leveraged for the best price/performance mix, you''ll want to google for "hybrid storage pools" where there are many good reference. The next interesting area is where the allocation policy could go in the future -- I''m not convinced that the HDD allocation policy in place today is the best for SSDs. It certainly works for SSDs, but there may be some improvements possible. So much research, so little time... <shameless plug> I''ll be getting into some of this sort of thing in some detail at the USENIX Technical Conference 2009 ZFS Tutorial. You''re welcome to attend, and bring some friends :-) http://www.usenix.org/events/usenix09/training/ </shameless plug> -- richard
Bob Friesenhahn
2009-May-20 22:29 UTC
[zfs-discuss] Any fragmentation issue with zfs, espeically loaded with lots of snapshots
On Wed, 20 May 2009, Wong, James (Nagi Long) wrote:> > I understand zfs has high performance write, even with lots snapshots. > How about read performance? To me, it will be a very fragmented due to > the COW. And no matter how careful you allocate the blocks, you can > only put a SHARED block in the proximity of one particular snapshot and > to other snapshots, the shared block won''t be in proximity - a > fragmentation situation.This is indeed an interesting issue. In practice, ZFS writes essentially unfragmented files for normal sequential writes, which results in an unfragmented read. It uses a "slab" allocator which pre-allocates large runs of blocks at a time. The default ZFS block size is quite large (128K) so worst-case fragmentation causes much less disk seeking than filesystems using tiny (4K or 8K) blocks. ZFS buffers data to be written for considerable time (up to 30 seconds) in the hope that the data can be written more contiguously when it comes time to write it to disk. Fragmentation becomes an issue for applications which update individual ZFS blocks (like a database) rather than re-writing the file. Fragmentation also becomes an issue when the pool is extremely full. Fragmentation is an issue when the block size is set very small (e.g. 8k) but usually this small block size is used intentionally for database purposes. Bob -- Bob Friesenhahn bfriesen at simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer, http://www.GraphicsMagick.org/