mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-26 12:46:06 +00:00
Add a slow e2e test to monitor kubelet resource usage
This test tracks kubelet resource usage over a long period of time (1hr) when running N pods (e.g., N=0,50), and prints out the resource usage. This would give us an idea how much kubelet's management overhead is in a stable cluster. Some followup items: * Use a more realistic workload (e.g., including probing) * Fail the test if the resource usage is too high. Caveat: * We assume the scheduler would do a decent job distributing the pause pods, but we should double check. * Cluster addon pods could be unevenly distributed and skews the resource usage on nodes.
This commit is contained in:
@@ -37,7 +37,6 @@ const (
|
||||
pollInterval = 1 * time.Second
|
||||
// Interval to poll /stats/container on a node
|
||||
containerStatsPollingInterval = 5 * time.Second
|
||||
resourceCollectionTime = 1 * time.Minute
|
||||
)
|
||||
|
||||
// getPodMatches returns a set of pod names on the given node that matches the
|
||||
@@ -160,16 +159,4 @@ var _ = Describe("kubelet", func() {
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
Describe("Monitor resource usage on node", func() {
|
||||
It("Ask kubelet to report container resource usage", func() {
|
||||
// TODO: After gathering some numbers, we should set a resource
|
||||
// limit for each container and fail the test if the usage exceeds
|
||||
// the preset limit.
|
||||
By(fmt.Sprintf("Waiting %v to collect resource usage on node", resourceCollectionTime))
|
||||
time.Sleep(resourceCollectionTime)
|
||||
resourceMonitor.LogLatest()
|
||||
resourceMonitor.LogCPUSummary()
|
||||
})
|
||||
})
|
||||
})
|
||||
|
Reference in New Issue
Block a user