open-local(kernel 4.18)限流功能没有生效 #233
Unanswered
Clara12062
asked this question in
Q&A
Replies: 2 comments 3 replies
-
相同的困惑 in 0.6.6 |
Beta Was this translation helpful? Give feedback.
0 replies
-
allowVolumeExpansion: true
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"allowVolumeExpansion":true,"apiVersion":"storage.k8s.io/v1","kind":"StorageClass","metadata":{"annotations":{},"name":"open-local-lvm-io-throttling"},"parameters":{"bps":"1048576","iops":"1024","volumeType":"LVM"},"provisioner":"yodaplugin.csi.alibabacloud.com","reclaimPolicy":"Delete","volumeBindingMode":"WaitForFirstConsumer"}
creationTimestamp: "2023-09-06T06:16:22Z"
name: open-local-lvm-io-throttling
resourceVersion: "16781492"
uid: 72cd9992-4781-464b-8aa9-712b2b52fcde
parameters:
bps: "10485760"
iops: "1024"
volumeType: LVM
provisioner: local.csi.aliyun.com
reclaimPolicy: Delete
volumeBindingMode: WaitForFirstConsumer
---
apiVersion: v1
kind: Service
metadata:
name: test-io-throttling
labels:
app: test-io-throttling
spec:
ports:
- port: 80
name: web
clusterIP: None
selector:
app: test-io-throttling
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: test-io-throttling
spec:
selector:
matchLabels:
app: test-io-throttling
podManagementPolicy: Parallel
serviceName: "test-io-throttling"
replicas: 1
volumeClaimTemplates:
- metadata:
name: html
spec:
accessModes:
- ReadWriteOnce
storageClassName: open-local-lvm-io-throttling
resources:
requests:
storage: 5Gi
template:
metadata:
labels:
app: test-io-throttling
spec:
tolerations:
- key: node-role.kubernetes.io/control-plane
operator: Exists
effect: NoSchedule
containers:
- name: test
image: xridge/fio
imagePullPolicy: Always
volumeMounts:
- mountPath: "/data"
name: html
command:
- sh
- "-c"
- |
while true; do
echo "huizhi testing";
echo "yes ">>/data/yes.txt;
sleep 120s
done; already validated on environment: OS: 3.10.0-1160.76.1.el7.x86_64 |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
环境信息
操作步骤
按照部署文档, 新增限流sc:
修改statefulset的sc为
open-local-lvm-io-throttling
, pod的volumeMode为Filesystem
, 在pod内部使用dd命令测试IO性能:显然没有限制住.
初步怀疑和
volumeMode
有关系, 于是使用example/lvm/sts-io-throttling.yaml
进行部署验证, 但显示仍没有生效:查看cgroup/blkio的信息, 相关限制已经被写进去了.
在宿主机内查看对应cgroup的blkio的限制是有值的, 但是在pod内查看却没有任何信息:
pod内查看
宿主机查看
在pod内执行fio测试命令, 有告警
全部测试信息:
创建一个限流卷的csi-plugin日志如下:
期望的带宽应该是1024KiB/s. 但现在远远没有限制住. 有人知道这是什么原因吗?
Beta Was this translation helpful? Give feedback.
All reactions