JEP 195: Scalable Native Memory Tracking
This project is focused on solving the bottlenecks in the current native memory tracking implementation, especially the memory and CPU overheads on tracking malloc activities.
The new approach eliminates malloc tracking records by co-locating tracking data along with malloc'd memory, which not only reduces the memory for the tracking data but also avoids the processing of raw tracking data. A lock-free hash table is used to track malloc allocation sites; this data structure further reduces the memory overhead for malloc detail tracking and query time. It also avoids blocking calls on regular JVM execution paths while tracking malloc activities, which should also reduce the impact to JVM performance.
The new implementation co-locates the malloc tracking header with user data, it ensures that user data aligns with malloc alignment in a production build (8 bytes on 32-bit systems and 16 bytes on 64-bit systems), and 8-byte alignment on debug build.
Read full article from JEP 195: Scalable Native Memory Tracking
No comments:
Post a Comment