I am wondering if the following idea makes any sense as a way to get ZFS to cache compressed data in DRAM? In particular, given a 2-way zvol mirror of highly compressible data on persistent storage devices, what would go wrong if I dynamically added a ramdisk as a 3rd mirror device at boot time? Would ZFS route most (or all) of the reads to the lower latency DRAM device? In the case of an un-clean shutdown where there was no opportunity to actively remove the ramdisk from the pool before shutdown would there be any problem at boot time when the ramdisk is still registered but unavailable? Note, this Gedanken experiment is for highly compressible (~9x) metadata for a non-ZFS filesystem. Thanks. -- Stuart Anderson anderson at ligo.caltech.edu http://www.ligo.caltech.edu/~anderson
Stuart Anderson wrote:> I am wondering if the following idea makes any sense as a way to get > ZFS to cache compressed data in DRAM? > > In particular, given a 2-way zvol mirror of highly compressible data > on persistent storage devices, what would go wrong if I dynamically > added a ramdisk as a 3rd mirror device at boot time? > > Would ZFS route most (or all) of the reads to the lower latency DRAM > device? > > In the case of an un-clean shutdown where there was no opportunity to > actively remove the ramdisk from the pool before shutdown would there > be any problem at boot time when the ramdisk is still registered but > unavailable? > > Note, this Gedanken experiment is for highly compressible (~9x) > metadata for a non-ZFS filesystem. >You would only get about 33% of IO''s served from ram-disk. However at the KCA conference Bill and Jeff mentioned Just-in-time decompression/decryption planned for ZFS. If I understand it correctly some % of pages in ARC will be kept compressed/encrypted and will be decompressed/decrypted only if accessed. This could be especially useful to do so with prefetch. Now I would imaging that one will be able to tune what''s percentage of ARC should keep compressed pages. Now I don''t remember if they mentioned L2ARC here but it would probably be useful to have a tunable which would put compressed or uncompressed data onto L2ARC depending on it''s value. Which approach is better would always depends on a given environment and on where an actual bottleneck is. -- Robert Milkowski http://milek.blogspot.com
On Oct 2, 2009, at 5:05 AM, Robert Milkowski wrote:> Stuart Anderson wrote: >> I am wondering if the following idea makes any sense as a way to >> get ZFS to cache compressed data in DRAM? >> >> In particular, given a 2-way zvol mirror of highly compressible >> data on persistent storage devices, what would go wrong if I >> dynamically added a ramdisk as a 3rd mirror device at boot time? >> >> Would ZFS route most (or all) of the reads to the lower latency >> DRAM device? >> >> In the case of an un-clean shutdown where there was no opportunity >> to actively remove the ramdisk from the pool before shutdown would >> there be any problem at boot time when the ramdisk is still >> registered but unavailable? >> >> Note, this Gedanken experiment is for highly compressible (~9x) >> metadata for a non-ZFS filesystem. >> > You would only get about 33% of IO''s served from ram-disk.With SVM you are allowed to specify a read policy on sub-mirrors for just this reason, e.g., http://wikis.sun.com/display/BigAdmin/Using+a+SVM+submirror+on+a+ramdisk+to+increase+read+performance Is there no equivalent in ZFS?> However at the KCA conference Bill and Jeff mentioned Just-in-time > decompression/decryption planned for ZFS. If I understand it > correctly some % of pages in ARC will be kept compressed/encrypted > and will be decompressed/decrypted only if accessed. This could be > especially useful to do so with prefetch.I thought the optimization being discussed there was simply to avoid decompressing/decrypting unused data. I missed the part about keeping compressed data around in the ARC .> > Now I would imaging that one will be able to tune what''s percentage > of ARC should keep compressed pages.That would be nice.> > Now I don''t remember if they mentioned L2ARC here but it would > probably be useful to have a tunable which would put compressed or > uncompressed data onto L2ARC depending on it''s value. Which approach > is better would always depends on a given environment and on where > an actual bottleneck is.I agree something like this would be preferable to the SVM ramdisk solution. Thanks. -- Stuart Anderson anderson at ligo.caltech.edu http://www.ligo.caltech.edu/~anderson
Stuart Anderson wrote:> > On Oct 2, 2009, at 5:05 AM, Robert Milkowski wrote: > >> Stuart Anderson wrote: >>> I am wondering if the following idea makes any sense as a way to get >>> ZFS to cache compressed data in DRAM? >>> >>> In particular, given a 2-way zvol mirror of highly compressible data >>> on persistent storage devices, what would go wrong if I dynamically >>> added a ramdisk as a 3rd mirror device at boot time? >>> >>> Would ZFS route most (or all) of the reads to the lower latency DRAM >>> device? >>> >>> In the case of an un-clean shutdown where there was no opportunity >>> to actively remove the ramdisk from the pool before shutdown would >>> there be any problem at boot time when the ramdisk is still >>> registered but unavailable? >>> >>> Note, this Gedanken experiment is for highly compressible (~9x) >>> metadata for a non-ZFS filesystem. >>> >> You would only get about 33% of IO''s served from ram-disk. > > With SVM you are allowed to specify a read policy on sub-mirrors for > just this reason, e.g., > http://wikis.sun.com/display/BigAdmin/Using+a+SVM+submirror+on+a+ramdisk+to+increase+read+performance > > > Is there no equivalent in ZFS? >Nope, at least not right now. -- Robert Milkowski http://milek.blogspot.com
On Oct 2, 2009, at 11:54 AM, Robert Milkowski wrote:> Stuart Anderson wrote: >> >> On Oct 2, 2009, at 5:05 AM, Robert Milkowski wrote: >> >>> Stuart Anderson wrote: >>>> I am wondering if the following idea makes any sense as a way to get ZFS to cache compressed data in DRAM? >>>> >>>> In particular, given a 2-way zvol mirror of highly compressible data on persistent storage devices, what would go wrong if I dynamically added a ramdisk as a 3rd mirror device at boot time? >>>> >>>> Would ZFS route most (or all) of the reads to the lower latency DRAM device? >>>> >>>> In the case of an un-clean shutdown where there was no opportunity to actively remove the ramdisk from the pool before shutdown would there be any problem at boot time when the ramdisk is still registered but unavailable? >>>> >>>> Note, this Gedanken experiment is for highly compressible (~9x) metadata for a non-ZFS filesystem. >>>> >>> You would only get about 33% of IO''s served from ram-disk. >> >> With SVM you are allowed to specify a read policy on sub-mirrors for just this reason, e.g., >> http://wikis.sun.com/display/BigAdmin/Using+a+SVM+submirror+on+a+ramdisk+to+increase+read+performance >> >> Is there no equivalent in ZFS? >> > > Nope, at least not right now.Curious if anyone knows of any other ideas/plans for ZFS caching compressed data internally? or externally via a ramdisk mirror device that handles most/all read requests? Thanks. -- Stuart Anderson anderson at ligo.caltech.edu http://www.ligo.caltech.edu/~anderson
There had been a discussion of the topic on this list bout a onth ago, and I''d been told that similar ideas (compressed metadata/data in ARC/L2ARC) is on zfs dev agenda. Regards, Andrey On Sun, Mar 28, 2010 at 2:42 AM, Stuart Anderson <anderson at ligo.caltech.edu> wrote:> > On Oct 2, 2009, at 11:54 AM, Robert Milkowski wrote: > >> Stuart Anderson wrote: >>> >>> On Oct 2, 2009, at 5:05 AM, Robert Milkowski wrote: >>> >>>> Stuart Anderson wrote: >>>>> I am wondering if the following idea makes any sense as a way to get ZFS to cache compressed data in DRAM? >>>>> >>>>> In particular, given a 2-way zvol mirror of highly compressible data on persistent storage devices, what would go wrong if I dynamically added a ramdisk as a 3rd mirror device at boot time? >>>>> >>>>> Would ZFS route most (or all) of the reads to the lower latency DRAM device? >>>>> >>>>> In the case of an un-clean shutdown where there was no opportunity to actively remove the ramdisk from the pool before shutdown would there be any problem at boot time when the ramdisk is still registered but unavailable? >>>>> >>>>> Note, this Gedanken experiment is for highly compressible (~9x) metadata for a non-ZFS filesystem. >>>>> >>>> You would only get about 33% of IO''s served from ram-disk. >>> >>> With SVM you are allowed to specify a read policy on sub-mirrors for just this reason, e.g., >>> http://wikis.sun.com/display/BigAdmin/Using+a+SVM+submirror+on+a+ramdisk+to+increase+read+performance >>> >>> Is there no equivalent in ZFS? >>> >> >> Nope, at least not right now. > > Curious if anyone knows of any other ideas/plans for ZFS caching compressed data internally? or externally via a ramdisk mirror device that handles most/all read requests? > > Thanks. > > -- > Stuart Anderson ?anderson at ligo.caltech.edu > http://www.ligo.caltech.edu/~anderson > > > > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss >