Skip to content

Commit

Permalink
mds: avoid spurious sleeps
Browse files Browse the repository at this point in the history
Like trim_interval, don't sleep for small amounts of time. This avoids
spurious sleeps like:

    2020-12-25T00:14:22.242+0000 7f6a95884700 20 mds.0.cache upkeep thread waiting interval 0.000000108s
    2020-12-25T00:14:22.242+0000 7f6a95884700 20 mds.0.cache upkeep thread waiting interval 0.000000108s
    2020-12-25T00:14:22.242+0000 7f6a95884700 20 mds.0.cache upkeep thread waiting interval 0.000000108s
    2020-12-25T00:14:22.242+0000 7f6a95884700 20 mds.0.cache upkeep thread waiting interval 0.000000108s
    2020-12-25T00:14:22.242+0000 7f6a95884700 20 mds.0.cache upkeep thread waiting interval 0.000000108s
    2020-12-25T00:14:22.242+0000 7f6a95884700 20 mds.0.cache upkeep thread waiting interval 0.000000108s
    2020-12-25T00:14:22.242+0000 7f6a95884700 20 mds.0.cache upkeep thread waiting interval 0.000000108s

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
  • Loading branch information
batrick committed Jan 5, 2021
1 parent edd6d3d commit 7ae6ad3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mds/MDCache.cc
Expand Up @@ -190,7 +190,7 @@ MDCache::MDCache(MDSRank *m, PurgeQueue &purge_queue_) :
}
since = now-upkeep_last_release;
auto release_interval = clock::duration(g_conf().get_val<std::chrono::seconds>("mds_cache_release_free_interval"));
if (since >= release_interval) {
if (since >= release_interval*.90) {
/* XXX not necessary once MDCache uses PriorityCache */
dout(10) << "releasing free memory" << dendl;
ceph_heap_release_free_memory();
Expand Down

0 comments on commit 7ae6ad3

Please sign in to comment.