Hibernating Workspaces
Understanding how to hibernate, pause, and resume workspaces on DevZero.
What is Workspace Hibernation?
Workspace hibernation is essential for managing cloud resources efficiently. With DevZero, you can hibernate workspaces to save on resources and costs. This is a feature which is not directly available on platforms like AWS, GCP, or Azure. By hibernating inactive workspaces, organizations can significantly reduce compute consumption, ensuring resources are only allocated when necessary, optimizing operational expenses without compromising critical data. Workspaces on DevZero may enter a hibernated state under certain conditions, such as prolonged inactivity or system resource constraints on the DevZero platform. Hibernation ensures optimal resource usage while maintaining your workspace's critical data under /home/devzero
.
Workspace hibernation is a state where active processes are halted, and non-persistent parts of the filesystem are cleared. During hibernation:
- Persistent Data: All the data (except
/tmp/*
) is retained and restored when the workspace resumes. - Processes: Currently, running processes are terminated, and their states are not saved.
Workspace Hibernation in Devzero
Workspace hibernation policies can be configured by admins under Admin > Controls & Alerting. This allows fine-tuning of:
Workspace Limits:
- Time-based hibernation - Automatically hibernate workspaces at a specified time. The time is interpreted based on the user’s timezone, which can be set in their profile.
- Activity-based hibernation - Hibernates workspaces after a defined period of inactivity.
Cluster Limits:
- Time-based hibernation - Applies to the clusters with no running workloads, setting a specific time for hibernation.
- Activity-based hibernation - Hibernates clusters after inactivity.
Note: Enterprise plan customers can also select a third option - No Hibernation
for both clusters and workspaces, providing complete control over resource usage.
Force Hibernation:
Admins can immediately hibernate all active workspaces by clicking Hibernate all workspaces
.
Cost and Email Alerts:
- Set spending limits for the team.
- Enable email notifications to alert when resource usage reaches 75%, 90%, or 100%.
Note: These configurations provide granular control over workspace resource consumption and can only be changed with the Pro or Enterprise plans.
Waking Up a Workspace
A workspace in hibernation is automatically restarted when you attempt to reconnect via SSH, IDEs, or other methods. You can also explicitly wake up a hibernated workspace using the DevZero CLI.
How to Wake Up Using the DevZero CLI
To wake up a hibernated workspace, run the following command:
Replace <workspace-id>
with the ID of your workspace. You can retrieve the workspace ID by running:
This will display a list of your workspaces along with their statuses.
Wake-Up via Web Interface
When you access a hibernated workspace through the DevZero platform and try the wake up that workspace, you’ll see a notification indicating that the workspace is waking up. Below is an example screenshot of the wake-up process:
After clicking on Wake up
, You will see this notification:
Once the workspace is active, you’ll see its status update to "Running":
Activity and Hibernation Criteria
Workspaces are monitored for activity, such as active SSH sessions or IDE connections. If no activity is detected for 30 minutes (you can customize this time period if you are on a Pro or Enterprise plan), the workspace is considered dormant and may be hibernated. This automatic mechanism optimizes resource usage without requiring manual intervention from users.
Future Enhancements
We are working on improvements to make workspace hibernation and resumption more reliable and user-friendly, including preserving the state of running processes and saving/restoring the filesystem state for more comprehensive workspace recovery. To participate as a design partner, please send an email to support@devzero.io, or visit https://devzero.io/dashboard and click the "chat" icon in the bottom right-hand side of your browser window.