"MaxRAM" JVM参数表示什么? [英] What does 'MaxRAM' JVM parameter signify?

查看:420
本文介绍了"MaxRAM" JVM参数表示什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在查看在Linux服务器上运行的JVM的配置.当我运行

I'm looking at the configuration of a JVM running on a linux server. when I run

java -XX:+PrintFlagsFinal | less | grep -iE 'MaxRam'

似乎基本上可以打印出JDK知道的几乎所有参数

Which seems to basically print out just about every parameter the JDK knows about

我明白了

uint64_t MaxRAM = 137438953472  {pd product}

但是我似乎在这个标志上找不到很多文档.

but I can't seem to find much documentation on this flag.

我发现"{pd product}"表示"Platform Dependent Product: An officially supported, internal JVM option"

任何人都确切知道该参数表示什么,或者在哪里可以更详细地了解平台特定的JVM标志?

Anyone know exactly what this parameter signifies, or where I can read in more detail about platform specific JVM flags?

其他详细信息:

Java版本:

java版本"1.6.0_35" Java(TM)SE运行时环境(内部版本1.6.0_35-b10) Java HotSpot(TM)64位服务器VM(内部版本20.10-b01,混合模式)

java version "1.6.0_35" Java(TM) SE Runtime Environment (build 1.6.0_35-b10) Java HotSpot(TM) 64-Bit Server VM (build 20.10-b01, mixed mode)

uname -a

Linux [SERVERNAME] 2.6.32-431.17.1.el6.x86_64#1 [DATE] x86_64 x86_64 x86_64 GNU/Linux

Linux [SERVERNAME] 2.6.32-431.17.1.el6.x86_64 #1 [DATE] x86_64 x86_64 x86_64 GNU/Linux

推荐答案

根据

According to Standard Edition HotSpot Virtual Machine Garbage Collection Tuning Guide document the value in MaxRAM is used to calculate the Default Heap Size if no initial heapsize and max heap size is specified and contains as posted previously

默认堆大小
除非在命令行上指定了初始堆大小和最大堆大小,否则它们将根据计算机上的内存量进行计算.用于堆的内存比例由命令行选项InitialRAMFraction和MaxRAMFraction
控制 [...]
MaxRAM的值取决于平台.

Default Heap Size
Unless the initial and maximum heap sizes are specified on the command line, they are calculated based on the amount of memory on the machine. The proportion of memory to use for the heap is controlled by the command-line options InitialRAMFraction and MaxRAMFraction
[...]
The value of MaxRAM is platform-dependent.

参考The Java Virtual 根据JVM的实现,机器规范 的大小可以更改.

Referring to the The Java Virtual Machine Specification the size of the heap can change, depending of the implementation of the JVM.

堆的大小可以是固定的,也可以扩展为 计算所需要的,如果变得更大,则可能会收缩 不必要.堆的内存不必是连续的. Java虚拟机实现可以提供程序员或用户控制权 超过堆的初始大小,以及是否可以动态扩展堆,或者 收缩,控制最大和最小堆大小.

The heap may be of a fixed size or may be expanded as required by the computation and may be contracted if a larger heap becomes unnecessary. The memory for the heap does not need to be contiguous. A Java Virtual Machine implementation may provide the programmer or the user control over the initial size of the heap, as well as, if the heap can be dynamically expanded or contracted, control over the maximum and minimum heap size.

并回答您的平台特定的JVM标志问题:
Java HotSpot VM选项

And to answer your platform specific JVM flags question:
Java HotSpot VM Options

这篇关于"MaxRAM" JVM参数表示什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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