RFR: 8315923: pretouch_memory by atomic-add-0 fragments huge pages unexpectedly [v7]
Thomas Stuefe
stuefe at openjdk.org
Mon Oct 23 10:57:41 UTC 2023
On Mon, 23 Oct 2023 10:41:03 GMT, Stefan Johansson <sjohanss at openjdk.org> wrote:
> I did check `numa_maps` and `smap` under `/proc/{PID}` when allocating a very large object with and without pretouching. And without pretouching the pages are not marked as dirty in `numa_maps` before the actual allocation and in `smaps` the `Private_Hugetlb:` field was not covering the whole heap when pretouch was not used and increased to the amount of the allocation once it happened.
>
> I also measured the time for doing the large allocation. There were some run to run variations but not big with large pages turned on.
>
> ```
> +UseLargePages +AlwaysPreTouch: 444ms
> +UseLargePages -AlwaysPreTouch: 474ms
> -UseLargePages +AlwaysPreTouch: 450ms (much higher variation)
> -UseLargePages -AlwaysPreTouch: 1.3s (also higher variation)
> ```
>
> So from what I can tell it is really needed @tstuefe.
Oh, okay. Good to know. Thank you for verifying.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/15781#issuecomment-1774935740
More information about the hotspot-runtime-dev
mailing list