Skip to content

Commit 77118d4

Browse files
committed
Extend CRI API to support PSI
1 parent 92a42e6 commit 77118d4

File tree

1 file changed

+36
-0
lines changed
  • staging/src/k8s.io/cri-api/pkg/apis/runtime/v1

1 file changed

+36
-0
lines changed

staging/src/k8s.io/cri-api/pkg/apis/runtime/v1/api.proto

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -748,6 +748,8 @@ message LinuxPodSandboxStats {
748748
ProcessUsage process = 4;
749749
// Stats of containers in the measured pod sandbox.
750750
repeated ContainerStats containers = 5;
751+
// IO usage gathered for the pod sandbox.
752+
IoUsage io = 6;
751753
}
752754

753755
// WindowsPodSandboxStats provides the resource usage statistics for a pod sandbox on windows
@@ -1793,6 +1795,8 @@ message ContainerStats {
17931795
FilesystemUsage writable_layer = 4;
17941796
// Swap usage gathered from the container.
17951797
SwapUsage swap = 5;
1798+
// IO usage gathered from the container.
1799+
IoUsage io = 6;
17961800
}
17971801

17981802
// WindowsContainerStats provides the resource usage statistics for a container specific for Windows
@@ -1807,6 +1811,27 @@ message WindowsContainerStats {
18071811
WindowsFilesystemUsage writable_layer = 4;
18081812
}
18091813

1814+
// PSI statistics for an individual resource.
1815+
message PsiStats {
1816+
// PSI data for all tasks in the cgroup.
1817+
PsiData Full = 1;
1818+
// PSI data for some tasks in the cgroup.
1819+
PsiData Some = 2;
1820+
}
1821+
1822+
// PSI data for an individual resource.
1823+
message PsiData {
1824+
// Total time duration for tasks in the cgroup have waited due to congestion.
1825+
// Unit: nanoseconds.
1826+
uint64 Total = 1;
1827+
// The average (in %) tasks have waited due to congestion over a 10 second window.
1828+
double Avg10 = 2;
1829+
// The average (in %) tasks have waited due to congestion over a 60 second window.
1830+
double Avg60 = 3;
1831+
// The average (in %) tasks have waited due to congestion over a 300 second window.
1832+
double Avg300 = 4;
1833+
}
1834+
18101835
// CpuUsage provides the CPU usage information.
18111836
message CpuUsage {
18121837
// Timestamp in nanoseconds at which the information were collected. Must be > 0.
@@ -1816,6 +1841,8 @@ message CpuUsage {
18161841
// Total CPU usage (sum of all cores) averaged over the sample window.
18171842
// The "core" unit can be interpreted as CPU core-nanoseconds per second.
18181843
UInt64Value usage_nano_cores = 3;
1844+
// CPU PSI statistics.
1845+
PsiStats psi = 4;
18191846
}
18201847

18211848
// WindowsCpuUsage provides the CPU usage information specific to Windows
@@ -1845,6 +1872,15 @@ message MemoryUsage {
18451872
UInt64Value page_faults = 6;
18461873
// Cumulative number of major page faults.
18471874
UInt64Value major_page_faults = 7;
1875+
// Memory PSI statistics.
1876+
PsiStats psi = 8;
1877+
}
1878+
1879+
message IoUsage {
1880+
// Timestamp in nanoseconds at which the information were collected. Must be > 0.
1881+
int64 timestamp = 1;
1882+
// IO PSI statistics.
1883+
PsiStats psi = 2;
18481884
}
18491885

18501886
message SwapUsage {

0 commit comments

Comments
 (0)