Skip to content

Commit

Permalink
Merge 4497: Objectcacher setting max object counts too low
Browse files Browse the repository at this point in the history
Reviewed-by: Loic Dachary <ldachary@redhat.com>
  • Loading branch information
ldachary committed Apr 30, 2015
2 parents 0801358 + 2864da8 commit a4c50f8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/librbd/ImageCtx.cc
Expand Up @@ -218,10 +218,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 a4c50f8

Please sign in to comment.