You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The containers scope file will not
be created before the NodePublish RPC
call, due to that we cannot apply qos
at the container level rather we need
apply at the pod level. updating the
design to apply the qos at the pod
level.
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
[$]kubectl get po csi-rbd-demo-pod -oyaml |grep -i qosClass
105
102
qosClass: BestEffort
106
103
```
107
104
108
105
Now check in the `kubepods-besteffort.slice` and identify the right path using
109
-
pod UID and container UID
106
+
pod UID (hyphens replaced with underscores).
110
107
111
-
Before that check `io.max` on the application pod and see if there is any limit
108
+
Come back to the Node and navigate to the pod's cgroup slice
112
109
113
110
```bash
114
-
[$]kubectl exec -it csi-rbd-demo-pod -- sh
115
-
sh-4.4# cat /sys/fs/cgroup/io.max
116
-
sh-4.4#
117
-
```
118
-
119
-
Come back to the Node and find the right cgroup scope
120
-
121
-
```bash
122
-
sh-5.1# cd kubepods-besteffort.slice/kubepods-besteffort-podcdf7b785_4eb7_44f7_99cc_ef53890f4dfd.slice/crio-77e57fbbc0f0630f41f9f154f4b5fe368b6dcf7bef7dcd75a9c4b56676f10bc9.scope/
123
-
124
-
111
+
sh-5.1# cd kubepods-besteffort.slice/kubepods-besteffort-podcdf7b785_4eb7_44f7_99cc_ef53890f4dfd.slice/
125
112
sh-5.1# echo"252:0 wbps=1048576"> io.max
126
113
sh-5.1# cat io.max
127
114
252:0 rbps=max wbps=1048576 riops=max wiops=max
128
115
```
129
116
130
-
Now go back to the application pod and check if we have the right limit set
131
-
132
-
```bash
133
-
[$]kubectl exec -it csi-rbd-demo-pod -- sh
134
-
sh-4.4# cat /sys/fs/cgroup/io.max
135
-
252:0 rbps=max wbps=1048576 riops=max wiops=max
136
-
sh-4.4#
137
-
```
138
-
139
117
Note:- We can only support the QoS that cgroup v2 io controller supports, this
140
118
means that cumulative read+write QoS limits won't be supported.
141
119
142
120
Below are the configurations that will be supported
143
121
144
122
| Parameter | Description |
145
123
| --- | --- |
146
-
|MaxReadIOPS| Max read IO operations per second |
147
-
|MaxWriteIOPS| Max write IO operations per second |
148
-
|MaxReadBytesPerSecond| Max read bytes per second |
149
-
|MaxWriteBytesPerSecond| Max write bytes per second |
124
+
|maxReadIops| Max read IO operations per second |
125
+
|maxWriteIops| Max write IO operations per second |
126
+
|maxReadBps| Max read bytes per second |
127
+
|maxWriteBps| Max write bytes per second |
150
128
151
129
## Implementation Approach
152
130
@@ -160,10 +138,10 @@ kind: VolumeAttributesClass
160
138
metadata:
161
139
name: silver
162
140
parameters:
163
-
MaxReadIOPS: ""
164
-
MaxWriteIOPS: ""
165
-
MaxReadBytesPerSecond: ""
166
-
MaxWriteBytesPerSecond: ""
141
+
maxReadIops: ""
142
+
maxWriteIops: ""
143
+
maxReadBps: ""
144
+
maxWriteBps: ""
167
145
```
168
146
169
147
VolumeAttributesClassName is a new parameter in the PVC object the user can
@@ -182,41 +160,52 @@ QoS at the storage level which means setting some configuration at the storage
182
160
1. During NodePublishVolume operation retrieve the QoS from image metadata
183
161
1. Whenever a new pod comes in apply the QoS
184
162
185
-
#### Container Discovery and QoS Application
163
+
#### Pod-Level QoS Application
186
164
187
165
When kubelet invokes the NodePublishVolume RPC call, it provides the pod UUID
188
-
as part of the request. Ceph-CSI will use this pod UUID to locate the correct
189
-
cgroup hierarchy path, following the same approach demonstrated in the manual
190
-
steps above.
166
+
as part of the request. Ceph-CSI uses this pod UUID to locate the pod's cgroup
167
+
hierarchy path and applies QoS limits at the pod level.
168
+
169
+
##### Key Design Decision: Pod-Level io.max
191
170
192
-
Since Ceph-CSI cannot determine which specific container within the pod the
193
-
RBD volume is being mounted to, the QoS limits (io.max) must be applied to
194
-
**all containers** found in the pod's cgroup directory. This ensures that the
195
-
QoS limits are enforced regardless of which container is using the volume.
171
+
QoS limits are applied to the pod's io.max file, not individual container
172
+
io.max files. This design choice provides several benefits:
196
173
197
-
The container discovery process follows these steps:
0 commit comments