byteayan commented on code in PR #535: URL: https://github.com/apache/hugegraph-doc/pull/535#discussion_r4362370377
########## content/en/docs/quickstart/hugegraph/hugegraph-hstore.md: ########## @@ -209,8 +210,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; the Raft log memtables of all partitions share a 256 MiB write buffer charged to that cache, so they don't add to it. The budget is a sizing target, not a hard cap: with `rocksdb.write_buffer_allow_stall` at its default `false`, writes are not stalled when the write cache is full, so native memory can exceed the budget under heavy writes and a container can still be OOM-killed. Setting it to `true` holds the cap more firmly at the cost of write latency. 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`, `-X X:MaxHeapSize` 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. If neither the JVM nor the cgroup files report a usable memory size, the budget falls back to the JVM max heap, clamped to the same 256 MiB to 32 GB. An `application-pd.yml` kept from an earlier release still sets `32000000000`; set it to `0` to auto-size. In PD mode also check the copy PD keeps (KV key `S:FS`), which the first Store uploads and every Store whose local file isn't newer then loads and writes over its local file: change the value there, or set `HG_STORE_ROCKSDB_TOTAL_MEMORY_SIZE` or `-Drocksdb.total_memory_size` on each Store, which the Store keeps above PD's copy. 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: You're right, thanks. At startup `updatePdConfig` only loads `S:FS` when the local file is missing or no newer than `S:Timestamp`, and nothing sets the timestamp on upload. Fixed in e964a687, EN and CN. The row now says that editing `S:FS` alone changes nothing. It recommends setting `HG_STORE_ROCKSDB_TOTAL_MEMORY_SIZE=0` or `-Drocksdb.total_memory_size=0` on each Store and restarting it. As the alternative it describes changing `S:FS` and then putting the current time in milliseconds into `S:Timestamp`, which makes running Stores reload the copy and restart themselves within 60 seconds; a stopped Store picks it up at its next start. The Store deployment guide in apache/hugegraph#3355 says the same (a7dc5c9a7). -- 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]
