]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mgr/mgr_util: switch using unshared cephfs connections whenever possible 42083/head
authorVenky Shankar <vshankar@redhat.com>
Thu, 17 Jun 2021 12:39:56 +0000 (08:39 -0400)
committerKotresh HR <khiremat@redhat.com>
Tue, 29 Jun 2021 05:14:45 +0000 (10:44 +0530)
commita8a549d335246cd16d18b1094f9cf192726a54b0
treec5005614063175bc47dcf62f5343ca6a4c011634
parent2e1902f3a43860da461e68ebea5ef8dd48418278
mgr/mgr_util: switch using unshared cephfs connections whenever possible

The connection pool used by mgr/volumes (mgr/snap_schedule, mgr/mirroring)
is basically a cached libcephfs connection handle. Since its a singleton
lock contention may occur in the client (contention on `client_lock`),
especially when an MDS operation taken too long to complete.

Having a pool of connections to a cephfs file system, ensures that concurrent
access to ceph file system via the connection pool use unshared libcephfs
handles whenever possible thereby not contending for `client_lock`. However,
there is a max cap of unshared connections per cephfs file system, post which
connections start to get shared between users.

Note that to totally benefit from this, its desirable to have multiple active
MDSs for a ceph file system to rule out the possibility of the contention in
`mds_lock`.

Fixes: http://tracker.ceph.com/issues/51256
Signed-off-by: Venky Shankar <vshankar@redhat.com>
(cherry picked from commit 2e7adc48d141dacf7fc90d4c4f8d61c287e77984)
src/pybind/mgr/mgr_util.py
src/pybind/mgr/volumes/fs/volume.py