Idle shutdown

Colab Enterprise runtimes shut down after 180 minutes of inactivity by default. This page describes the idle shutdown feature and how to change the default idle shutdown settings or turn the feature off when you create a runtime template.

Overview

To help manage costs, Colab Enterprise runtimes shut down after being idle for a specific time period by default. You can change the amount of time or turn this feature off when you create a runtime template.

After you create a runtime template, its configuration can't be changed. Therefore, you can't change a runtime or runtime template's idle shutdown settings. To use a runtime with different idle shutdown settings, you must create a runtime template with the settings that you want, and then use a runtime generated from that runtime template.

Before you begin

  1. Sign in to your Google Cloud account. If you're new to Google Cloud, create an account to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.
  2. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Go to project selector

  3. Make sure that billing is enabled for your Google Cloud project.

  4. Enable the Vertex AI, Dataform, and Compute Engine APIs.

    Enable the APIs

  5. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Go to project selector

  6. Make sure that billing is enabled for your Google Cloud project.

  7. Enable the Vertex AI, Dataform, and Compute Engine APIs.

    Enable the APIs

Required roles

To ensure that your user account has the necessary permissions to create a runtime template in Colab Enterprise, ask your administrator to grant your user account the Colab Enterprise Admin (roles/aiplatform.colabEnterpriseAdmin) IAM role on the project. For more information about granting roles, see Manage access to projects, folders, and organizations.

Your administrator might also be able to give your user account the required permissions through custom roles or other predefined roles.

Create a runtime template with specific idle shutdown settings

To create a runtime template with specific idle shutdown settings, you can use the Google Cloud console or the Google Cloud CLI.

Console

To create a runtime template with specific idle shutdown settings:

  1. In the Google Cloud console, go to the Colab Enterprise Runtime Templates page.

    Go to Runtime templates

  2. Click  New template.

    The Create new runtime template dialog appears.

  3. In the Runtime basics section, enter a Display name.

  4. In the Region menu, select the region where you want your runtime template.

  5. To change the idle shutdown settings, click the Configure compute section, and complete the following step.

  6. In the Idle shutdown section:

    • To turn off idle shutdown, clear Enable idle shutdown.

    • To change the inactivity time period, in Time of inactivity before shutdown (Minutes), change the number to the number of minutes of inactivity that you want. In the Google Cloud console, this setting can be set to any integer value from 10 to 1440.

  7. Complete the rest of the creation dialog.

  8. Click Create to finish creating the runtime template.

    Your runtime template appears in the list on the Runtime templates tab.

gcloud

Before using any of the command data below, make the following replacements:

  • DISPLAY_NAME: the display name of your runtime template.
  • INACTIVITY_DURATION: the duration of inactivity before the runtime shuts down. An input of 0s turns off the idle shutdown feature. The valid range of values is from 10 minutes (10m) to 24 hours (24h).
  • PROJECT_ID: your project ID.
  • REGION: the region where you want your runtime template.

Execute the following command:

Linux, macOS, or Cloud Shell

gcloud colab runtime-templates create --display-name=DISPLAY_NAME \
    --idle-shutdown-timeout=INACTIVITY_DURATION \
    --project=PROJECT_ID \
    --region=REGION

Windows (PowerShell)

gcloud colab runtime-templates create --display-name=DISPLAY_NAME `
    --idle-shutdown-timeout=INACTIVITY_DURATION `
    --project=PROJECT_ID `
    --region=REGION

Windows (cmd.exe)

gcloud colab runtime-templates create --display-name=DISPLAY_NAME ^
    --idle-shutdown-timeout=INACTIVITY_DURATION ^
    --project=PROJECT_ID ^
    --region=REGION

For more information about the command for creating a runtime template from the command line, see the gcloud CLI documentation.

How idle shutdown works

Your runtime shuts down when the following conditions are met:

  • There's no kernel activity for the specified time period.

  • The runtime isn't connected to a notebook.

To disconnect a runtime from a notebook, close the notebook. Leaving a notebook open while connected to a runtime prevents the runtime from shutting down.

For information on charges generated by runtimes, see Runtime charges.

What's next