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.

Expand
表 9.1. OpenStackControlPlane CR options
OptionDescription

swiftProxy/ceilometerEnabled

Enables the Ceilometer middleware in the proxy server.

swiftProxy/encryptionEnabled

Enables object encryption by using the Key Manager service (barbican).

swiftRing/minPartHours

Sets the minimum time in hours before a ring partition can be moved following a rebalance.

swiftRing/partPower

Sets the partition power to use when building Object Storage rings.

swiftRing/ringReplicas

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:

Expand
表 9.2. Configuration file options
ServiceKey

account-server

01-account-server.conf

container-server

01-container-server.conf

object-server

01-object-server.conf

object-expirer

01-object-expirer.conf

proxy-server

01-proxy-server.conf

Considerations
  • Worker configuration: By default, Object Storage services use auto workers. 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 BestEffort QoS class. High memory use can cause pod eviction during node pressure. Setting resource requests or limits changes the QoS class to Burstable, which gives containers higher priority during resource contention.

Procedure

  1. Open your OpenStackControlPlane CR file, openstack_control_plane.yaml, and enable Ceilometer middleware and object encryption under the swiftProxy parameter in the swift template:

    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
    ...
  2. Add values for minPartHours, partPower, and ringReplicas under the swiftRing parameter:

    ...
    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.
  3. Change the number of workers in the object-server service by adding the defaultConfigOverwrite parameter under the swiftStorage parameter:

    ...
    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 the object-server service.
  4. Optional: Set resource limits for the Object Storage service containers to change the Quality of Service (QoS) class from BestEffort to Burstable. Add resources for swiftProxy and swiftStorage under the swift template:

    ...
    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 to 2000m to 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 to 5Gi to 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 to 500m to 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 to 5Gi to allocate 5 GiB of memory to the pods for this service.
  5. Update the control plane:

    $ oc apply -f openstack_control_plane.yaml -n openstack
  6. Wait until RHOCP creates the resources related to the OpenStackControlPlane CR. Run the following command to check the status:

    $ oc get openstackcontrolplane -n openstack

    The OpenStackControlPlane resources are created when the status is "Setup complete".

    提示

    Append the -w option to the end of the get command to track deployment progress.

Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

关于红帽文档

Legal Notice

Theme

© 2026 Red Hat
返回顶部