Hi, I''m interested in the overhead of making, cloning, and destroying snapshots. It sounds like the cost for all of these is low, but how low?? For example, could I make snapshots of a system every 5 seconds? every second? More often than that? I''m primarily interested in the time/computation cost of doing these operations, but also about the storage cost. Would it be plausible to do something like take snapshots twice a second on a disk with a low/moderate load? If I only cared about the last 60 seconds worth of snapshots, would that make things much slower since I''d constantly be eliminating old checkpoints? Also, I [i]think[/i] that a while back I saw a technical paper on ZFS''s design, but I have not been able to track it down again. Does anyone know if this exists? thanks! This message posted from opensolaris.org
you can find the ZFS on-disk spec at: http://opensolaris.org/os/community/zfs/docs/ondiskformat0822.pdf I don''t know of any way to produce snapshots at periodic intervals other than shell scripts (or a cron job), but the creation and deletion of snapshots at command level is fairly instantaneous. If you have a need for continous snapshots (check points) you may want to check out the NILFS system (linux open source) available from NTT japan at: http://www.nilfs.org/en/ NILFS does continous check points (on all write events), is log based and allows configuration of the window size (time based) within which to keep active checkpoints ... after this amount of time, old checkpoints are discarded and their space is reclaimed regards, Bill This message posted from opensolaris.org
On Fri, Mar 21, 2008 at 09:55:38AM -0700, Tim Wood wrote:> Hi, > I''m interested in the overhead of making, cloning, and destroying snapshots. It sounds like the cost for all of these is low, but how low?? > > For example, could I make snapshots of a system every 5 seconds? > every second? More often than that?I''m pretty sure that you''ll have to write a checkpoint for any snapshot. That''s normally delayed to every 5 seconds or so for performance. So snapshotting faster seems likely to slow something down.> I''m primarily interested in the time/computation cost of doing these operations, but also about the storage cost. > > Would it be plausible to do something like take snapshots twice a > second on a disk with a low/moderate load? If I only cared about the > last 60 seconds worth of snapshots, would that make things much slower > since I''d constantly be eliminating old checkpoints?The deletions would probably slow things down a bit, but I don''t have a good idea how much. The load of the system is almost certain to be the limit on how many snaps you can do. I did a little test. On an otherwise idle VMware host, with ZFS to a non-allocated VMware disk, I was able to create 1000 snapshots in 80 seconds. So twice a second should be doable with some load, especially with reasonable hardware. (The corresponding destruction of the snapshots took a hair over 60 seconds). I added in a very low level of I/O with some writes every second and it didn''t affect the speed appreciably. I''m assuming you''ll need to test with your load to see how it works. -- Darren Dunham ddunham at taos.com Senior Technical Consultant TAOS http://www.taos.com/ Got some Dr Pepper? San Francisco, CA bay area < This line left intentionally blank to confuse you. >
The time and computation costs are minimal. The main problem you will run into is that taking a snapshot forcefully pushes out a transaction group. Normally, ZFS tries to sync transaction groups every 3-5 seconds in order to group enough data together but not waiting too long to commit (non-ODSYNC) data to disk. Depending on your circumstances, forcing these transaction groups out at a higher frequency may impact performance. There is an open RFE to have "deferred snapshots" that don''t force a sync, but it''s unlikely to get attention any time soon given other priorities. - Eric On Fri, Mar 21, 2008 at 09:55:38AM -0700, Tim Wood wrote:> Hi, > I''m interested in the overhead of making, cloning, and destroying > snapshots. It sounds like the cost for all of these is low, but how > low?? > > For example, could I make snapshots of a system every 5 seconds? > every second? More often than that? > > I''m primarily interested in the time/computation cost of doing these > operations, but also about the storage cost. > > Would it be plausible to do something like take snapshots twice a > second on a disk with a low/moderate load? If I only cared about the > last 60 seconds worth of snapshots, would that make things much slower > since I''d constantly be eliminating old checkpoints? > > Also, I [i]think[/i] that a while back I saw a technical paper on > ZFS''s design, but I have not been able to track it down again. Does > anyone know if this exists?-- Eric Schrock, Fishworks http://blogs.sun.com/eschrock