Background Introduction
To improve resource utilization, the platform allows you to configure a policy for automatically recycling idle dev machines. This means that an administrator can set a policy for recycling idle dev machines in the current region. The idle resources will be forcibly recycled to release computing resources when the resource utilization does not meet requirements.
Configuration Guide
Go to the Idle Recycling Policy tab to configure and view idle recycling policies. To perform these operations, the account must have permissions on the CreateRecyclePolicy, DescribeRecyclePolicies, DeleteRecyclePolicy, and ModifyRecyclePolicy APIs. You can contact the root account or CAM administrator to configure these permissions. Click Create Policy to configure a recycling policy and an exclusion policy. The recycling policy indicates that instances meeting recycling conditions will automatically stop releasing computing resources. The exclusion policy indicates that instances meeting exclusion conditions are not subject to the recycling policy. That is, such instances will not be forcibly stopped even if the conditions for idle recycling are met.
Configuring a Recycling Policy
The platform supports configuring conditions for instance resource metrics based on the CPU utilization, memory utilization, and GPU utilization. These metric conditions can be logically combined using either an ANY or ALL operator. When ANY is selected, the instance automatically stops when any configured metric condition is met. When ALL is selected, the instance automatically stops only when all configured metric conditions are met.
As shown in the figure below, when the following policy is configured:
The instance automatically stops when any of the following metric conditions are met, and this situation remains for more than 1 hour:
IF CPU utilization <= 10%
IF memory utilization <= 10%
IF GPU utilization <= 10%
This indicates that a dev machine will automatically stop when the CPU utilization, memory utilization, or GPU utilization of the instance remains less than or equal to 10% for more than 1 hour.
The platform supports the filtering of excluded instances by instance name. That is, the dev machines configured in this exclusion policy will not be subject to the aforementioned recycling policy. As shown in the figure above, the dev machine myNotebook will not be subject to the configured recycling policy. That is, the instance will not be forcibly stopped even if the recycling conditions are met.
Instance List
1. When an idle recycling policy is configured for this region, the following prompt message will be displayed above the instance list. By clicking Automatic Stop Policy, you can view the configured metric conditions and duration. In this case, you need to have permissions on DescribeRecyclePolicies.
2. When a dev machine automatically stops due to idleness, its status changes to Stopped. In addition, when you hover your mouse over the instance, the prompt message Automatic stop of idle instances triggered is displayed, as shown below.
Alarm Guide
Events related to the recycling of idle dev machines have been connected to Tencent Cloud EventBridge. The currently connected events are as follows:
devInstanceAutoReleasedOnIdle: When a dev machine automatically stops due to idleness, this alarm event will be sent.
devlnstancetobeReleasedOnldle: This alarm event will be sent 30 minutes and 24 hours before the dev machine is recycled, respectively.
For the detailed guide on configuring event alarms, see Operation Steps. This guide uses task events as an example. The configuration method for dev machine events is the same, and only requires replacement with the aforementioned dev machine events.