Integrated: JDK-8290870: NMT: Increase MallocSiteTable size and allocate it only when needed
Thomas Stuefe
stuefe at openjdk.org
Mon Jul 25 05:22:06 UTC 2022
On Fri, 22 Jul 2022 12:05:03 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
> MST size is too small. It was created with a very strict footprint limit, since it needed to be created statically and unconditionally.
>
> However, [JDK-8256844](https://bugs.openjdk.org/browse/JDK-8256844) reworked NMT initialization and now we can move MST initialization to after argument parsing. Since it is only needed with -XX:NativeMemoryTracking=detail, it makes sense to only conditionally allocate it.
>
> And therefore we can afford to make it larger.
>
> At the moment, it is 511 entries wide. A typical VM run (release VM, reasonably complex scenario) comes to ~3000-6000 entries. Atm the median bucket chain length is 6-8, which is a lot.
>
> Increasing table size to ~4000 drops median bucket chain length to 1, which is nice.
>
> Example, spring petclinic boot up:
>
> before:
>
> Bucket chain length distribution:
> unused: 1
> longest: 14
> median: 7
>
>
> with table size 4099:
>
> Bucket chain length distribution:
> unused: 1751
> longest: 5
> median: 1
This pull request has now been integrated.
Changeset: 852e71d9
Author: Thomas Stuefe <stuefe at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/852e71d9f06bcf20874ed95a0d7c2b4267d4f59c
Stats: 16 lines in 2 files changed: 6 ins; 7 del; 3 mod
8290870: NMT: Increase MallocSiteTable size and allocate it only when needed
Reviewed-by: zgu, dholmes
-------------
PR: https://git.openjdk.org/jdk/pull/9613
More information about the hotspot-runtime-dev
mailing list