bitflicker64 commented on code in PR #535:
URL: https://github.com/apache/hugegraph-doc/pull/535#discussion_r4302526032
##########
content/en/docs/quickstart/hugegraph/hugegraph-hstore.md:
##########
@@ -205,8 +206,8 @@ This file contains only `rocksdb` and Actuator exposure
settings.
| Key | Master distribution value | Code default | Meaning |
|-----|---------|--------------|---------|
-| `rocksdb.total_memory_size` | `32000000000` | `51539607552` | Memory budget
shared by all RocksDB instances on this node. When absent or `0`, the node uses
the JVM max heap instead. |
-| `rocksdb.write_buffer_size` | `32000000` | `33554432` | Memtable size in
bytes. When absent or `0`, the node uses `total_memory_size / 1000`. |
+| `rocksdb.total_memory_size` | `0` | Auto-sized, see Meaning | Memory budget
in bytes shared by all RocksDB instances on this node, split into the write
cache and the block cache by `write_buffer_ratio`. Both caches are off-heap, so
`-Xmx` does not limit them, and a fixed 1 GiB Raft log cache comes on top. When
absent or `0`, the node uses half of the memory left after the JVM max heap,
`MaxDirectMemorySize` (counted as the heap size when unset;
`bin/start-hugegraph-store.sh` sets it to the heap it picks unless `-j` sets
`-Xmx` or the cap itself) and a 1.5 GiB reserve, clamped to 256 MiB to 32 GB.
In a container the starting point is the cgroup memory limit when one is set,
including a limit set only on a parent cgroup the Store can see; otherwise it
is the host's memory. An `application-pd.yml` kept from an earlier release
still sets `32000000000`; set it to `0` to auto-size. A positive value is used
as given and must be plain bytes, at least `1048576` (1 MiB); a smaller value
or
one such as `4GB` stops startup. |
Review Comment:
Minor: "`bin/start-hugegraph-store.sh` sets it to the heap it picks unless
`-j` sets `-Xmx` or the cap itself" no longer matches apache/hugegraph#3355.
Commit 643db967 ("detect a -j heap the way the JVM receives it"), pushed after
this head, also drops the cap when `-j` sets `-XX:MaxHeapSize=`. At the #3355
head (9e6dc506) the launcher does `for opt in ${USER_OPTION}; do case "$opt" in
-Xmx* | -XX:MaxHeapSize=* | -XX:MaxDirectMemorySize=*) DIRECT_MEMORY_OPTION=""
;; esac; done`. Someone who passes `-j "-XX:MaxHeapSize=8g"` would read this
row as "direct memory is capped at the launcher's 2 GiB heap". In fact the cap
is left out, the JVM defaults it to the 8 GiB heap, and
`RocksdbMemoryBudget.directMemory()` counts 8 GiB. Their expected budget is
then off by about 3 GiB (half of the 6 GiB difference).
Please change the parenthetical to "unless `-j` sets `-Xmx`,
`-XX:MaxHeapSize` or the cap itself", and change line 207 of
`content/cn/docs/quickstart/hugegraph/hugegraph-hstore.md` to match ("`-j`
自行设置了 `-Xmx`、`-XX:MaxHeapSize` 或该上限时不再添加").
--
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]