]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rgw: fix bad memory usage of bucket chown method 44357/head
authorMohammad Fatemipour <mohammad.fatemipour@sotoon.ir>
Sun, 19 Dec 2021 18:33:55 +0000 (22:03 +0330)
committerMohammad Fatemipour <mohammad.fatemipour@sotoon.ir>
Sun, 19 Dec 2021 18:33:55 +0000 (22:03 +0330)
commitcf2d83ef81458524715c23e802977dc0760c847f
treef5a04e445e786073560b8e27b8e03164540b65b2
parent242e8f35e8a19bad0b1125bd500221b1273e0612
rgw: fix bad memory usage of bucket chown method

In RGWBucketCtl::chown we have one RGWObjectCtx for all objects of a bucket.
In RGWObjectCtx there is a cache mechanism (std::map) for states of objects that will grows
continuously. for buckets with millions of objects this mechanism leads to huge memory usage.

in chown process we really do not need this caching mechanism so we could create one RGWObjectCtx
for every 1000 objects to limit usage of memory.

Fixes: https://tracker.ceph.com/issues/53599
Signed-off-by: Mohammad Fatemipour <mohammad.fatemipour@sotoon.ir>
src/rgw/rgw_bucket.cc