In this article
The systemd.service manual defines main as the default: service completion follows the main process selected according to Type. With cgroup, the service is considered running while any process in its control group remains. The manual excludes combining ExitType=cgroup with Type=oneshot. It recommends main when the process model and main process are known reliably, while cgroup addresses applications without a predictable main-process arrangement.
An inference coordinator can exit while a helper remains alive. Whether the service manager still calls the unit running depends partly on ExitType. Changing this setting can suppress an apparent outage in a status view without restoring any useful computation. The relevant design question is which process lifetime represents the service, rather than whether some process survives.
The service-manager contract
The systemd.service manual defines main as the default: service completion follows the main process selected according to Type. With cgroup, the service is considered running while any process in its control group remains. The manual excludes combining ExitType=cgroup with Type=oneshot. It recommends main when the process model and main process are known reliably, while cgroup addresses applications without a predictable main-process arrangement.
Implementation details
List coordinator, model workers and ancillary processes before choosing the setting. A telemetry helper or orphaned cleanup process should not accidentally become the evidence that an inference endpoint is available. Document how restart decisions depend on unit completion and what independent probe establishes model readiness. Keep process identity and control-group membership in the validation record, because a wrapper exiting and the actual worker exiting can mean very different things under the default policy.
A constructed validation case
Construct an isolated coordinator that launches a long-lived helper and then exits deliberately. Compare unit state under main and cgroup with other lifecycle settings held constant. In the cgroup branch, verify that the helper’s survival can coexist with a failing synthetic inference request. End the helper and observe the final unit transition. Repeat with a worker that remains functional after the coordinator exits, recording that as a distinct application design rather than assuming every surviving child is useless.
Recovery limits
This setting does not repair partial process failure or prove the application can accept another request. A control group containing a live process is only a lifecycle observation. Check the installed systemd version, effective service type and restart behavior together. Do not select cgroup merely to make a failed coordinator look healthy; select it when the application’s process model actually requires that lifetime contract, and retain explicit functional checks for the workload.
Primary references
systemd systemd.service documented interface; systemd systemd.unit documented interface.
This is a proposed service-lifecycle validation, not an executed Retrivium benchmark. Preserve the implementation version and unresolved outcomes; interface documentation does not establish the availability or correctness of an inference service.
Related reading
Explain partial model-worker loss under a cgroup OOM; Keep a service watchdog tied to useful progress.
Earn rental income from GPUs
Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.