BlueStore's cache is sized conservatively by default, so that it does not overwhelm under-provisioned servers. The default is 1G for HDD, and 3G for SSD. To replace the page cache, as much memory as possible should be given to BlueStore. This is required for good performance. Since ceph-ansible knows how much memory a host has, it can set bluestore cache size = max(total host memory / num OSDs on this host * safety factor, 1G) Due to fragmentation and other memory use not included in bluestore's cache, a safety factor of 0.5 for dedicated nodes and 0.2 for hyperconverged nodes is recommended.
The trickiest part of this is to detect we run on HCI.
Hi Bara, Yes, I agree. Beyond what's there in BZ#1611850, you could mention that this parameter "osd_memory_target" is automatically tuned by ceph-ansible, based on host memory. The default value is 4GiB. This is set differently for HCI and non-HCI setups("is_hci" is the ceph-ansible configuration parameter, that needs to provided to differentiate between setups, default value is false). We also have different safety_factor values for hci and non-hci, which come into play when ceph-ansible calculates the value of osd_memory_target. Thanks, Neha
Hi Bara, Answering your questions in https://bugzilla.redhat.com/show_bug.cgi?id=1611850#c14 here. Yes, the user can configure osd_memory_target using ceph-ansible, by setting it in all.yml, same applies to is_hci. Guillaume, is there any other caveat worth mentioning?
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2019:0020