byteayan commented on code in PR #3355:
URL: https://github.com/apache/hugegraph/pull/3355#discussion_r4398825009
##########
hugegraph-store/hg-store-dist/src/assembly/static/bin/start-hugegraph-store.sh:
##########
@@ -169,7 +169,18 @@ if [ "$JAVA_OPTIONS" = "" ]; then
>> ${OUTPUT}
exit 1
fi
- JAVA_OPTIONS="-Xms${MIN_MEM}m -Xmx${XMX}m -XX:MetaspaceSize=256M
-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=${LOGS} ${USER_OPTION} "
+ # Cap direct memory at the heap size picked here, the JVM's own unset
default, so the
+ # RocksDB auto-sizing (RocksdbMemoryBudget) counts a limit the JVM
actually enforces.
+ # Leave it out when -j sets the heap or the cap itself: a fixed cap from
the computed
+ # heap would no longer match a -j -Xmx, and the JVM then defaults it to
that heap.
+ DIRECT_MEMORY_OPTION="-XX:MaxDirectMemorySize=${XMX}m"
Review Comment:
Fixed in 1dcabb74e: the launcher now leaves out its default
`-XX:MaxDirectMemorySize` when `JAVA_TOOL_OPTIONS` or `JDK_JAVA_OPTIONS` sets
one, so that cap applies as given. `test-start-hugegraph-store.sh` gains three
cases: a cap in each variable keeps the launcher flag out, and an `-Xmx` in
`JAVA_TOOL_OPTIONS` alone still gets the default cap, because the launcher
`-Xmx` wins there. The two cap cases fail against the previous launcher. The
deployment guide and hugegraph-doc#535 (0cb48506) list both variables.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]