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

common: add support for read affinity options per cluster-id from configmap #4161

Closed
Tracked by #3649
Rakshith-R opened this issue Oct 4, 2023 · 11 comments · Fixed by #4165
Closed
Tracked by #3649

common: add support for read affinity options per cluster-id from configmap #4161

Rakshith-R opened this issue Oct 4, 2023 · 11 comments · Fixed by #4165
Assignees
Labels
component/cephfs Issues related to CephFS component/rbd Issues related to RBD wontfix This will not be worked on

Comments

@Rakshith-R
Copy link
Contributor

Describe the feature you'd like to have

Currently, read affinity options need to be passed through cmdline args and apply to volumes of all the clusters.

Since cephcsi handles multiple cluster which have may different set of crush location key-value pairs, we need to move
these options to be consumed per cluster-id basis from configmap.

What is the value to the end user? (why is it a priority?)

Users can configure different crush location for different cluster.
Ex: crush location labels for internal ceph cluster maybe different from a external ceph cluster.

How will we know we have a good solution? (acceptance criteria)

Concerned options are successfully picked up from configmap per cluster-id.

@Rakshith-R Rakshith-R added component/cephfs Issues related to CephFS component/rbd Issues related to RBD labels Oct 4, 2023
@Rakshith-R Rakshith-R added this to the release-v3.10.0 milestone Oct 4, 2023
@Madhu-1
Copy link
Collaborator

Madhu-1 commented Oct 4, 2023

@Rakshith-R This is a duplicate/part of #3649?

@Rakshith-R
Copy link
Contributor Author

@Rakshith-R This is a duplicate/part of #3649?

Yea, I think we can call it a subset of that epic.
I think its fine to open issues for sub tasks so they can tracker better and completed independently.
Added related issues in the description.

@Madhu-1
Copy link
Collaborator

Madhu-1 commented Oct 4, 2023

Sounds good 👍🏻 lets keep adding the trackers to the main one and close it when all is done

@iPraveenParihar
Copy link
Contributor

from meet -

  • support for read affinity options per cluster-id from ConfigMap
  • users can still pass read affinity options from command line
  • If not specified in ConfigMap, should read from command line
  • If specified in ConfigMap and command line, options from ConfigMap should be taken as priority.

@Rakshith-R @Madhu-1

@Madhu-1
Copy link
Collaborator

Madhu-1 commented Oct 5, 2023

from meet -

  • support for read affinity options per cluster-id from ConfigMap
  • users can still pass read affinity options from command line
  • If not specified in ConfigMap, should read from command line
  • If specified in ConfigMap and command line, options from ConfigMap should be taken as priority.

@Rakshith-R @Madhu-1

LGTM

@travisn
Copy link
Member

travisn commented Oct 5, 2023

What will the format of the configmap be with these settings?

@iPraveenParihar
Copy link
Contributor

What will the format of the configmap be with these settings?

I was thinking something like this -

config.json: |-
    [
      {
        "clusterID": "<cluster-id-1>",
         ...
        "readAffinity": {
          "enabled": true,
          "crushLocationLabels": [
            "topology.kubernetes.io/region",
            "topology.kubernetes.io/zone"
          ]
        }
      },
      {
        "clusterID": "<cluster-id-2>",
         ...
        "readAffinity": {
          "enabled": true,
          "crushLocationLabels": [
            "topology.kubernetes.io/region",
            "topology.kubernetes.io/zone"
          ]
        }
      }
    ]

@travisn
Copy link
Member

travisn commented Oct 6, 2023

Looks good. A few thoughts for Rook clusters...

  • Since Rook generates the configmap, it could always add all the topology labels that Rook supports.
  • Rook could enable the read affinity by default (any reason not to?)
  • A setting could be in the cephcluster CR to disable the read affinity

@Rakshith-R
Copy link
Contributor Author

Looks good. A few thoughts for Rook clusters...

  • Since Rook generates the configmap, it could always add all the topology labels that Rook supports.

👍
The current flow is the almost the same too https://github.com/rook/rook/blob/master/pkg/operator/ceph/csi/csi.go#L96 .

  • Rook could enable the read affinity by default (any reason not to?)

There is a side affect of increased OSD memory consumption.
Before, request for same data block from clients in different zones would go to the same OSD.
With read affinity, OSDs in each zone would be required to serve the same data block separately leading
to increased OSD memory usage.
IMO, it would not be worth the trade off if the nodes are close by and inter zone network communication is not
that expensive.

  • A setting could be in the cephcluster CR to disable the read affinity

I would prefer to keep the feature disabled by default for the above reason.

@travisn
Copy link
Member

travisn commented Oct 9, 2023

Sounds good to keep the feature disabled by default. If we can be clear about the amount of increased memory usage expected, it will help users to know when it is worth enabling it, or what additional resources are needed for the OSDs.

Copy link

github-actions bot commented Nov 8, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the wontfix This will not be worked on label Nov 8, 2023
@mergify mergify bot closed this as completed in #4165 Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/cephfs Issues related to CephFS component/rbd Issues related to RBD wontfix This will not be worked on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants