9.2. Changing default parameters for object storage
Customize Object Storage service (swift) settings to optimize performance and prevent pod eviction. Configure ring parameters, enable encryption and monitoring, adjust worker counts, and set resource limits based on your deployment needs.
| Option | Description |
|---|---|
|
| Enables the Ceilometer middleware in the proxy server. |
|
| Enables object encryption by using the Key Manager service (barbican). |
|
| Sets the minimum time in hours before a ring partition can be moved following a rebalance. |
|
| Sets the partition power to use when building Object Storage rings. |
|
| Sets the number of object replicas to use in the Object Storage rings. |
You can override the following configuration files for Object Storage services by using the defaultConfigOverwrite parameter and keys in the OpenStackControlPlane CR:
| Service | Key |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- Considerations
-
Worker configuration: By default, Object Storage services use
autoworkers. This spawns one worker per CPU core. Nodes with many CPU cores can run too many worker processes, which increases memory use. Set the number of workers explicitly to control resource usage. -
Quality of Service classes: By default, Object Storage containers have no resource requests or limits set. This results in a
BestEffortQoS class. High memory use can cause pod eviction during node pressure. Setting resource requests or limits changes the QoS class toBurstable, which gives containers higher priority during resource contention.
-
Worker configuration: By default, Object Storage services use
Procedure
Open your
OpenStackControlPlaneCR file,openstack_control_plane.yaml, and enable Ceilometer middleware and object encryption under theswiftProxyparameter in theswifttemplate:apiVersion: core.openstack.org/v1beta1 kind: OpenStackControlPlane metadata: name: openstack-control-plane namespace: openstack spec: ... swift: enabled: true template: swiftProxy: ceilometerEnabled: true encryptionEnabled: true replicas: 2 ...Add values for
minPartHours,partPower, andringReplicasunder theswiftRingparameter:... spec: ... swift: enabled: true template: swiftProxy: ... swiftRing: minPartHours: <number_of_hours> partPower: <partition_power> ringReplicas: <number_of_copies> ...-
Replace
<number_of_hours>with the minimum time in hours before a ring partition can be moved following a rebalance. -
Replace
<partition_power>with the partition power you want to use when building Object Storage rings, for example,12. -
Replace
<number_of_copies>with the number of object copies you want in your cluster.
-
Replace
Change the number of workers in the
object-serverservice by adding thedefaultConfigOverwriteparameter under theswiftStorageparameter:... spec: ... swift: enabled: true template: swiftProxy: ... swiftRing: ... swiftStorage: replicas: 3 storageClass: local-storage storageRequest: 10Gi defaultConfigOverwrite: 01-object-server.conf: | [DEFAULT] workers = <number_of_workers>-
Replace
<number_of_workers>with the number of workers you want in theobject-serverservice.
-
Replace
Optional: Set resource limits for the Object Storage service containers to change the Quality of Service (QoS) class from
BestEfforttoBurstable. AddresourcesforswiftProxyandswiftStorageunder theswifttemplate:... spec: ... swift: enabled: true template: swiftProxy: ... resources: limits: cpu: <cpu_limit> memory: <memory_limit> requests: cpu: <cpu_request> memory: <memory_request> swiftStorage: ... resources: limits: cpu: <cpu_limit> memory: <memory_limit> requests: cpu: <cpu_request> memory: <memory_request> ...-
Replace
<cpu_limit>with the maximum absolute allocation of CPU for the pods for this service in millicpus. For example, set to2000mto limit the CPU allocation to the pods for this service to 200%. -
Replace
<memory_limit>with the maximum allocation of memory for the pods for this service. For example, set to5Gito limit the memory allocation to the pods for this service to 5 GiB. -
Replace
<cpu_request>with the requested minimum allocation of CPU for the pods for this service in millicpus. For example, set to500mto allocate 50% of the CPU to the pods for this service. -
Replace
<memory_request>with the requested minimum allocation of memory for the pods for this service. For example, set to5Gito allocate 5 GiB of memory to the pods for this service.
-
Replace
Update the control plane:
$ oc apply -f openstack_control_plane.yaml -n openstackWait until RHOCP creates the resources related to the
OpenStackControlPlaneCR. Run the following command to check the status:$ oc get openstackcontrolplane -n openstackThe
OpenStackControlPlaneresources are created when the status is "Setup complete".提示Append the
-woption to the end of thegetcommand to track deployment progress.