cf1ab852d1
Motivation: The "used memory" is the amount of memory that a pooled allocator has currently allocated and committed for itself. Ths is useful for managing resource usage of the pool versus the available system resources. However, it is not useful for managing resources of the currently circulating buffer instances versus the pool. The pinned memory is the memory currently in use by buffers in circulation, plus memory held in the thread-local caches. Modification: Add pinned memory accounting to PoolChunk. We cannot just use the existing freeBytes because that field is only updated when pool subpages are retired, and a chunk will never retire its last subpage instance. The accounting statistics are available on the PooledByteBufAllocator only, since the metrics interfaces cannot be changed due to backwards compatibility. Result: It is now possible to get a fairly accurate (with slight over-counting due to the thread-local caches) picture of how much memory is held up in buffer instances at any given moment. Fixes #11637 |
||
---|---|---|
.. | ||
src | ||
pom.xml |