<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
On 2023-05-08 11:27, Thomas Stüfe wrote:<br>
<blockquote type="cite" cite="mid:CAA-vtUwMwXGSChEiVU_Q808NeNcZ=MXJDoYB+iLJFB_1xEr7VA@mail.gmail.com">
<div dir="ltr">
<div dir="ltr">Hi Stefan,<br>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Mon, May 8, 2023 at
11:08 AM Stefan Karlsson <<a href="mailto:stefan.karlsson@oracle.com" moz-do-not-send="true" class="moz-txt-link-freetext">stefan.karlsson@oracle.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">Hi Thomas,<br>
<br>
On 2023-05-08 10:50, Thomas Stüfe wrote:<br>
> Hi,<br>
><br>
> ZGC, on Linux, seems only compatible with 2M pages.
Seeing that ZGC is <br>
> often used with very large heaps, is support for 1GB
pages planned?<br>
<br>
There's currently no plan to support 1GB explicit larges
pages.<br>
<br>
><br>
> Especially if one disregards uncommitting (-ZUncommit),
1G pages could <br>
> be a speed boost for customers with gigantic heaps, as
well as reduce <br>
> their number of VMAs.<br>
<br>
One hurdle to get 1GB pages to work is that we take the
physical backing <br>
memory of multiple discontiguous 2MB heap regions and
combine them into <br>
a larger contiguous memory region. To implement 1GB large
pages support <br>
we need to figure out how to perform that detaching of
physical memory <br>
from virtual memory if the 2MB regions reside on 1GB large
pages.<br>
</blockquote>
<div><br>
</div>
<div>Thank you for clarifying!</div>
<div><br>
</div>
<div>This is probably a naive question, but would increasing
the zpage size to 1GB be a valid option?<br>
</div>
</div>
</div>
</blockquote>
<br>
I see a few problems, but there are probably more lurking:<br>
<br>
1) This would waste a significant amount of memory. We have a number
of reason why we have a couple of active pages per worker and/or
CPU.<br>
<br>
2) Allocating large heap region and initializing associated data
structures can take some times. A lot of it can be prevented by
using -Xmx == -Xms and -XX:+AlwaysPreTouch.<br>
<br>
3) I think it would break some address compression schemes we have.
For example, take a look at ZForwardingEntry and the "From Object
Index" part. That portion will not fit for small objects in 1GB
pages.<br>
<br>
So, I think it would be possible to do, but you would have to
rewrite parts of the GC.<br>
<br>
StefanK<br>
<br>
<blockquote type="cite" cite="mid:CAA-vtUwMwXGSChEiVU_Q808NeNcZ=MXJDoYB+iLJFB_1xEr7VA@mail.gmail.com">
<div dir="ltr">
<div class="gmail_quote">
<div> </div>
<div>..Thomas<br>
</div>
<div><br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
<br>
StefanK<br>
<br>
><br>
> Thanks, Thomas<br>
><br>
><br>
<br>
</blockquote>
</div>
</div>
</blockquote>
<br>
</body>
</html>