Re: librados API never kills threads

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09/13/2016 01:13 PM, Stuart Byma wrote:
Hi,

Can anyone tell me why librados creates multiple threads per object, and never kills them, even when the ioctx is deleted? I am using the C++ API with a single connection and a single IO context. More threads and memory are used for each new object accessed. Is there a way to prevent this behaviour, like prevent the implementation from caching per-object connections? Or is there a way to “close” objects after reading/writing them that will kill these threads and release associated memory? Destroying and recreating the cluster connection is too expensive to do all the time.

The threads you're seeing are most likely associated with the cluster
connection - with SimpleMessenger, the default, a connection to an OSD
uses 2 threads. If you access objects that happen to live on different
OSDs, you'll notice more threads being created for each new OSD. These
are encapulated in the Rados object, which you likely don't want to
recreate all the time.

An IoCtx is really just a small set of in-memory state, e.g. pool id, snapshot, namespace, etc. and doesn't consume many resources itself.

Josh
_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com




[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Ceph Dev]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux