I did a very non scientific test for speeds of backing up disk/file images to disk/file backups I used lvm for both the disk based and to put the files onto during the test. I used four 640gig sata 3.0gbps drives in a raid 10. There was 2083 megabytes used on the filesystem, a windows xp install. dd disk -> disk = 36 minutes ntfsclone disk -> disk = 4 minutes ntfsclone disk -> file = 2 minutes cp file -> file = 11 seconds So now I am left with the question of do I use file based images which will have slower performance but super fast backup times, or go with a lvm -> disk/file for the backup. My particular use case will be a user gets a 20 gig drive for xp, their it guy will do manual image backup creation. If they blow up their windows box we will have a "click click" ok now they are running againback up using the backup disk/file image. If I use all disk based images then I will have to also create a file backup of the backup disk for my remote backup box to save in case the host dies. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Grant McWilliams
2010-Mar-20 16:58 UTC
Re: [Xen-users] Just some (probably useless) information
On Sat, Mar 20, 2010 at 12:37 AM, Brandon Lamb <brandonlamb@gmail.com>wrote:> I did a very non scientific test for speeds of backing up disk/file > images to disk/file backups > > I used lvm for both the disk based and to put the files onto during > the test. I used four 640gig sata 3.0gbps drives in a raid 10. There > was 2083 megabytes used on the filesystem, a windows xp install. > > dd disk -> disk = 36 minutes > > ntfsclone disk -> disk = 4 minutes > > ntfsclone disk -> file = 2 minutes > > cp file -> file = 11 seconds > > So now I am left with the question of do I use file based images which > will have slower performance but super fast backup times, or go with a > lvm -> disk/file for the backup. > > My particular use case will be a user gets a 20 gig drive for xp, > their it guy will do manual image backup creation. If they blow up > their windows box we will have a "click click" ok now they are running > againback up using the backup disk/file image. If I use all disk based > images then I will have to also create a file backup of the backup > disk for my remote backup box to save in case the host dies. > >You copied 2GB in 11 seconds? Grant McWilliams _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Grant McWilliams
2010-Mar-21 11:03 UTC
Re: [Xen-users] Just some (probably useless) information
On Sat, Mar 20, 2010 at 12:37 AM, Brandon Lamb <brandonlamb@gmail.com>wrote:> I did a very non scientific test for speeds of backing up disk/file > images to disk/file backups > > I used lvm for both the disk based and to put the files onto during > the test. I used four 640gig sata 3.0gbps drives in a raid 10. There > was 2083 megabytes used on the filesystem, a windows xp install. > > dd disk -> disk = 36 minutes > > ntfsclone disk -> disk = 4 minutes > > ntfsclone disk -> file = 2 minutes > > cp file -> file = 11 seconds > > So now I am left with the question of do I use file based images which > will have slower performance but super fast backup times, or go with a > lvm -> disk/file for the backup. > > My particular use case will be a user gets a 20 gig drive for xp, > their it guy will do manual image backup creation. If they blow up > their windows box we will have a "click click" ok now they are running > againback up using the backup disk/file image. If I use all disk based > images then I will have to also create a file backup of the backup > disk for my remote backup box to save in case the host dies. > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users >How big was the actual LV because it definitely shouldn''t take dd 40 minute to copy 2 GB! Without optimizations that size disk should take 1 minute. If you go with ddrescue or tune dd with large blocks etc.. and depending on the speed of your RAID 10 you should be able to get that down to 30 seconds or less. If your volume is a lot larger than 2GB then you need to play with the sparse options but I think that only works with output files. Still when dding from one 80 GB drive to another 80GB drive it takes me 40 minutes or roughly 2/3 the maximum speed of the drive. The other option would be to dd the LV to a backup LV and then have it mounted on another DomU (a backup VM) and just rsync to it often. This would keep an up to date LV which you could detatch and use in a hurry on the other VM. Of course you''d still want to follow the normal backup process anyway so you have more than one level of backup. Grant McWilliams Some people, when confronted with a problem, think "I know, I''ll use Windows." Now they have two problems. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Steven Wilcoxon
2010-Mar-21 14:57 UTC
Re: [Xen-users] Just some (probably useless) information
FYI, by default dd work with very small blocks of data. For higher performance you can try: dd bs=64k <in >out or dd bs=64k <in | dd bs=64k >out I''ve even seen some systems having an additional dd in the middle will speed things up by buffering data to keep the write going constantly. Which is the fastest varies depending on the h/w configuration and if multiple drives are being used. S.W. On 3/21/2010 6:03 AM, Grant McWilliams wrote:> On Sat, Mar 20, 2010 at 12:37 AM, Brandon Lamb <brandonlamb@gmail.com > <mailto:brandonlamb@gmail.com>> wrote: > > I did a very non scientific test for speeds of backing up disk/file > images to disk/file backups > > I used lvm for both the disk based and to put the files onto during > the test. I used four 640gig sata 3.0gbps drives in a raid 10. There > was 2083 megabytes used on the filesystem, a windows xp install. > > dd disk -> disk = 36 minutes > > ntfsclone disk -> disk = 4 minutes > > ntfsclone disk -> file = 2 minutes > > cp file -> file = 11 seconds > > So now I am left with the question of do I use file based images which > will have slower performance but super fast backup times, or go with a > lvm -> disk/file for the backup. > > My particular use case will be a user gets a 20 gig drive for xp, > their it guy will do manual image backup creation. If they blow up > their windows box we will have a "click click" ok now they are running > againback up using the backup disk/file image. If I use all disk based > images then I will have to also create a file backup of the backup > disk for my remote backup box to save in case the host dies. > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com <mailto:Xen-users@lists.xensource.com> > http://lists.xensource.com/xen-users > > > > > How big was the actual LV because it definitely shouldn''t take dd 40 > minute to copy 2 GB! Without optimizations that size disk should take > 1 minute. If you go with ddrescue or tune dd with large blocks etc.. > and depending on the speed of your RAID 10 you should be able to get > that down to 30 seconds or less. If your volume is a lot larger than > 2GB then you need to play with the sparse options but I think that > only works with output files. Still when dding from one 80 GB drive to > another 80GB drive it takes me 40 minutes or roughly 2/3 the maximum > speed of the drive. > > The other option would be to dd the LV to a backup LV and then have it > mounted on another DomU (a backup VM) and just rsync to it often. This > would keep an up to date LV which you could detatch and use in a hurry > on the other VM. Of course you''d still want to follow the normal > backup process anyway so you have more than one level of backup. > > > Grant McWilliams > > Some people, when confronted with a problem, think "I know, I''ll use > Windows." > Now they have two problems. > > > > > > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Pasi Kärkkäinen
2010-Mar-21 15:43 UTC
Re: [Xen-users] Just some (probably useless) information
On Sat, Mar 20, 2010 at 12:37:34AM -0700, Brandon Lamb wrote:> I did a very non scientific test for speeds of backing up disk/file > images to disk/file backups > > I used lvm for both the disk based and to put the files onto during > the test. I used four 640gig sata 3.0gbps drives in a raid 10. There > was 2083 megabytes used on the filesystem, a windows xp install. > > dd disk -> disk = 36 minutes >Did you specify bigger block size for dd?: dd bs=1024k That should speed up things a lot.> ntfsclone disk -> disk = 4 minutes > > ntfsclone disk -> file = 2 minutes > > cp file -> file = 11 seconds > > So now I am left with the question of do I use file based images which > will have slower performance but super fast backup times, or go with a > lvm -> disk/file for the backup. > > My particular use case will be a user gets a 20 gig drive for xp, > their it guy will do manual image backup creation. If they blow up > their windows box we will have a "click click" ok now they are running > againback up using the backup disk/file image. If I use all disk based > images then I will have to also create a file backup of the backup > disk for my remote backup box to save in case the host dies. >Did you try lvm snapshots? XCP also supports vhd snapshots. -- Pasi _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Brandon Lamb
2010-Mar-21 19:57 UTC
Re: [Xen-users] Just some (probably useless) information
On Sun, Mar 21, 2010 at 8:43 AM, Pasi Kärkkäinen <pasik@iki.fi> wrote:> On Sat, Mar 20, 2010 at 12:37:34AM -0700, Brandon Lamb wrote: >> I did a very non scientific test for speeds of backing up disk/file >> images to disk/file backups >> >> I used lvm for both the disk based and to put the files onto during >> the test. I used four 640gig sata 3.0gbps drives in a raid 10. There >> was 2083 megabytes used on the filesystem, a windows xp install. >> >> dd disk -> disk = 36 minutes >> > > Did you specify bigger block size for dd?: > dd bs=1024k > > That should speed up things a lot. > >> ntfsclone disk -> disk = 4 minutes >> >> ntfsclone disk -> file = 2 minutes >> >> cp file -> file = 11 seconds >> >> So now I am left with the question of do I use file based images which >> will have slower performance but super fast backup times, or go with a >> lvm -> disk/file for the backup. >> >> My particular use case will be a user gets a 20 gig drive for xp, >> their it guy will do manual image backup creation. If they blow up >> their windows box we will have a "click click" ok now they are running >> againback up using the backup disk/file image. If I use all disk based >> images then I will have to also create a file backup of the backup >> disk for my remote backup box to save in case the host dies. >> > > Did you try lvm snapshots? > > XCP also supports vhd snapshots. > > -- PasiI think there may have been some confusion. The lvm partition was 20 gigabytes, the USED space was 2 gigabytes. So for dd it had to copy all 20 gigabytes to another 20 gigabyte disk/file whereas using the ntfsclone only copied the USED 2 gigabytes. I dont think snapshots would really help in this case because when a backup of the disk is made, it may not be backed up again for a week, or a month, or a year which I dont think works with the snapshot model? I am also not doing a live snapshot/copy, the guest vm will be shutdown then the disk or file copied to another disk/file. I''ll try the blocksize tip and see what that gets me. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Grant McWilliams
2010-Mar-22 00:01 UTC
Re: [Xen-users] Just some (probably useless) information
On Sun, Mar 21, 2010 at 12:57 PM, Brandon Lamb <brandonlamb@gmail.com>wrote:> > >> dd disk -> disk = 36 minutes > >> > > XCP also supports vhd snapshots. > > > > -- Pasi > > I think there may have been some confusion. The lvm partition was 20 > gigabytes, the USED space was 2 gigabytes. So for dd it had to copy > all 20 gigabytes to another 20 gigabyte disk/file whereas using the > ntfsclone only copied the USED 2 gigabytes. > > I dont think snapshots would really help in this case because when a > backup of the disk is made, it may not be backed up again for a week, > or a month, or a year which I dont think works with the snapshot > model? I am also not doing a live snapshot/copy, the guest vm will be > shutdown then the disk or file copied to another disk/file. > > I''ll try the blocksize tip and see what that gets me. > >Also try ddrescue which is as fast as dd with ALL of the optimizations turned on. With my experience and the speed in which you say your RAID is functioning you should be able to ddrescue your 20 GB LV in about 4 minutes or less. One thought though would be this, why is your partition 20GB when you''re only using 2GB? Wouldn''t it be easier to have a small OS partition and use more traditional network storage (NFS/Samba) with more traditional backup techniques? If the OS drive was say 5 GB you could image the LV bit by bit in about one minute and then use rsync (or other) to backup the changes. Grant McWilliams _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Fajar A. Nugraha
2010-Mar-22 04:37 UTC
Re: [Xen-users] Just some (probably useless) information
On Sat, Mar 20, 2010 at 2:37 PM, Brandon Lamb <brandonlamb@gmail.com> wrote:> cp file -> file = 11 seconds > > So now I am left with the question of do I use file based images which > will have slower performance but super fast backup times, or go with a > lvm -> disk/file for the backup.I don''t think cp does a "sync" by default. Which means in the end of the 11 seconds some of the data has not been written to disk yet. Try time (cp file1 file1.bak;sync) -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users