java - 'MaxRAM' JVM 参数表示什么?

标签 java linux jvm

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

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

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

我明白了

uint64_t MaxRAM = 137438953472  {pd product}

但我似乎找不到关于此标志的太多文档。

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

任何人都知道这个参数的确切含义,或者我可以在哪里阅读有关平台特定 JVM 标志的更多详细信息?

其他详细信息:

Java 版本: .

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

最佳答案

根据 Standard Edition HotSpot Virtual Machine Garbage Collection Tuning Guide文档 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.

指的是 Java Virtual 机器规范堆的大小可以改变,这取决于 JVM 的实现。

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 Options

关于java - 'MaxRAM' JVM 参数表示什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27816210/

相关文章:

python - 获取当前 screen session 的名称

java - 如何将列表传递到 Swing 中的初始框架

java - 在Java中设置边框(jbutton)的长度

node.js - 我使用 npm -g 安装的包没有显示在 bash 脚本中,为什么?

linux - 2020 年 Intel x86-64 CPU 用户空间的 TSC(时间戳计数器)有多稳定?

eclipse - 无法在 Eclipse 中运行 Kotlin 应用程序

java - 检查 Java "assembly"?

java - 接口(interface)和类对象内存分配的区别

Java,正则表达式可以带变量吗?

java - 每次调用方法时创建一个新的 Set