fix(linstor): drop the CPU limit of the blockstor components

With a 500m CPU limit the blockstor controller and every satellite sat
at the limit through a burst of volume creates, and idle satellites were
throttled in most CPU periods, so each reconcile pass and each create
stretched to tens of seconds. The LINSTOR components blockstor replaces
run without a CPU limit; the satellite now takes the LINSTOR satellite's
requests and memory limit, and the controller and apiserver keep their
memory limits.

The resources become values so a cluster can size them without patching
the chart.

Assisted-by: LLM
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
This commit is contained in:
Andrei Kvapil committed 2026-11-29 13:45:12 +01:00
1 parent ced338f4f1
commit 7ebbbd18a0
5 files changed
+107 -9

No files matched your search

@@ -166,9 +166,9 @@ spec:
allowPrivilegeEscalation: false
capabilities: {drop: [ALL]}
seccompProfile: {type: RuntimeDefault}
resources:
requests: {cpu: 50m, memory: 128Mi}
limits: {cpu: 500m, memory: 512Mi}
{{- with .Values.blockstorApiserver.resources }}
resources: {{- toYaml . | nindent 12 }}
{{- end }}
volumes:
- name: api-tls
secret:
@@ -169,7 +169,7 @@ spec:
allowPrivilegeEscalation: false
capabilities: {drop: [ALL]}
seccompProfile: {type: RuntimeDefault}
resources:
requests: {cpu: 50m, memory: 64Mi}
limits: {cpu: 500m, memory: 256Mi}
{{- with .Values.blockstorController.resources }}
resources: {{- toYaml . | nindent 12 }}
{{- end }}
{{- end }}
@@ -295,9 +295,9 @@ spec:
subPath: global_common.conf
readOnly: true
- {name: stream-tls, mountPath: /etc/blockstor/stream-tls, readOnly: true}
resources:
requests: {cpu: 50m, memory: 64Mi}
limits: {cpu: 500m, memory: 512Mi}
{{- with .Values.blockstorSatellite.resources }}
resources: {{- toYaml . | nindent 12 }}
{{- end }}
volumes:
- {name: dev, hostPath: {path: /dev, type: Directory}}
- {name: modules, hostPath: {path: /lib/modules}}
@@ -497,3 +497,83 @@ tests:
- equal:
path: spec.template.spec.terminationGracePeriodSeconds
value: 21
# A CPU limit throttles the reconcile passes; the LINSTOR components this
# backend replaces run without one.
- it: sets the controller no CPU limit
template: templates/blockstor-controller.yaml
documentSelector:
path: kind
value: Deployment
asserts:
- equal:
path: spec.template.spec.containers[0].resources
value:
requests: {cpu: 100m, memory: 64Mi}
limits: {memory: 256Mi}
- it: sets the apiserver no CPU limit
template: templates/blockstor-apiserver.yaml
documentSelector:
path: kind
value: Deployment
asserts:
- equal:
path: spec.template.spec.containers[0].resources
value:
requests: {cpu: 50m, memory: 128Mi}
limits: {memory: 512Mi}
- it: sizes the satellite as the LINSTOR satellite, without a CPU limit
template: templates/blockstor-satellite.yaml
documentSelector:
path: kind
value: DaemonSet
asserts:
- equal:
path: spec.template.spec.containers[0].resources
value:
requests: {cpu: 100m, memory: 128Mi}
limits: {memory: 2Gi}
- it: merges a satellite resources override over the defaults
template: templates/blockstor-satellite.yaml
documentSelector:
path: kind
value: DaemonSet
set:
blockstorSatellite.resources.limits.cpu: "2"
blockstorSatellite.resources.requests.cpu: 250m
asserts:
- equal:
path: spec.template.spec.containers[0].resources
value:
requests: {cpu: 250m, memory: 128Mi}
limits: {cpu: "2", memory: 2Gi}
- it: merges a controller resources override over the defaults
template: templates/blockstor-controller.yaml
documentSelector:
path: kind
value: Deployment
set:
blockstorController.resources.limits.memory: 1Gi
asserts:
- equal:
path: spec.template.spec.containers[0].resources
value:
requests: {cpu: 100m, memory: 64Mi}
limits: {memory: 1Gi}
- it: drops a default the apiserver override sets to null
template: templates/blockstor-apiserver.yaml
documentSelector:
path: kind
value: Deployment
set:
blockstorApiserver.resources.limits: null
asserts:
- equal:
path: spec.template.spec.containers[0].resources
value:
requests: {cpu: 50m, memory: 128Mi}
+18
View File
@@ -24,18 +24,36 @@ piraeusServer:
# Blockstor images are component-versioned: they are released from the
# blockstor repository and carry ITS version, so a cozystack release
# must not retag them to the cozystack version.
#
# None of the three sets a CPU limit, as the LINSTOR controller and
# satellite do not. CFS throttling under a limit stretches every
# reconcile pass: with 500m the controller and the satellites sat at the
# limit through a burst of volume creates, idle satellites were throttled
# in most CPU periods, and each create took tens of seconds. Memory stays
# limited. A key set here is merged over the default; set it to null to
# drop a default.
blockstorController:
image:
repository: ghcr.io/cozystack/blockstor-controller
tag: 0.3.0@sha256:ca5fc964265a1fd9e1153077f0565a9f07532c593bea1182d3b97a38430822ea
resources:
requests: {cpu: 100m, memory: 64Mi}
limits: {memory: 256Mi}
blockstorApiserver:
image:
repository: ghcr.io/cozystack/blockstor-apiserver
tag: 0.3.0@sha256:20cf599f8d0ae85a44b237b9d8ad2ca631a1feff3fd387194ef84636b538dd0b
resources:
requests: {cpu: 50m, memory: 128Mi}
limits: {memory: 512Mi}
blockstorSatellite:
image:
repository: ghcr.io/cozystack/blockstor-satellite
tag: 0.3.0@sha256:abff381da5425fdf7a6abc0d52006727cf7fe13c438acc79aaea192fc8681cb4
# The LINSTOR satellite's requests and memory limit.
resources:
requests: {cpu: 100m, memory: 128Mi}
limits: {memory: 2Gi}
# How a change to the satellite pod template reaches the nodes. The
# satellite turns Ready once its caches have synced, seconds after
# start; its first pass over the node's DRBD resources ends later and