如何加快AMI(Amazon Machine Image)的创建? [英] How to speed up creation of AMI (Amazon Machine Image)?

查看:75
本文介绍了如何加快AMI(Amazon Machine Image)的创建?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

AMI创建需要 long 时间.有没有办法使它更快地发生?

例如也许通过更改某些AMI创建设置,也许是关于IOPS,卷类型,设备等.我不知道如何更改这些设置,或者它是否有帮助.因此,我不确定目前是否可以以任何方式加快AMI的创建过程.

解决方案

AMI 使用与快照相同的备份"机制.从原始AMI/快照修改的所有块都需要复制到Amazon S3.

因此,从理论上讲,如果您从AMI启动了一个实例,然后立即从该实例中创建了一个新的AMI,则应该尽快创建它,因为应该更改的块相对较少./p>

另一方面,如果实例已运行很长时间并且更新了磁盘上的大量数据,则将已更改的块复制到S3所需的时间会更长./p>

您应该能够通过对卷进行最新快照来加快AMI的创建过程,该快照会将更改后的块复制到S3.然后,不久之后进行AMI时,更改的块将很少.

如果您对此进行尝试,请告诉我们您的做法!

AMI creation takes a long time. Are there ways to make it happen faster?

E.g. perhaps by changing some of the AMI creation settings, perhaps regarding IOPS, volume type, device, etc. I don't know how to change these or if it could help. So I am not sure of any ways speed up the AMI creation process at this stage.

解决方案

An AMI uses the same 'backup' mechanism as a snapshot. Any blocks that are modified from the original AMI/snapshot need to be copied to Amazon S3.

So, in theory, if you launched an instance from an AMI, and then immediately made a new AMI from the instance, it should be created rather quickly because comparatively few blocks should have changed.

On the other hand, if an instance had been running for a long time and had updated lots of data on the disk, it would take longer to copy the 'changed' blocks to S3.

You should be able to speed the AMI creation process by taking a recent snapshot of the volume, which would copy the changed blocks to S3. Then, when making an AMI soon after, there would be rather few blocks changed.

If you experiment with this, let us know how you go!

这篇关于如何加快AMI(Amazon Machine Image)的创建?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆