了解Java堆 [英] Understanding java heap

查看:56
本文介绍了了解Java堆的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为了确定Java堆大小,我使用了以下命令:

In order to determine java heap size I used the following command:

java -XX:+PrintFlagsFinal -version -h | grep HeapSize 
    uintx ErgoHeapSizeLimit                         = 0               {product}           
    uintx HeapSizePerGCThread                       = 87241520        {product}           
    uintx InitialHeapSize                          := 1586475520      {product}           
    uintx LargePageHeapSizeThreshold                = 134217728       {product}           
    uintx MaxHeapSize                              := 25383927808     {product}           
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)

但是,我无法理解ErgoHeapSizeLimit,HeapSizePerGCThread,InitialHeapSize,LargePageHeapSizeThreshold,MaxHeapSize等的含义.有人可以简要解释一下这些术语.其实我是Java的新手

However, I am unable to understand as to what is meant by ErgoHeapSizeLimit, HeapSizePerGCThread, InitialHeapSize, LargePageHeapSizeThreshold, MaxHeapSize, etc. Can someone please briefly explain these terms. Actually I am a complete novice at java

实际上,我需要确定机器可以分配给进程的堆大小吗?因为我的应用程序之一需要以下参数:-server,-Xmx16G或更高,等等.

Actually I need to determine the heap size which my machine can allocate to a process? Because one of my application demands the following parameters: -server, -Xmx16G or better, etc. to be set.

推荐答案

在这里看看(它们是从OpenJDK中提取的):

Take a look here (they were extracted from OpenJDK):

http://jvm-options.tech.xebia.fr/

ErgoHeapSizeLimit:符合人体工程学的最大堆大小(以字节为单位);零表示使用MaxRAM/MaxRAMFraction

ErgoHeapSizeLimit: Maximum ergonomically set heap size (in bytes); zero means use MaxRAM / MaxRAMFraction

HeapSizePerGCThread:计算GC线程数时使用的每个GC线程的堆大小(字节)

HeapSizePerGCThread: Size of heap (bytes) per GC thread used in calculating the number of GC threads

InitialHeapSize:初始堆大小(以字节为单位);零表示OldSize + NewSize

InitialHeapSize: Initial heap size (in bytes); zero means OldSize + NewSize

LargePageHeapSizeThreshold:如果最大堆至少是这个大的,请使用大页面

LargePageHeapSizeThreshold: Use large pages if max heap is at least this big

MaxHeapSize:最大堆大小(以字节为单位)

MaxHeapSize: Maximum heap size (in bytes)

这篇关于了解Java堆的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆