StorageClass parameters
Cache sizing, QoS, encryption and compression are all StorageClass parameters, which means they are chosen per class and fixed for the volumes that class creates. Running two profiles — a database class and an archive class, say — means two StorageClasses against the same pool.
Set them at install time with --set storageclass.<key>=..., or author a
StorageClass of your own with the parameters in the middle column.
Parameters
| Helm value | Parameter | Default | Description |
|---|---|---|---|
config | config | server default | Storage config profile name. Leave unset and the pool defaults it. |
labels | labels | storage=mgx | Labels applied to the volume. |
minCacheRCacheSize | min_cache_r_cache_size | 1024 | Read-cache floor, MiB. |
minCacheRWCacheSize | min_cache_rw_cache_size | 1024 | Write-cache floor, MiB. |
maxCacheRCacheSize | max_cache_r_cache_size | 20480 | Read-cache ceiling, MiB. |
maxCacheRWCacheSize | max_cache_rw_cache_size | 3072 | Write-cache ceiling, MiB. |
ratioCacheRCacheSize | ratio_cache_r_cache_size | 0.1 | Read cache as a ratio of volume size. |
ratioCacheRWCacheSize | ratio_cache_rw_cache_size | 0.05 | Write cache as a ratio of volume size. |
qosRMBPerSec | qos_r_mbytes_per_sec | unset | Read bandwidth cap, MB/s. |
qosWMBPerSec | qos_w_mbytes_per_sec | unset | Write bandwidth cap, MB/s. |
qosRWMBPerSec | qos_rw_mbytes_per_sec | unset | Combined read+write bandwidth cap, MB/s. |
qosRWIOPS | qos_rw_ios_per_sec | unset | Combined read+write IOPS cap. |
storageEncryptSecret | storage_encrypt_secret | unset | Name of the encryption secret. Unset means no encryption. |
storageCompress | storage_compress | unset | Compression level, 0–9. |
reclaimPolicy | — | Delete | Delete or Retain. |
Classes are created with volumeBindingMode: Immediate and
allowVolumeExpansion: true.
A QoS or storage parameter left unset is omitted from the class entirely rather than sent as a zero, so the pool's own default applies.
Cache sizing
The two cache sizes are computed at volume creation as
clamp(ratio * volume size in MiB, floor, ceiling)
which is why the ratio alone does not tell you the answer — see Caching for worked examples and for what to tune when a working set does not fit.
A hand-written class
Everything above as YAML, for the case where you want a second profile rather than to change the chart's:
apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: mgxcsi-sc-db provisioner: csi.migrx.io parameters: labels: "storage=mgx,profile=db" min_cache_r_cache_size: "4096" min_cache_rw_cache_size: "2048" max_cache_r_cache_size: "65536" max_cache_rw_cache_size: "8192" ratio_cache_r_cache_size: "0.2" ratio_cache_rw_cache_size: "0.1" qos_rw_ios_per_sec: "20000" storage_compress: "3" reclaimPolicy: Retain volumeBindingMode: Immediate allowVolumeExpansion: true
Existing volumes keep the parameters they were created with; a class edit applies to volumes created after it.