bitflicker64 commented on code in PR #535: URL: https://github.com/apache/hugegraph-doc/pull/535#discussion_r4298390751
########## content/en/docs/quickstart/hugegraph/hugegraph-hstore.md: ########## @@ -205,7 +206,7 @@ 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.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, at most 1 GiB, when unset) and a 1.5 GiB reserve, clamped to 256 MiB to 32 GB. In a container the starting point is the cgroup memory limit, including a limit set only on a parent cgroup the Store can see. 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. | | `rocksdb.write_buffer_size` | `32000000` | `33554432` | Memtable size in bytes. When absent or `0`, the node uses `total_memory_size / 1000`. | Review Comment: Minor: This row still gives the derived `write_buffer_size` as `total_memory_size / 1000`, but apache/hugegraph#3355 now puts a 1 MiB floor on it, and with auto-sizing the floor applies. At the #3355 head (535c2d01b), `AppConfig` fills an absent or `0` `write_buffer_size` with `RocksdbMemoryBudget.writeBufferSize(totalMemory)`, which returns `Math.max(totalMemory / 1000, MIB)`. The floor is there because `RocksDBOptions.MEMTABLE_SIZE` only accepts values from `Bytes.MB` upward. Any budget below about 1 GB, including the 256 MiB auto-sizing floor this PR documents on line 209, therefore gives 1048576, not `total_memory_size / 1000` (about 268 KB at 256 MiB). This PR already adds the matching "at least 1" note to the `raft.disruptorBufferSize` row for the same change. Please change the text to something like "When absent or `0`, the node uses `total_memory_size / 1000`, at least `1048576` (1 MiB)." Make the same change to the `rocksdb.write_buffer_size` row in `content/cn/docs/quickstart/hugegraph/hugegraph-hstore.md` (line 208). -- 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]
