Detecting and repairing hardware faults with instance health checks
A fault in an instance's GPU or accelerator can stop or slow every job that runs on the compute node. Amazon EC2 status checks can miss these faults, because they check whether the instance and its host are reachable and working, not whether its GPUs or accelerators work correctly. Instance health checks find them and act on the compute node through Slurm, so that the scheduler stops placing jobs there.
Contents
Prerequisites
To use instance health checks, you need the following:
-
The cluster must use Slurm version 26.05 or later.
-
The AMI must have AWS PCS agent version 1.6.0-1 or later. With an older agent, compute nodes start with no checks, and AWS PCS reports no error. For more information, see AWS PCS agent versions.
-
The AMI must use a supported operating system other than Amazon Linux 2.
-
For GPU instances, the AMI must have the NVIDIA driver and NVIDIA Data Center GPU Manager (DCGM) version 4. Also enable GPU persistence mode (
nvidia-persistenced); without it, every deep health check reports aWarning. For more information, see Every deep health check reports a Warning. -
For deep health checks, every instance type in the compute node group must have an NVIDIA GPU. Health monitoring has no instance type requirement.
Instance health checks don't need additional IAM permissions.
Turning on health monitoring with the default settings
To turn on health monitoring for a compute node group that doesn't have instance health
checks yet, run the following command. To turn it on when you create a compute node group, add
the same option to create-compute-node-group.
aws pcs update-compute-node-group --regionregion\ --cluster-identifiermy-cluster\ --compute-node-group-identifiermy-node-group\ --instance-health-checks '{"healthMonitoring": {"mode": "STANDARD"}}'
Replace region with the ID of the AWS Region where your
cluster is. This configuration does the following:
-
An agent on each instance checks the GPUs, AWS Neuron devices, and Elastic Fabric Adapter (EFA) devices for faults while the compute node runs jobs.
-
When the agent finds a fault that needs repair, AWS PCS applies the default repair action,
AUTO. -
Deep health checks stay off.
In the console, turn on Enable health monitoring in the Instance health checks section of the create or edit page. For all the settings and the console steps, see Configuring instance health checks.
Like other changes to a compute node group, changing instance health checks drains the compute nodes and replaces their instances. Make the change when the compute node group has few running jobs.
Checking that health monitoring is running
After instances launch with the new settings, run the following command on a login node, for a compute node whose instance is running.
scontrol show nodenode-name| grep Comment
The output looks like the following.
Comment={"health":"healthy","monitors":[{"monitor_type":"AcceleratedHardwareReady","status":"healthy","codes":[]},{"monitor_type":"NetworkingReady","status":"healthy","codes":[]}]}
The Comment field shows the agent's result, for example
"health":"healthy". On an instance without GPUs, Neuron devices, or EFA devices, it
shows "health":"not-monitoring". If the Comment is empty, see Health checks are turned on, but nothing runs. To read
the results, see Checking compute node health in Slurm.
Choosing a configuration
Change the default settings in the following cases.
- You want to find faults before jobs run on a new instance
-
Also turn on deep health checks. Start with the
QUICKorMEDIUMprofile. For the start time limit, see Start time limit.{"healthMonitoring": {"mode": "STANDARD"}, "deepHealthChecks": {"onStart": {"profile": "MEDIUM"}}}For more information, see Running deep health checks when compute nodes start.
- You want to keep a faulty instance to investigate it
-
Use the
ISOLATErepair action. The compute node stays out of service, and its instance keeps running and is billed, until you return it to service. A compute node above the group's minimum instance count is still scaled down when its idle time is reached, even while it is isolated, and AWS PCS terminates its instance.{"healthMonitoring": {"mode": "STANDARD", "repairAction": "ISOLATE"}} - You want to see what health checks find before they act
-
Use the
NONErepair action. The agent reports faults in the compute node'sCommentfield and changes nothing. Change the repair action when you trust the results.{"healthMonitoring": {"mode": "STANDARD", "repairAction": "NONE"}}
Repair actions
Each fault that a health check finds has a condition code, such as
GPU_ECC_DBE, and a severity. Only a fault with
Fatal severity starts the repair action. AWS PCS reports a Warning fault but
doesn't act on it.
The repair action is what AWS PCS does with the compute node when a health check finds
a Fatal fault, as the following table shows.
Repair action |
Slurm state |
What happens |
|---|---|---|
Console: Automatic |
Depends on the action |
AWS PCS chooses the action. |
Console: Replace |
|
The compute node takes no new jobs. Its running jobs finish, and then AWS PCS replaces the instance. If a deep health check finds the fault while the instance starts, AWS PCS replaces the instance immediately. |
Console: Isolate |
|
The compute node takes no new jobs, and its running jobs continue. It stays in the |
Console: None |
No change |
AWS PCS doesn't change the compute node's state. The health check
writes the fault to the compute node's Slurm |
AWS PCS never returns a compute node to service by itself. It stays out of service until you return it to service or AWS PCS replaces its instance. For more information, see Checking compute node health in Slurm.
Before you turn on instance health checks
AWS PCS doesn't limit how many compute nodes it repairs at once. If a problem affects
many instances, start with the repair action NONE.