Java Reference
In-Depth Information
issuing the second command). Be aware this affects the JVM and any other programs run on
the system; they will all run with huge pages.
If transparent large pages are enabled, do not specify the UseLargePages flag. If that flag is
explicitly set, the JVM will return to using traditional huge pages if they are configured, or
standard pages if traditional huge pages are not configured. If the flag is left to its default
value, then the transparent huge pages will be used (if they have been configured).
Windows large pages
Windows large pages can only be enabled on server-based Windows versions. Exact instruc-
tions for Windows 7 are given here; there will be some variations between releases.
1. Start the Microsoft Management Center. Press the Start button and in the Search box,
type mmc .
2. If the lefthand panel does not display a Local Computer Policy icon, select “Add/Re-
move Snap-in” from the File menu and add the Group Policy Object Editor. If that op-
tion is not available, then the version of Windows in use does not support large pages.
3. In the lefthand panel, expand Local Computer Policy → Computer Configuration →
Windows Settings → Security Settings → Local Policies and click on the User Rights
Assignment folder.
4. In the righthand panel, double-click on “Lock pages in memory.”
5. In the pop up, add the user or group.
6. Click OK.
7. Quit the MMC.
8. Reboot.
At this point, the JVM should be able to allocate the necessary large pages. To verify that it
works, run the following command:
# java -Xms4G -Xmx4G -XX:+UseLargePages -version
java version "1.7.0_17"
Java(TM) SE Runtime Environment (build 1.7.0_17-b02)
Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)
Search WWH ::

Custom Search