Skip to content

Commit

Permalink
Merge pull request #4639 from SUSE/wip-7385-firefly
Browse files Browse the repository at this point in the history
librbd: Objectcacher setting max object counts too low

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
  • Loading branch information
jdurgin committed Jul 24, 2015
2 parents 57bbc8e + 9845258 commit b9f45fe
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/librbd/ImageCtx.cc
Expand Up @@ -189,10 +189,9 @@ namespace librbd {
if (object_cacher) {
uint64_t obj = cct->_conf->rbd_cache_max_dirty_object;
if (!obj) {
obj = cct->_conf->rbd_cache_size / (1ull << order);
obj = obj * 4 + 10;
obj = MIN(2000, MAX(10, cct->_conf->rbd_cache_size / 100 / sizeof(ObjectCacher::Object)));
}
ldout(cct, 10) << " cache bytes " << cct->_conf->rbd_cache_size << " order " << (int)order
ldout(cct, 10) << " cache bytes " << cct->_conf->rbd_cache_size
<< " -> about " << obj << " objects" << dendl;
object_cacher->set_max_objects(obj);
}
Expand Down

0 comments on commit b9f45fe

Please sign in to comment.