TECHNOLOGY

BlueStore cache tuning needs an allocator-level memory budget

In this article
THE QUICK TAKE

Confirm the allocator and cache-autotune path, then budget non-cache heap, fragmentation and kernel accounting separately.

A smaller target without a smaller resident set

An OSD host is close to its memory limit. An operator lowers osd_memory_target, but resident memory does not immediately fall as expected. This observation does not establish that the setting was ignored: the controlled quantity, allocator behavior and minimum cache budget must be identified before interpreting the resident set.

The BlueStore reference describes automatic cache sizing as a best-effort attempt to control OSD heap memory. It explicitly distinguishes mapped heap from process RSS and makes the behavior conditional on the allocator and autotuning configuration.

Verify the active sizing path

Record the running daemon’s memory allocator, effective bluestore_cache_autotune value and target. Automatic sizing requires TCMalloc and enabled cache autotuning. When those prerequisites are absent, assumptions derived from the automatic path cannot explain the actual cache allocation.

Manual sizing has a different configuration path, including device-class defaults when the general cache size is unset. Preserve which path is active for each OSD. A central configuration entry is insufficient when daemon-specific settings or a different build change the effective behavior.

Separate cache from the rest of the heap

BlueStore caches include key/value metadata, BlueStore metadata and object data. The automatic allocator uses priorities and falls back to configured ratios when priority information is unavailable. It also respects the minimum cache allocation rather than shrinking caches without a floor.

Other OSD memory and allocator fragmentation remain outside the simple cache-size calculation. The OSD configuration context matters because the process also performs recovery, scrub and client operations. Multiplying a cache value by the daemon count is not a complete host-memory budget.

Observe a bounded transition

Collect mapped heap, RSS, cache allocation and host memory-pressure observations over the same interval. Record the workload phase and whether recovery or metadata activity changed. Allow the configured resize process to act before comparing snapshots; an immediate sample can capture a transition.

Do not repeatedly shorten tuning intervals to force visible movement. The documentation warns that excessively short rebalance or resize intervals can increase CPU or allocator thrashing. A target adjustment should change a controlled budget, not silently introduce a new oscillating workload.

Evidence that the budget is usable

Accept a budget only when the active path is established, the host retains its required headroom and the relevant read/write workload remains acceptable after cache resizing. Preserve cache-miss or metadata-pressure evidence where available, since a smaller resident set can be purchased with substantially more storage work.

Storage placement explains the wider interaction between memory and I/O. Checkpoint recovery domains help frame the additional load that a degraded period can impose on the same OSD host.

What remains outside the target

A best-effort heap target is not an operating-system memory limit or an assurance against termination. Conversely, unchanged RSS alone is not proof that cache sizing failed. The defensible result connects allocator prerequisites, effective cache allocations and host pressure under the observed workload. Any hard containment policy requires its own validation and must leave room for the daemon’s non-cache work.

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles