Ulrich Spörlein
2006-Sep-06  13:36 UTC
Snapshot duration, performance and how to avoid I/O lock
Hi,
I have to create regular snapshots of several volumes roughly 1.4TB in 
size (each). But using mksnap_ffs takes a lot of time (45 minutes) and
it looks like it could be speed up.
iostat reports some 2MB/s of I/O
      tty             da0              da1              sa0             
cpu
 tin tout  KB/t tps  MB/s   KB/t tps  MB/s   KB/t tps  MB/s  us ni sy in id
   0   77 16.00 120  1.87   0.00   0  0.00   0.00   0  0.00   0  0  8  4 89
   0  231 16.00 131  2.04   0.00   0  0.00   0.00   0  0.00   0  0  6  2 91
   0   77 16.00 127  1.98   0.00   0  0.00   0.00   0  0.00   0  0  5  3 92
   0  204 16.00 123  1.92   0.00   0  0.00   0.00   0  0.00   0  0  6  3 91
   0   77 16.00 128  2.00   0.00   0  0.00   0.00   0  0.00   0  0  6  3 91
gstat reports
dT: 0.501s  w: 0.500s
 L(q)  ops/s    r/s   kBps   ms/r    w/s   kBps   ms/w   %busy Name
    1    126     84   1341   11.8     42    671    2.7   99.7| da0
The filesystem under snapshotting was *empty*, and right now is at
Filesystem  1K-blocks     Used      Avail Capacity  Mounted on
/dev/da0s2d 1376038286  815092 1265140132     0%    /export/vol1
How come, a snapshot of an empty file system takes more than 800MB? Aren't
the
blocks copy-on-write?
Why is the disk 100% busy while only a mere 2MB/s are pushed? This is on a
3ware device driver for 9000 series storage controllers, version: 3.60.02.012
twa0: <3ware 9000 series Storage Controller> port 0x3000-0x303f mem
0xdc000000-0xddffffff,0xd8300000-0xd8300fff irq 48 at device 1.0 on pci3
twa0: [FAST]
twa0: INFO: (0x15: 0x1300): Controller details:: Model 9550SX-8LP, 8 ports,
Firmware FE9X 3.04.00.005, BIOS BE9X 3.04.00.002
with a RAID5 over 7 SATA disks.
da0 at twa0 bus 0 target 0 lun 0
da0: <AMCC 9550SX-8LP DISK 3.04> Fixed Direct Access SCSI-3 device 
da0: 100.000MB/s transfers
da0: 1430448MB (2929557504 512 byte sectors: 255H 63S/T 182356C)
Another thing is blocking other disk I/O while snapshotting. Right now I did
a ls(1) in the .snap directory, so I understand the filesystem is now suspended.
The workaround would then be to "dont do that". But what if other
snapshots are
accessed during that time? I want to provide yesterdays snapshot to our users
while taking the current snapshot and providing access to the newest data at the
same time.
Cheers
Ulrich Spoerlein
Philippe Pegon
2006-Sep-06  14:08 UTC
Snapshot duration, performance and how to avoid I/O lock
Ulrich Sp?rlein wrote:> Hi,Hi,> I have to create regular snapshots of several volumes roughly 1.4TB in > size (each). But using mksnap_ffs takes a lot of time (45 minutes) and > it looks like it could be speed up.[snip]> Another thing is blocking other disk I/O while snapshotting. Right now I did > a ls(1) in the .snap directory, so I understand the filesystem is now suspended. > The workaround would then be to "dont do that". But what if other snapshots are > accessed during that time? I want to provide yesterdays snapshot to our users > while taking the current snapshot and providing access to the newest data at the > same time.I had seen that a long time ago (on another controller), and it seems it's not better today, our post from june 2005 without response at the end : http://docs.freebsd.org/cgi/getmsg.cgi?fetch=410600+0+archive/2005/freebsd-stable/20050612.freebsd-stable http://docs.freebsd.org/cgi/getmsg.cgi?fetch=463968+0+archive/2005/freebsd-stable/20050612.freebsd-stable -- Philippe Pegon