UseLargePages and 1g page size?

John Coomes John.Coomes at sun.com
Thu Apr 10 14:21:36 PDT 2008


Clemens Eisserer (linuxhippy at gmail.com) wrote:
> Sorry for asking a bit off-topic.
> 
> Doesn't hotspot use some places where e.g. it needs to set e.g. access
> privilleges on a single page (e.g. for safepoint polling). So is for
> e.g. the safepoint-page 1GB "wasted" in this case?

HotSpot uses the mmap APIs to get large pages only for selected
regions--the java heap, code cache, card table, parallel old bit map
and parallel old region table.  Whether to use large pages is decided
independently for each region, depending on how big it is and what
page sizes are available.  So it doesn't waste large pages for small
regions.

However, if on solaris you used

	ppgsz -o anon=1g java ...

to set the default page size for anonymous regions to 1G, then HotSpot
would waste 1G for the safepoint polling page.  But that would
probably be the least of your problems :-).

-John

> 2008/4/8, John Coomes <John.Coomes at sun.com>:
> > Jon Masamitsu (Jon.Masamitsu at Sun.COM) wrote:
> >  > Does UseLargePages currently work with 1g large
> >  > page size?
> >  >
> >  > -XX:LargePageSizeInBytes=1073741824
> >  >
> >  > This is on solaris amd64
> >
> >
> > It should work, but AFAIK has not been tested.
> >
> >  BTW, does solaris have support for 1G pages now?  I wasn't sure it was
> >  available.  If you have a box, pagesize -a will tell you.
> >
> >
> >  -John
> >
> >




More information about the hotspot-runtime-dev mailing list