<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Aptos;
panose-1:2 11 0 4 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:12.0pt;
font-family:"Aptos",sans-serif;
mso-ligatures:standardcontextual;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Aptos",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="#467886" vlink="#96607D" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt">Between JDK-24 (24.0.2+12-54, dba 24.0.2) and JDK-25 (25.0.1+8-27, dba 25.0.1), running an application on a machine with 64KiB system page size and 512MiB transparent huge pages, I see this difference:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">$ "${OPENJDK_DIR}"/jdk-24.0.2/bin/java -showversion
<span style="background:yellow;mso-highlight:yellow">-XX:+UseTransparentHugePages</span> -Xmx12g -Xms12g -Xlog:pagesize=info HelloWorld<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">[0.001s][info][pagesize] Explicit hugepage support:<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">[0.001s][info][pagesize] hugepage size: 2M<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">[0.001s][info][pagesize] hugepage size: 512M<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">[0.001s][info][pagesize] hugepage size: 16G<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">[0.001s][info][pagesize] default hugepage size: 512M<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">[0.001s][info][pagesize] Transparent hugepage (THP) support:<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">[0.001s][info][pagesize] THP mode: always<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">[0.001s][info][pagesize] THP pagesize: 512M<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">[0.001s][info][pagesize] Shared memory transparent hugepage (THP) support:<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">[0.001s][info][pagesize] Shared memory THP mode: never<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">[0.001s][info][pagesize] JVM will attempt to prevent THPs in thread stacks.<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">[0.001s][info][pagesize] UseLargePages=1, UseTransparentHugePages=1<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">[0.001s][info][pagesize] Large page support enabled. Usable page sizes: 64k, 512M. Default large page size: 512M.<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">[0.002s][info][pagesize] CodeHeap 'profiled nmethods': min=2496K max=118272K base=0x00004000108d0000 size=118272K page_size=64K<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">[0.002s][info][pagesize] CodeHeap 'non-nmethods': min=2496K max=9152K base=0x0000400017c50000 size=9152K page_size=64K<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">[0.002s][info][pagesize] CodeHeap 'non-profiled nmethods': min=2496K max=118336K base=0x0000400018540000 size=118336K page_size=64K<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">[0.003s][info][pagesize] Heap: min=12G max=12G base=0x0000000500000000 size=12G
<span style="background:yellow;mso-highlight:yellow">page_size=512M</span><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">[0.003s][info][pagesize] Block Offset Table: req_size=24M req_page_size=64K base=0x0000400024440000 size=24M page_size=64K<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">[0.003s][info][pagesize] Card Table: req_size=24M req_page_size=64K base=0x0000400025c40000 size=24M page_size=64K<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">[0.003s][info][pagesize] Mark Bitmap: req_size=192M req_page_size=64K base=0x0000400027440000 size=192M page_size=64K<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">openjdk version "24.0.2" 2025-07-15<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">OpenJDK Runtime Environment (build 24.0.2+12-54)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">OpenJDK 64-Bit Server VM (build 24.0.2+12-54, mixed mode, sharing)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">Hello world!<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">versus<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">$ "${OPENJDK_DIR}"/jdk-25.0.1/bin/java -showversion
<span style="background:yellow;mso-highlight:yellow">-XX:+UseTransparentHugePages</span> -Xmx12g -Xms12g -Xlog:pagesize=info HelloWorld<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">[0.001s][info][pagesize] Explicit hugepage support:<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">[0.001s][info][pagesize] hugepage size: 2M<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">[0.001s][info][pagesize] hugepage size: 512M<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">[0.001s][info][pagesize] hugepage size: 16G<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">[0.001s][info][pagesize] default hugepage size: 512M<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">[0.001s][info][pagesize] Transparent hugepage (THP) support:<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">[0.001s][info][pagesize] THP mode: always<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">[0.001s][info][pagesize] THP pagesize: 512M<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">[0.001s][info][pagesize] Shared memory transparent hugepage (THP) support:<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">[0.001s][info][pagesize] Shared memory THP mode: never<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">[0.001s][info][pagesize] JVM will attempt to prevent THPs in thread stacks.<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">[0.001s][info][pagesize] UseLargePages=1, UseTransparentHugePages=1<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">[0.001s][info][pagesize] Large page support enabled. Usable page sizes: 64k, 512M. Default large page size: 512M.<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">[0.002s][info][pagesize] CodeHeap 'profiled nmethods': min=2496K max=118272K base=0x00004000108d0000 size=118272K page_size=64K<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">[0.002s][info][pagesize] CodeHeap 'non-nmethods': min=2496K max=9152K base=0x0000400017c50000 size=9152K page_size=64K<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">[0.002s][info][pagesize] CodeHeap 'non-profiled nmethods': min=2496K max=118336K base=0x0000400018540000 size=118336K page_size=64K<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">[0.003s][info][pagesize] Heap: min=12G max=12G base=0x0000000500000000 size=12G
<span style="background:yellow;mso-highlight:yellow">page_size=64K</span><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">[0.003s][info][pagesize] Block Offset Table: req_size=24M req_page_size=64K base=0x0000400024550000 size=24M page_size=64K<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">[0.003s][info][pagesize] Card Table: req_size=24M req_page_size=64K base=0x0000400025d50000 size=24M page_size=64K<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">[0.003s][info][pagesize] Mark Bitmap: req_size=192M req_page_size=64K base=0x0000400027550000 size=192M page_size=64K<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">openjdk version "25.0.1" 2025-10-21<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">OpenJDK Runtime Environment (build 25.0.1+8-27)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">OpenJDK 64-Bit Server VM (build 25.0.1+8-27, mixed mode, sharing)<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:10.0pt;font-family:"Courier New"">Hello world!<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Why am I not getting 512MiB pages for my heap in JDK-25, when I was getting 512MiB pages for my heap in JDK-24? Maybe more to the point: How do I get transparent huge pages for my heap in JDK-25?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"> ... peter<o:p></o:p></span></p>
</div>
</body>
</html>