Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why do Windows snapshots take a long time?

I am running a vanilla Windows install on Amazon EBS volume. The computer takes 10 minutes to boot, which may be understandable as 2 reboots are required. However, taking a snapshot is also a 10-15 minute process. Can anyone explain this? Any way to speed it up? I am a bit surprised, because I thought that snapshots are immediate replicas of the running EBS volume, in which case shouldn't they take just a couple of seconds to complete?


I will add that the console shows that "snapshot" is completed very quickly. But the "AMI" section is what seems to take 10-20 minutes. What's the difference? Is the snapshot available for use immediately, or do I need to wait for the AMI?

like image 866
Snapshot Avatar asked Nov 15 '10 14:11

Snapshot


People also ask

Are snapshots free?

If you don't want to switch your insurance to Progressive today, you can sign up for the Snapshot Road Test. It's a free trial that lets you see how much of a discount you could get with Progressive without having to change your auto insurer. Get more details about Snapshot Road Test.

How does Snapshot restore work?

How SnapRestore works: After you select a Snapshot copy for reversion, the Data ONTAP reverts the specified file or the volume to the data and timestamps that it contained when the selected Snapshot copy was taken. Data that was written after the selected Snapshot copy was taken is lost.


2 Answers

From the EBS product page:

Amazon EBS snapshots are incremental backups, meaning that only the blocks on the device that have changed since your last snapshot will be saved. If you have a device with 100 GBs of data, but only 5 GBs of data has changed since your last snapshot, only the 5 additional GBs of snapshot data will be stored back to Amazon S3.

Subsequent snapshots are fast because only the changed blocks need to be saved. So the time it takes scales with the amount of changes since the last snapshot.

Is the snapshot available for use immediately, or do I need to wait for the AMI?

Also from the product page:

New volumes created from existing Amazon S3 snapshots load lazily in the background. This means that once a volume is created from a snapshot, there is no need to wait for all of the data to transfer from Amazon S3 to your Amazon EBS volume before your attached instance can start accessing the volume and all of its data. If your instance accesses a piece of data which hasn’t yet been loaded, the volume will immediately download the requested data from Amazon S3, and then will continue loading the rest of the volume’s data in the background.

like image 103
Wim Coenen Avatar answered Oct 20 '22 01:10

Wim Coenen


The creation of an AMI is a multiple-step process.

  1. The Snapshot of the current machine is started (that's darn near instantaneous)
  2. The snapshot copies the "changed blocks" from the base AMI to the snapshot lazily (that's pretty quick too)
  3. The underlying Windows image is then prepared to be an AMI base image this starts with booting a "ghost" instance from the image with the snapshot as the disk image.
  4. A SYSPREP is started to "reseal" the machine so it gets new machine SIDs.
  5. The new image is then re-snapshotted
  6. The AMI is marked "complete"
like image 45
IDisposable Avatar answered Oct 20 '22 02:10

IDisposable