FFM API allocation shootout
mail at smogura.eu
mail at smogura.eu
Tue Aug 1 16:19:32 UTC 2023
Hi all,
Speaking for my self:
* I think tracking of used memory should not take precedence over performance.
* We can assume, that profiler tools teams will extend their analyse capabilities with analysing native memory from heap dumps (at some point of time).
When tracking memory
* Should all memory allocations even with custom allocators be tracked - this can be a little bit error prone.
* Should only statistics for standard (default) allocator be exposed?
* Should some cap on allocations, with automatic GC be put in place?
I think that if we are going to track allocations, great would be to have separate switch, which turns on / off bytes counting.
In context of triggering GC due to native memory pressure - I want to propose a bit different way checking process memory when malloc returns null. I guess this is possible, by checking number of anonymous pages allocated minus heap size. This could as well be used with switch, but would reduce a need to track memory and make JDK more integrating within system, depending on system memory settings.
Best regards,
Radoslaw Smogura
> On 1 Aug 2023, at 17:53, Brian S O'Neill <bronee at gmail.com> wrote:
>
> On 2023-07-31 04:27 PM, Maurizio Cimadamore wrote:
>> So, another question is:
>> * Do we expect a separate kind of JMX object to keep track of memory segments?
>> * Or do we expect the same JMX object to report stats about all kinds of off-heap memory usage, whether BB or MS ?
>> I think having _some_ segments show up in one counter, and some other segments showing up in a different counter would be odd from a management perspective.
>
> If I expect that a single JMX counter should give me a complete picture, it won't anyhow. Allocations within native libraries won't report their stats using the common counter, and custom Arenas won't be able to either unless they can directly manipulate it.
>
> I'd prefer many separate counters, which break down the different types of allocations. They have different life cycles, and so they have different GC effects. It would also be nice if custom counters can be defined.
More information about the panama-dev
mailing list