That's more or less what the priority cache manager does automatically
now whenever the aggregate cache size is periodically re-tuned to keep
the process mapped memory under the memory target:
The problem is that it still doesn't guarantee that the kernel will (or
even can) reclaim what we've freed. We just do everything possible to
make sure nothing is blocking it (regular heap releases, avoid THP, etc).
On 5/12/20 4:56 PM, Anthony D'Atri wrote:
FWIW on Luminous / Ubunto Trusty (at least) I would
sometimes find a handful to tens of GB “released” by tcmalloc but not reclaimed. In such
circumstances a “heap release” usually did wonders to free up physmem / VM. YMMV.
>> - AND... there is no guarantee that the kernel will actually reclaim memory that
> Correct, we can't explicitly force the kernel to reclaim memory.