On 10/31/2018 05:44 PM, Sage Weil wrote: > For the mon, we have at least two caches we can adjust: the rocksdb cache, > and mon_osd_cache_size. Should we do the same thing there? > > My only concern with a mon_target_memory option is that we have to set a > default, and the reality is that we want the mon to use more memory for > large clusters. Perhaps we could issue a health alert if it looks like > the mon is targetting too little memory for the cluster size, and then set > the default for something that works well for medium-ish average clusters? I generally like the idea, and this is the simplest approach. I do worry about throwing more warnings at users, especially if we are not able to adjust those settings on-the-fly. The SimpleLRU backing the osdmap cache shouldn't be much of a problem, with an observer for the config option, but I don't think we can do that for the rocksdb underlying cache? If it turns out that we can indeed adjust the rocksdb cache, then my point is moot, and we can even aim for the stretch goal of having two settings: the default and the max; start with default, and allow the mon to suppress warnings until max is almost reached while increasing the cache sizes. That should allow us to somewhat keep small/medium clusters under control, while not having those larger clusters being bombarded with memory warnings until the maximum is near. -Joao