The JVM cannot use a large page of memory because it does not have enough privileges to lock pages in memory

I wonder how I can put up with the next mistake?

The JVM cannot use large page memory because it lacks the privilege of locking pages in memory

Settings:

set JAVA_OPTS = -Xms20g -Xmx20g -XX: + UseConcMarkSweepGC -XX: + UseParNewGC -XX: + UseLargePages -Duser.timezone = "GMT"% DEBUG%

This happened in Windows Server 2003.

+5
source share
3 answers

Windows Server 2003 . , , : 1. " " → "" → " " 2. " " → " " 3. " ", / 4. .

0

hotspot/src/os/win32/vm/os_win32.cpp openjdk-6, :

// Windows large page support is available on Windows 2003. In order to use
// large page memory, the administrator must first assign additional privilege
// to the user:
//   + select Control Panel -> Administrative Tools -> Local Security Policy
//   + select Local Policies -> User Rights Assignment
//   + double click "Lock pages in memory", add users and/or groups
//   + reboot
// Note the above steps are needed for administrator as well, as administrators
// by default do not have the privilege to lock pages in memory.
//
// Note about Windows 2003: although the API supports committing large page
// memory on a page-by-page basis and VirtualAlloc() returns success under this
// scenario, I found through experiment it only uses large page if the entire
// memory region is reserved and committed in a single VirtualAlloc() call.
// This makes Windows large page support more or less like Solaris ISM, in
// that the entire heap must be committed upfront. This probably will change
// in the future, if so the code below needs to be revisited.

Windows 2003, . , .

+5

, :

Windows Windows 2003.
,
:

  •   
  • → →
      

  •   
  • " ", /
      

  •   

, ,
.

The program that invokes the java interpreter (java program.java) must be invoked using administrative pointers. Example: Eclipse, Netbeans, cmd, etc. On Windows made after 2003, you need to make the settings above, and after you can right-click to open the menu and select “run as administrator” on the icon or the caller’s executable program.

+1
source

All Articles