JVMはメモリ内のページをロックするための十分な特権がないため、大きなページメモリを使用できません

StackOverflow https://stackoverflow.com/questions/1615717

  •  06-07-2019
  •  | 
  •  

質問

次のエラーをどのように調整できますか?

  

JVMは十分な容量がないため、ラージページメモリを使用できません   メモリ内のページをロックする特権

設定は次のとおりです。

  

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

これはWindows Server 2003で発生しました。

役に立ちましたか?

解決 3

大規模ページメモリをサポートしているのはWindows Server 2003のみです。それを使用するには、管理者は最初にアプリケーションを実行するユーザーに追加の特権を割り当てる必要があります。 1.コントロールパネルを選択->管理ツール->ローカルセキュリティポリシー 2. [ローカルポリシー]を選択します->ユーザー権利の割り当て 3. [メモリ内のページをロック]をダブルクリックし、ユーザーやグループを追加します 4.マシンを再起動します

他のヒント

エラーをグーグルで検索すると、 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を使用している場合、これが役立つ場合があります。そうでない場合、他に提案はありません。

以下の設定のみでは不十分であることに直面しました:

  

Windows 2003では、Windowsラージページのサポートを利用できます。使用するには
  大きなページメモリの場合、管理者は最初に追加の特権を割り当てる必要があります
  ユーザーへ:

     
    
        
  • コントロールパネルを選択->管理ツール->ローカルセキュリティポリシー
  •     
  • ローカルポリシーを選択->ユーザー権利の割り当て
  •     
  • 「メモリ内のページをロック」をダブルクリックし、ユーザーやグループを追加します
  •     
  • 再起動
  •     
  
     

管理者と同様に、管理者にも上記の手順が必要であることに注意してください
  デフォルトでは、メモリ内のページをロックする権限がありません。

javaインタープリターを呼び出すプログラム(java program.java )は、管理ルールを使用して呼び出す必要があります。例:Eclipse、Netbeans、cmdなど。2003年以降に作成されたWindowsでは、上記の設定が必要です。右ボタンをクリックしてメニューを開き、"アドミニストレータとして実行" を選択できますアイコンまたは実行可能な呼び出し元プログラム。

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top