]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
librbd: updated cache max objects calculation 4639/head
authorJason Dillaman <dillaman@redhat.com>
Wed, 22 Apr 2015 15:27:35 +0000 (11:27 -0400)
committerNathan Cutler <ncutler@suse.cz>
Sun, 10 May 2015 15:53:30 +0000 (17:53 +0200)
commit9845258f184c823d1e48da1dcb97bdde97220bb6
tree1cea5d8919ac4186cae8a760ad33c68e4ed62f33
parentfcd0ea3383582e7a1dc8091e7a48e1d4bbaa76ee
librbd: updated cache max objects calculation

The previous calculation was based upon the image's object size.
Since the cache stores smaller bufferheads, the object size is not
a good indicator of cache usage and was resulting in objects being
evicted from the cache too often.  Instead, base the max number of
objects on the memory load required to store the extra metadata
for the objects.

Fixes: #7385
Backport: firefly, hammer
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 0b378942c4f1b79cb65967f2d3466728ca1c8d5b)

Conflicts:
src/librbd/ImageCtx.cc
        because firefly has cct->_conf->rbd_cache_size
        instead of cache_size
src/librbd/ImageCtx.cc