Skip to content

Commit 4e82d0d

Browse files
committed
Update load image timeout based on benchmarking.
1 parent 11fe7bd commit 4e82d0d

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

agent/dockerclient/timeout.go

+8-4
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,14 @@ const (
2323
ListImagesTimeout = 10 * time.Minute
2424
// LoadImageTimeout is the timeout for the LoadImage API. It's set
2525
// to much lower value than pullImageTimeout as it involves loading
26-
// image from either a file or STDIN
27-
// calls involved.
28-
// TODO: Benchmark and re-evaluate this value
29-
LoadImageTimeout = 10 * time.Minute
26+
// image from either a file or STDIN calls involved.
27+
// This value is set based on benchmarking the time of loading the pause container image,
28+
// since it's currently only used to load that image. If this is to be used to load any
29+
// other image in the future, additional benchmarking will be required.
30+
// Per benchmark, 2 min is roughly 4x of the worst case (29s) across 400 image loads on
31+
// al1/al2/al2gpu/al2arm with smallest instance type available (t2.nano/a1.medium) and
32+
// burst balance = 0.
33+
LoadImageTimeout = 2 * time.Minute
3034
// RemoveImageTimeout is the timeout for the RemoveImage API.
3135
RemoveImageTimeout = 3 * time.Minute
3236

0 commit comments

Comments
 (0)