Hi, I am facing issue with zfs destroy, this takes almost 3 Hours to delete the snapshot of size 150G. Could you please help me to resolve this issue, why zfs destroy takes this much time. While taking snapshot, it''s done within few seconds. I have tried with removing with old snapshot but still problem is same. ==========================I am using : Release : OpenSolaris Development snv_134 X86 # uname -a SunOS dev-nas01 5.11 snv_134 i86pc i386 i86pc Solaris # isainfo -kv 64-bit amd64 kernel modules # zpool status pool: rpool state: ONLINE scrub: scrub completed after 0h3m with 0 errors on Tue Aug 9 08:46:52 2011 config: NAME STATE READ WRITE CKSUM rpool ONLINE 0 0 0 c8t0d0s0 ONLINE 0 0 0 errors: No known data errors pool: tank state: ONLINE scrub: none requested config: NAME STATE READ WRITE CKSUM tank ONLINE 0 0 0 raidz1-0 ONLINE 0 0 0 c8t1d0 ONLINE 0 0 0 c8t2d0 ONLINE 0 0 0 c8t3d0 ONLINE 0 0 0 c8t4d0 ONLINE 0 0 0 errors: No known data errors ========================== # zfs list tank NAME USED AVAIL REFER MOUNTPOINT tank 608G 2.13T 35.9K /tank ========================== Thanks, Nix -- This message posted from opensolaris.org
On 08/10/11 05:13 PM, Nix wrote:> Hi, > > I am facing issue with zfs destroy, this takes almost 3 Hours to delete the snapshot of size 150G. > > Could you please help me to resolve this issue, why zfs destroy takes this much time. >Do you have dedup enabled? -- Ian.
Edward Ned Harvey
2011-Aug-11 03:32 UTC
[zfs-discuss] zfs destory snapshot takes an hours.
> From: zfs-discuss-bounces at opensolaris.org [mailto:zfs-discuss- > bounces at opensolaris.org] On Behalf Of Ian Collins > > > I am facing issue with zfs destroy, this takes almost 3 Hours to > delete the snapshot of size 150G. > > > Do you have dedup enabled?I have always found, zfs destroy takes some time. zpool destroy takes no time. Although zfs destroy takes some time, it''s not terrible unless you have dedup enabled. If you have dedup enabled, then yes it''s terrible, as Ian suggested.
Hi Ian, Yes, I have enabled the dedup on the pool. I will off the dedup and will try to delete the new created snapshot. - Nix -- This message posted from opensolaris.org
also, snapshot destroys are much slower with older releases such as 134. i recommend an upgrade. but an upgrade will not help much if you are using dedup. -- Garrett D''Amore On Aug 10, 2011, at 8:32 PM, Edward Ned Harvey <opensolarisisdeadlongliveopensolaris at nedharvey.com> wrote:>> From: zfs-discuss-bounces at opensolaris.org [mailto:zfs-discuss- >> bounces at opensolaris.org] On Behalf Of Ian Collins >> >>> I am facing issue with zfs destroy, this takes almost 3 Hours to >> delete the snapshot of size 150G. >>> >> Do you have dedup enabled? > > I have always found, zfs destroy takes some time. zpool destroy takes no > time. > > Although zfs destroy takes some time, it''s not terrible unless you have > dedup enabled. If you have dedup enabled, then yes it''s terrible, as Ian > suggested. > > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
On Wed, Aug 10, 2011 at 11:32 PM, Edward Ned Harvey <opensolarisisdeadlongliveopensolaris at nedharvey.com> wrote:>> From: zfs-discuss-bounces at opensolaris.org [mailto:zfs-discuss- >> bounces at opensolaris.org] On Behalf Of Ian Collins >> >> > I am facing issue with zfs destroy, this takes almost 3 Hours to >> delete the snapshot of size 150G. >> > >> Do you have dedup enabled? > > I have always found, zfs destroy takes some time. ?zpool destroy takes no > time. > > Although zfs destroy takes some time, it''s not terrible unless you have > dedup enabled. ?If you have dedup enabled, then yes it''s terrible, as Ian > suggested.I have found that the time to destroy a snapshot or dataset is directly related to the number of objects and not the size. A dataset or snapshot with millions of small files will take a very long time (hours, but not usually days). -- {--------1---------2---------3---------4---------5---------6---------7---------} Paul Kraus -> Senior Systems Architect, Garnet River ( http://www.garnetriver.com/ ) -> Sound Designer: Frankenstein, A New Musical (http://www.facebook.com/event.php?eid=123170297765140) -> Sound Coordinator, Schenectady Light Opera Company ( http://www.sloctheater.org/ ) -> Technical Advisor, RPI Players
On Wed, 10 Aug 2011, Nix wrote:> > Yes, I have enabled the dedup on the pool. > > I will off the dedup and will try to delete the new created snapshot.Unfortunately, if dedup was previously enabled, the damage was already done since dedup is baked into your pool. The situation may improve over time as dedup blocks are gradually eliminated but this depends on how often the data gets overwritten and how many old snapshots are deleted. The alternative is to install a lot more RAM, or install a SSD as a L2ARC device. Bob -- Bob Friesenhahn bfriesen at simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
On 08/12/11 01:35 AM, Bob Friesenhahn wrote:> On Wed, 10 Aug 2011, Nix wrote: >> Yes, I have enabled the dedup on the pool. >> >> I will off the dedup and will try to delete the new created snapshot. > Unfortunately, if dedup was previously enabled, the damage was already > done since dedup is baked into your pool. The situation may improve > over time as dedup blocks are gradually eliminated but this depends on > how often the data gets overwritten and how many old snapshots are > deleted. > > The alternative is to install a lot more RAM, or install a SSD as a > L2ARC device. >On a system with both, I recently timed 147 minutes to destroy a 2.2T filesystem that was q 95% duplicate of another. -- Ian.
Edward Ned Harvey
2011-Aug-12 04:07 UTC
[zfs-discuss] zfs destory snapshot takes an hours.
> From: zfs-discuss-bounces at opensolaris.org [mailto:zfs-discuss- > bounces at opensolaris.org] On Behalf Of Bob Friesenhahn > > Unfortunately, if dedup was previously enabled, the damage was already > done since dedup is baked into your pool. The situation may improve > over time as dedup blocks are gradually eliminated but this depends on > how often the data gets overwritten and how many old snapshots are > deleted.No matter how you cut it, unless you want to "zpool destroy," there is a fixed total amount of time that will be spent destroying zfs snapshots that have previously dedup data baked into them. Your only choice is when to perform that work, and broken into what granularity. Most likely you''re talking about daily snapshots at this point. Where each night at midnight, some time will be spent destroying the oldest daily snapshot. Most likely the best thing for you to do is simply to do nothing, and allow 2 hours every night at midnight, until those old snaps are all gone. But if you wanted, you could destroy more snapshots each night, and get it all over with sooner. Or something like that.> The alternative is to install a lot more RAM, or install a SSD as a > L2ARC device.RAM (ARC) and SSD (L2ARC) are only going to help prevent re-reading the blocks from disk after they''ve been read once. No matter what, if you''re talking about time to destroy snapshots, you''re going to have to spend time reading (and erasing) those blocks from disk. So infinite ram and infinite SSD aren''t going to help you at this point. Given that it''s already been created with dedup, and the DDT is not currently this instant already in cache. I mean... Yes, it''s marginally possible to imagine some benefit, if you install enough ram or cache, you could read all the contents of the snapshot during the day so it will still be warm in cache at night when the snap gets destroyed, or something like that. Maybe able to spread the workload out across less critical hours of the day. But like I said. "Marginal." I doubt it. Most likely the best thing for you to do is simply do nothing, and wait for it to go away in the upcoming weeks, a little bit each night.
Hi All, I have off the dedup on pool and tried to delete the old snapshot. Its takes 2 to 3 hours to destroy the snapshot. So now, I have deleted all old snapshot and created the new one and tried to destroy it, this time its just finish within few seconds :-) # time zfs destroy tank/home at daily.Fri real 0m0.374s user 0m0.002s sys 0m0.004s Thanks all :-) - Nix -- This message posted from opensolaris.org