Skip to content

Conversation

xigang
Copy link

@xigang xigang commented Dec 8, 2024

Fixes ##3528

When GetInfo is called with false parameter, it now reads cgroups data once every 5 seconds and gets data from containerData cache at other times. This change reduces the frequency of reading cgroups to prevent potential Linux
machine hangs caused by kernel kernfs clock pressure.

The change affects the containerDataToContainerInfo method in manager.go which is used to retrieve container information. By caching and reusing the cgroups data between reads, we reduce system load while still maintaining
reasonably up-to-date container metrics.

@xigang
Copy link
Author

xigang commented Dec 8, 2024

/cc @dims @iwankgb @cwangVT PTAL.

@dims
Copy link
Contributor

dims commented Dec 9, 2024

/ok-to-test

@xigang
Copy link
Author

xigang commented Dec 9, 2024

@dims Please run the workflow pipeline again, thanks.

# go test -v -run TestGetContainerInfo
=== RUN   TestGetContainerInfo
--- PASS: TestGetContainerInfo (0.00s)
=== RUN   TestGetContainerInfoV2
--- PASS: TestGetContainerInfoV2 (0.00s)
=== RUN   TestGetContainerInfoV2Failure
--- PASS: TestGetContainerInfoV2Failure (0.00s)
PASS
ok  	github.com/google/cadvisor/manager	0.010s

@xigang
Copy link
Author

xigang commented Dec 10, 2024

/retest

@xigang
Copy link
Author

xigang commented Feb 5, 2025

@dims For approve.

@dims
Copy link
Contributor

dims commented Feb 5, 2025

/assign @cwangVT

@xigang
Copy link
Author

xigang commented Feb 15, 2025

/cc @iwankgb Can we skip the check?

@xigang
Copy link
Author

xigang commented Feb 15, 2025

/test pull-cadvisor-e2e

@xigang
Copy link
Author

xigang commented Feb 15, 2025

/test

@xigang
Copy link
Author

xigang commented Feb 15, 2025

/trigger-tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants