🩺 GPU Health Check (Part 1/2) - #5057
Open
tessaSlice wants to merge 6 commits into
Open
Conversation
tessaSlice
force-pushed
the
health-checks
branch
from
July 23, 2026 19:19
3fa54b7 to
e970664
Compare
tessaSlice
force-pushed
the
health-checks
branch
3 times, most recently
from
July 23, 2026 20:59
ccf8d7e to
51504ca
Compare
tessaSlice
force-pushed
the
health-checks
branch
from
July 23, 2026 21:03
51504ca to
c9b9191
Compare
TheanLim
reviewed
Jul 23, 2026
TheanLim
reviewed
Jul 24, 2026
TheanLim
reviewed
Jul 24, 2026
|
|
||
| // gpuBootGracePeriod tolerates a missing file until dcgm-init's first write | ||
| // (~60s in, plus jitter/skew). 2x the 60s producer tick. | ||
| const gpuBootGracePeriod = 120 * time.Second |
Contributor
There was a problem hiding this comment.
I wonder if we should create a GPUProducerTick constant and shared it between dcgm-init and agent.
That way gpuBootGracePeriod=2*GPUProducerTick
wdyt
Contributor
There was a problem hiding this comment.
What's the reasoning behind 120 seconds?
Author
There was a problem hiding this comment.
Gives dcgm-init 1 re-try attempt if the first attempt to connect to DCGM daemon (nv-hostengine) fails. Each attempt takes 60s since reconcileAndCollect runs every 60s.
Ref: https://github.com/aws/amazon-ecs-agent/blob/feature/gpu-metrics/dcgm-init/engine/engine.go#L135
e.collectionInterval is set as 60s here: https://github.com/aws/amazon-ecs-agent/blob/feature/gpu-metrics/dcgm-init/engine/engine.go#L78C23-L78C48
TheanLim
reviewed
Jul 27, 2026
TheanLim
approved these changes
Jul 27, 2026
added 3 commits
July 28, 2026 11:03
Add gpu_healthcheck.go and its table-driven tests: the ACCELERATED_COMPUTE instance health check reads the shared GPU metrics file written by dcgm-init and derives INITIALIZING/OK/IMPAIRED/INSUFFICIENT_DATA. Boot grace and staleness threshold are both 120s (2x the 60s producer tick).
Match NewEBSCSIDaemonHealthCheck's convention of returning the doctor.Healthcheck interface rather than the concrete *gpuHealthcheck.
Switch the GPU healthcheck's logging from cihub/seelog to the structured
ecs-agent/logger, matching the EBS CSI healthcheck. Format-string Infof
calls become structured logger.Info(msg, Fields{...}).
added 3 commits
July 28, 2026 11:03
The per-step stepNow local is unnecessary under Go 1.22+ per-iteration loop scoping and synchronous same-iteration use; capture s.now directly.
tessaSlice
force-pushed
the
health-checks
branch
from
July 28, 2026 18:03
5c36baf to
5e6061f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add gpu_healthcheck.go and its table-driven tests from dcgm-init-v3. The check reads the shared GPU metrics file written by dcgm-init and derives INITIALIZING/OK/IMPAIRED/INSUFFICIENT_DATA status with boot-grace and staleness handling.
In the follow up PR we will attach this
gpu_healthcheckto theagentitself so it will emit GPU health checks whenever the customer requests it.Implementation details
The following files were modified:
agent/doctor/gpu_healthcheck.go: GPU health check uses a DCGMMetricsReader to determine the health status.gpu_healthcheck_test.go: Table-driven tests evaluating intended behavior of GPU health check evaluating for potential scenarios.Testing
Test file:
gpu_healthcheck_test.go.New tests cover the changes: yes
Description for the changelog
Feature - GPU Health Check (Part 1/2)
Additional Information
Does this PR include breaking model changes? If so, Have you added transformation functions?
No.
Does this PR include the addition of new environment variables in the README?
No.
Licensing
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.