Вопрос

What determines how fast an instance goes into the running state from the time the api call is made to start an instance?

Are any of the following factors is startup and shutdown times: - instance type - image type - whether a disk is attached or not - whether a ephermal ip address is needed - etc.

Basically, how can I quicken boot times and shutdown times

Это было полезно?

Решение

By and large copying the image currently dominates start up time for GCE.

Things you can do to minimize this:

  1. Use a pre-created persistent disk to boot from. In this case, there is no image propagation time.
  2. Use one of our stock images (that are pretty small) or, if you create a custom image, don't add more bits than you need.

Typically, the instance type and attached disks won't affect time dramatically.

Другие советы

Another contributor to the time when a GCE instance is available for useful work (after entering the RUNNING state) is the bootup time of the guest OS. Disk scan, DHCP lease acquisition, network configuration, etc. can sometimes contribute 10-20 seconds to instance boot time.

As Joe says, using a pre-created persistent boot disk avoids the process of creating the scratch disk and loading the image onto it. Machine types with scratch disk also require a small amount of extra time (1-3 seconds) to prepare the scratch disks, but that contributes less than 10% of the total startup time.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top