> -----Original Message----- > From: zfs-discuss-boun...@opensolaris.org [mailto:zfs-discuss- > boun...@opensolaris.org] On Behalf Of Pawel Jakub Dawidek > Sent: 10 December 2011 14:05 > To: Mertol Ozyoney > Cc: zfs-discuss@opensolaris.org > Subject: Re: [zfs-discuss] Improving L1ARC cache efficiency with dedup > > On Wed, Dec 07, 2011 at 10:48:43PM +0200, Mertol Ozyoney wrote: > > Unfortunetly the answer is no. Neither l1 nor l2 cache is dedup aware. > > > > The only vendor i know that can do this is Netapp > > And you really work at Oracle?:) > > The answer is definiately yes. ARC caches on-disk blocks and dedup just > reference those blocks. When you read dedup code is not involved at all. > Let me show it to you with simple test: > > Create a file (dedup is on): > > # dd if=/dev/random of=/foo/a bs=1m count=1024 > > Copy this file so that it is deduped: > > # dd if=/foo/a of=/foo/b bs=1m > > Export the pool so all cache is removed and reimport it: > > # zpool export foo > # zpool import foo > > Now let's read one file: > > # dd if=/foo/a of=/dev/null bs=1m > 1073741824 bytes transferred in 10.855750 secs (98909962 bytes/sec) > > We read file 'a' and all its blocks are in cache now. The 'b' file shares all the > same blocks, so if ARC caches blocks only once, reading 'b' should be much > faster: > > # dd if=/foo/b of=/dev/null bs=1m > 1073741824 bytes transferred in 0.870501 secs (1233475634 > bytes/sec) > > Now look at it, 'b' was read 12.5 times faster than 'a' with no disk activity. > Magic?:)
Yep, however in pre Solaris 11 GA (and in Illumos) you would end up with 2x copies of blocks in ARC cache, while in S11 GA ARC will keep only 1 copy of all blocks. This can make a big difference if there are even more than just 2x files being dedupped and you need arc memory to cache other data as well. -- Robert Milkowski _______________________________________________ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss