Skip to content

Commit

Permalink
jvm: drop UseCompressedOops JVM option
Browse files Browse the repository at this point in the history
Motivation:
Starting java7, the UseCompressedOops is dynamically controed by heap
size.

```
$ java -Xmx32g -XX:+PrintFlagsFinal 2>/dev/null | grep UseCompressedOops
     bool UseCompressedOops                        = false                          {product lp64_product} {default}

$ java -Xmx28g -XX:+PrintFlagsFinal 2>/dev/null | grep UseCompressedOops
     bool UseCompressedOops                        = true                           {product lp64_product} {ergonomic}
```

The mismatch between UseCompressedOops endup with error:

```
OpenJDK 64-Bit Server VM warning: Max heap size too large for Compressed Oops
***** WARNING! INCORRECT SYSTEM CONFIGURATION DETECTED! *****
The system limit on number of memory mappings per process might be too low for the given
[gc] max Java heap size (40960M). Please adjust /proc/sys/vm/max_map_count to allow for at
[gc] least 73728 mappings (current limit is 65530). Continuing execution with the current
```

Modification:
drop UseCompressedOops JVM option from defaults.

Result:
correct behavior on JVMs with large heap

Acked-by: Lea Morschel
Target: master
Require-book: no
Require-notes: yes
(cherry picked from commit 59ea69f)
Signed-off-by: Tigran Mkrtchyan <[email protected]>
  • Loading branch information
kofemann committed Nov 28, 2024
1 parent 6d31a13 commit ef44d9e
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion skel/share/defaults/dcache.properties
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ dcache.log.qos.max-history=30
-XX:HeapDumpPath=${dcache.java.oom.file} \
-XX:+ExitOnOutOfMemoryError \
-XX:+StartAttachListener \
-XX:+UseCompressedOops \
-javaagent:${dcache.paths.classes}/aspectjweaver-1.9.9.1.jar \
-Djava.net.preferIPv6Addresses=system \
--add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.sql/java.sql=ALL-UNNAMED --add-opens=java.base/java.math=ALL-UNNAMED --add-opens java.base/sun.nio.fs=ALL-UNNAMED \
Expand Down

0 comments on commit ef44d9e

Please sign in to comment.