systemctl-thaw
Thaw a frozen control group
TLDR
Thaw a specific unit
Thaw multiple units
Thaw all currently frozen units
SYNOPSIS
systemctl [OPTIONS...] thaw UNIT...
PARAMETERS
UNIT...
The name of one or more systemd units (e.g., `my-service.service`, `user@1000.service`) to thaw. Multiple units can be specified, separated by spaces.
--system
Operate on the systemd system and service manager. This is the default.
--user
Operate on the systemd user session manager for the current user.
DESCRIPTION
The `systemctl thaw` command is used to resume the execution of one or more systemd units (services, scopes, etc.) that were previously put into a frozen (paused) state using `systemctl freeze`. When a unit is thawed, its processes, which were suspended and held in memory, are allowed to continue their execution from the exact point where they were paused. This action effectively reverses the `freeze` operation.
Unlike `systemctl stop`, which terminates a unit's processes and releases its resources, `freeze` and `thaw` are designed to pause and resume processes while keeping their state and allocated resources intact. This makes `thaw` particularly useful for scenarios requiring system snapshots, live migration of services, or debugging a service in a suspended state without altering its runtime environment. The underlying mechanism for `freeze` and `thaw` relies on the cgroup freezer subsystem, which allows the kernel to pause and unpause all processes within a specific control group.
CAVEATS
- Permissions: Thawing units typically requires root privileges or appropriate permissions configured via Polkit.
- Resource Usage: While thawed, the unit continues to consume memory and other resources it held when frozen. This is not a resource-freezing mechanism.
- Kernel Support: Relies on the cgroup freezer subsystem, which must be supported and enabled by the Linux kernel.
- Not a Replacement for Stop/Start: `freeze`/`thaw` is for pausing execution, not for graceful shutdown or startup. Misuse can lead to unexpected behavior if services are not designed to handle sudden pauses.
UNDERLYING MECHANISM
The `freeze` and `thaw` operations are implemented using the Linux kernel's cgroup freezer subsystem. When a unit is frozen, systemd places its processes into a cgroup and sets the cgroup's `freezer.state` to `FROZEN`. Thawing reverses this by setting the state to `THAWED`.
COMMON USE CASES
This command is particularly useful in environments requiring precise control over process execution, such as creating consistent system snapshots for backups or virtualization, debugging services by pausing them at a specific state, or preparing services for live migration across hosts without losing their in-memory state.
HISTORY
The `systemctl thaw` command is an integral part of the systemd init system, which was initially developed by Lennart Poettering and Kay Sievers and first adopted by Fedora in 2011. The `freeze` and `thaw` functionalities leverage the Linux kernel's cgroup freezer subsystem, a feature that allows processes within a control group to be suspended and resumed. This capability was incorporated into `systemd` to provide advanced process lifecycle management, offering a more granular control over running services than traditional `stop`/`start` operations, particularly useful for system introspection, debugging, and snapshotting purposes in modern Linux environments.
SEE ALSO
systemctl-freeze(1), systemctl(1), systemctl-start(1), systemctl-stop(1), cgroups(7)


