]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
librbd: updated cache max objects calculation 4434/head
authorJason Dillaman <dillaman@redhat.com>
Wed, 22 Apr 2015 15:27:35 +0000 (11:27 -0400)
committerJason Dillaman <dillaman@redhat.com>
Wed, 22 Apr 2015 15:27:35 +0000 (11:27 -0400)
commit0b378942c4f1b79cb65967f2d3466728ca1c8d5b
tree183f555ba208a94de39ffc362f8c3a787a486d22
parent9dbe55ee437889a1ae0770c9c4b8a70658637d3a
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>
src/librbd/ImageCtx.cc