From a resource management standpoint, FPGA-accelerated instances are considered as Elastic Compute Service (ECS) instances and are managed in the same way you manage other ECS instances. If you do not need to use an ECS instance for a period of time but still want to retain the instance without performing operations such as configuration upgrade or downgrade on the instance, we recommend that you hibernate the instance. Hibernated instances are not the same as stopped instances. When hibernated instances are waked, they automatically restore their applications to the states the applications were in before hibernation. This allows the instances to resume services in a short time.
Background information
When you hibernate an instance, the operating system of the instance saves data from the memory to the system disk of the instance. The saved data includes the applications that run in the operating system and the usage status of the applications. When you wake the instance, the operating system reads the data saved in the system disk, automatically restores the applications to the status before hibernation, and resumes the running state of the instance. In comparison, when you stop and restart an instance, the operating system restarts the backend services and applications.
Hibernation has different impacts on the billing of instances that use different billing methods:
- Subscription instance: The expiration time and billing of the hibernated instance are not affected.
- Pay-as-you-go instance: Whether the billing of the hibernated instance is affected is based on whether you select the No Fees for Hibernated Instances option when you hibernate the instance. The following table describes the billing details of resources.
Resource | No Fees for Hibernated Instances | Retain Instance and Continue Charging After Instance Is Hibernated |
---|---|---|
Computing resource (vCPUs and memory) | Release and stop billing | Retain and continue billing |
Disk (system disk and data disk) | Retain and continue billing | Retain and continue billing |
Internal IP address | Retain and stop billing | Retain and stop billing |
Public IP address | Release and stop billing. After the instance is started, a new public IP address is obtained. | Retain and stop billing |
EIP | Retain and continue billing | Retain and continue billing |
Bandwidth | Continue billing | Continue billing |
Limits
- The instance hibernation feature is now available only in the US (Silicon Valley) and Germany (Frankfurt) regions, and will be gradually supported in other regions.
- Before you can hibernate an instance, the instance must meet the following requirements:
- The instance hibernation feature is enabled when the instance is created.
Note The instance hibernation feature cannot be disabled after it is enabled. If you do not enable the instance hibernation feature when you create an instance, you cannot hibernate the instance.
- The hibernation agent is installed on the instance.
- The instance hibernation feature is enabled when the instance is created.
- You can enable the instance hibernation feature only when you create an ECS instance
by using an encrypted custom image. The following image versions are supported:
- Windows Server 2016 or later
- Ubuntu 18 or later
- CentOS 7 or later
- If the instance hibernation feature is enabled for an ECS instance when the instance
is created, you cannot perform the following operations on the instance:
- Create custom images.
- Create snapshots.
- Change the instance type.
- Change the operating system or system disk.
- Change the bandwidth of subscription instances.
- If the instance hibernation feature is enabled for a preemptible instance, you can select only the No Fees for Hibernated Instances option when you hibernate the instance.
- You cannot hibernate ECS instances in scaling groups.
Step 1: Enable the instance hibernation feature
You must enable the instance hibernation feature when you create an ECS instance. Otherwise, you cannot hibernate the instance. When you create the instance, you must use an encrypted image.
Step 2: Install the hibernation agent
After you enable the instance hibernation feature for the instance, you must install the hibernation agent on the instance before you can hibernate the instance.
- Create and run one of the following commands to install the hibernation agent on the
instance. For more information, see Immediate execution.
- Windows instance:
acs-plugin-manager.exe --exec --plugin ecs-hibernate-win --params "install"
- Linux instance:
acs-plugin-manager --exec --plugin ecs-hibernate-linux --params "install"
- Windows instance:
- Restart the instance to make the hibernation agent take effect. For more information, see Reboot the instance.
Step 3: Hibernate the instance
After the instance hibernation feature is enabled for the instance and the hibernation agent is installed on the instance, you can hibernate the instance in the Running state. You are unable to connect to the instance when the instance is hibernated.
References
You can use Operation Orchestration Service (OOS) to hibernate and wake ECS instances at the scheduled time. This way, the hibernation and wake time of a large number of instances can be managed in an automated manner and the costs can be reduced by using the No Fees for Hibernated Instances feature. For more information, see Start and shut down ECS instances at the scheduled time.