直接内存会影响 Java 中的压缩指针吗?
Does Direct Memory affect compressed Pointers in Java?
我知道,一旦 Java 堆大小超过 32GB,我们将失去压缩指针的好处,并且在总堆达到 ~48GB 之前,有效内存可能会减少(与 32GB 相比)。
Direct Memory 的使用是否会影响使用压缩指针的决定?例如,我是否仍然可以通过 -Xmx28G -XX:MaxDirectMemorySize=12G
?
这样的设置来使用它们
I am aware that once Java heap size grows past 32GB, we lose the benefits of compressed pointers and may have less effective memory (compared to 32GB) until the total heap reaches ~48GB.
您可以将对象对齐方式增加到 16(在 Java 中),从而允许您使用高达 64 GB 的 CompressedOops。
Does Direct Memory usage affect the determination to use compressed pointers or not?
直接内存只是本机内存,如线程堆栈、GUI 组件、共享库等。它们不是堆的一部分,元数据也不是 space。
For example, will I still be able to use them with settings like -Xmx28G -XX:MaxDirectMemorySize=12G
如果你愿意,你可以有-XX:MaxDirectMemorySize=1024G
,这不是堆的一部分。
我知道,一旦 Java 堆大小超过 32GB,我们将失去压缩指针的好处,并且在总堆达到 ~48GB 之前,有效内存可能会减少(与 32GB 相比)。
Direct Memory 的使用是否会影响使用压缩指针的决定?例如,我是否仍然可以通过 -Xmx28G -XX:MaxDirectMemorySize=12G
?
I am aware that once Java heap size grows past 32GB, we lose the benefits of compressed pointers and may have less effective memory (compared to 32GB) until the total heap reaches ~48GB.
您可以将对象对齐方式增加到 16(在 Java 中),从而允许您使用高达 64 GB 的 CompressedOops。
Does Direct Memory usage affect the determination to use compressed pointers or not?
直接内存只是本机内存,如线程堆栈、GUI 组件、共享库等。它们不是堆的一部分,元数据也不是 space。
For example, will I still be able to use them with settings like -Xmx28G -XX:MaxDirectMemorySize=12G
如果你愿意,你可以有-XX:MaxDirectMemorySize=1024G
,这不是堆的一部分。