Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

How is Cloud Workstation inactivity determined?

Hello,

In Cloud Workstation configurations, how is inactivity determined for auto sleep and auto shutdown? Is it based on network traffic to the host (*.cloudworkstations.dev urls) or is it based on CPU/network/disk usage?

The documentation at https://cloud.google.com/workstations/docs/create-configuration#define_machine_settings does not mention details.

Thanks.

Solved Solved
1 2 1,011
1 ACCEPTED SOLUTION

Hi @siddharthab,

If the CPU is idle for a certain period, no network traffic for a defined time or no disk I/O operations are detected for a set of duration, the workstation is considered inactive.

Although in your ResourceConfig, you have the capability to customize some parameters based on your own needs:

  • idleTimeout: Though this is optional in your configuration, This parameter indicates the number of seconds to wait before automatically stopping a workstation after it last received user traffic. A value of "0s" indicates that Cloud Workstations VMs created with this configuration should never time out due to idleness. Provide duration terminated by s for seconds—for example, "7200s" (2 hours). The default is "1200s" (20 minutes).

  • runningTimeout: This indicates the number of seconds that a workstation can run until it is automatically shut down. The idleTimeout and runningTimeout fields are independent of each other. Provide duration terminated by s for seconds—for example, "54000s" (15 hours). Defaults to "43200s" (12 hours). A value of "0s" indicates that workstations using this configuration should never time out. If encryptionKey is set, it must be greater than "0s" and less than "86400s" (24 hours).

We recommend that workstations be shut down daily to reduce costs and so that security updates can be applied upon restart.

Note: The runningTimeout field shuts down VMs after the specified time, regardless of whether or not the VMs are idle. 

I hope the above information is helpful.

View solution in original post

2 REPLIES 2

Hi @siddharthab,

If the CPU is idle for a certain period, no network traffic for a defined time or no disk I/O operations are detected for a set of duration, the workstation is considered inactive.

Although in your ResourceConfig, you have the capability to customize some parameters based on your own needs:

  • idleTimeout: Though this is optional in your configuration, This parameter indicates the number of seconds to wait before automatically stopping a workstation after it last received user traffic. A value of "0s" indicates that Cloud Workstations VMs created with this configuration should never time out due to idleness. Provide duration terminated by s for seconds—for example, "7200s" (2 hours). The default is "1200s" (20 minutes).

  • runningTimeout: This indicates the number of seconds that a workstation can run until it is automatically shut down. The idleTimeout and runningTimeout fields are independent of each other. Provide duration terminated by s for seconds—for example, "54000s" (15 hours). Defaults to "43200s" (12 hours). A value of "0s" indicates that workstations using this configuration should never time out. If encryptionKey is set, it must be greater than "0s" and less than "86400s" (24 hours).

We recommend that workstations be shut down daily to reduce costs and so that security updates can be applied upon restart.

Note: The runningTimeout field shuts down VMs after the specified time, regardless of whether or not the VMs are idle. 

I hope the above information is helpful.

In the ResourceConfig  you linked, it says "automatically stopping a workstation after it last received user traffic". It does not mention anything about CPU, network or disk. Do you think the documentation needs an update?