OpenShift Container Storage is now OpenShift Data Foundation starting with version 4.9.
Ce contenu n'est pas disponible dans la langue sélectionnée.
Chapter 11. Changing resources for the OpenShift Container Storage components
When you install OpenShift Container Storage, it comes with pre-defined resources that the OpenShift Container Storage pods can consume. In some situations with higher I/O load, it might be required to increase these limits.
- To change the CPU and memory resources on the rook-ceph pods, see Section 11.1, “Changing the CPU and memory resources on the rook-ceph pods”.
- To tune the resources for the Multicloud Object Gateway (MCG), see Section 11.2, “Tuning the resources for the MCG”.
11.1. Changing the CPU and memory resources on the rook-ceph pods Copier lienLien copié sur presse-papiers!
When you install OpenShift Container Storage, it comes with pre-defined CPU and memory resources for the rook-ceph pods. You can manually increase these values according to the requirements.
You can change the CPU and memory resources on the following pods:
-
mgr
-
mds
-
rgw
The following example illustrates how to change the CPU and memory resources on the rook-ceph pods. In this example, the existing MDS pod values of cpu
and memory
are increased from 1
and 4Gi
to 2
and 8Gi
respectively.
Edit the storage cluster:
oc edit storagecluster -n openshift-storage <storagecluster_name>
# oc edit storagecluster -n openshift-storage <storagecluster_name>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow <storagecluster_name>
- Specify the name of the storage cluster.
Example 11.1. Example
oc edit storagecluster -n openshift-storage ocs-storagecluster
# oc edit storagecluster -n openshift-storage ocs-storagecluster
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Add the following lines to the storage cluster Custom Resource (CR):
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Save the changes and exit the editor.
Alternatively, run the
oc patch
command to change the CPU and memory value of themds
pod:oc patch -n openshift-storage storagecluster <storagecluster_name>
# oc patch -n openshift-storage storagecluster <storagecluster_name> --type merge \ --patch '{"spec": {"resources": {"mds": {"limits": {"cpu": "2","memory": "8Gi"},"requests": {"cpu": "2","memory": "8Gi"}}}}}'
Copy to Clipboard Copied! Toggle word wrap Toggle overflow <storagecluster_name>
- Specify the name of the storage cluster.
Example 11.2. Example
oc patch -n openshift-storage storagecluster ocs-storagecluster \ --type merge \ --patch '{"spec": {"resources": {"mds": {"limits": {"cpu": "2","memory": "8Gi"},"requests": {"cpu": "2","memory": "8Gi"}}}}}'
# oc patch -n openshift-storage storagecluster ocs-storagecluster \ --type merge \ --patch '{"spec": {"resources": {"mds": {"limits": {"cpu": "2","memory": "8Gi"},"requests": {"cpu": "2","memory": "8Gi"}}}}}'
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
11.2. Tuning the resources for the MCG Copier lienLien copié sur presse-papiers!
The default configuration for the Multicloud Object Gateway (MCG) is optimized for low resource consumption and not performance. For more information on how to tune the resources for the MCG, see the Red Hat Knowledgebase solution Performance tuning guide for Multicloud Object Gateway (NooBaa).