Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set mon_target_pg_per_osd to 200 in new clusters for better performance #3080

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

malayparida2000
Copy link
Contributor

@malayparida2000 malayparida2000 commented Mar 17, 2025

The mon_target_pg_per_osd parameter determines the recommended total PG count and PG-per-OSD ratio. The default value is 100, but for new clusters, setting it to 200 improves performance by increasing parallelism through a higher PG count. Since modifying this value on existing clusters can trigger data movement and rebalancing, the change is applied only during new cluster creation.
https://issues.redhat.com/browse/RHSTOR-7133

The mon_target_pg_per_osd parameter determines the recommended total PG
count and PG-per-OSD ratio. The default value is 100, but for new
clusters, setting it to 200 improves performance by increasing
parallelism through a higher PG count. Since modifying this value on
existing clusters can trigger data movement and rebalancing, the change
is applied only during new cluster creation.

Signed-off-by: Malay Kumar Parida <[email protected]>
Copy link
Contributor

openshift-ci bot commented Mar 17, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: malayparida2000
Once this PR has been reviewed and has the lgtm label, please assign iamniting for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@malayparida2000
Copy link
Contributor Author

/cc @BlaineEXE

@openshift-ci openshift-ci bot requested a review from BlaineEXE March 17, 2025 12:27
@malayparida2000
Copy link
Contributor Author

/retest

@malayparida2000
Copy link
Contributor Author

/test ocs-operator-bundle-e2e-aws

@malayparida2000
Copy link
Contributor Author

@BlaineEXE @travisn Can you please review the PR.
For context this was opened as per suggestions from @mmgaggle on the PR #2980

@@ -66,6 +67,30 @@ func (obj *ocsCephConfig) ensureCreated(r *StorageClusterReconciler, sc *ocsv1.S
Data: rookConfigOverrideData,
}
_, err := ctrl.CreateOrUpdate(context.Background(), r.Client, rookConfigOverrideCM, func() error {
// mon_target_pg_per_osd=200 added only during new CM creation, as setting it on existing clusters can cause data movement.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To keep this simple, what if the new setting is only added to the defaultRookConfig? It's not critical for upgraded clusters, right?

Alternatively, instead of using the configmap at all, this setting could be the first one that we add to the CephCluster spec under the CephConfig setting. I'd suggest this for the preferred approach for all the ceph settings that don't need to be overridable by the user, and also are not settings that affect the mons at first cluster creation. This setting is just for the PG auto scaler, so it's fine to set later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants