imbajin commented on code in PR #535:
URL: https://github.com/apache/hugegraph-doc/pull/535#discussion_r4320472492


##########
content/en/docs/guides/hugegraph-docker-cluster.md:
##########
@@ -196,10 +196,19 @@ The following tables describe current master entrypoints 
and Compose files, not
 | `HG_STORE_GRPC_PORT` | No | `8500` | `grpc.port` |
 | `HG_STORE_REST_PORT` | No | `8520` | `server.port` |
 | `HG_STORE_DATA_PATH` | No | `/hugegraph-store/storage` | `app.data-path` |
+| `HG_STORE_ROCKSDB_TOTAL_MEMORY_SIZE` | No | None | 
`rocksdb.total_memory_size`, in bytes |
 {.td-table--wide}
 
 > **Deprecated aliases**: `PD_ADDRESS` → `HG_STORE_PD_ADDRESS`, `GRPC_HOST` → 
 > `HG_STORE_GRPC_HOST`, `RAFT_ADDRESS` → `HG_STORE_RAFT_ADDRESS`.
 
+RocksDB caches live outside the Java heap. Leave 
`HG_STORE_ROCKSDB_TOTAL_MEMORY_SIZE` unset to size them from the container 
memory limit, or from the

Review Comment:
   ⚠️ Important: Blocking: no. Summary: Leaving this variable unset does not 
always enable auto-sizing: the entrypoint omits the override, so an upgraded 
Store whose mounted `application-pd.yml` still has `32000000000` keeps that 
budget. Please say the effective config must be missing or `0`, and link the 
upgrade instruction here (also update the Chinese paragraph). Evidence: 
apache/hugegraph#3355 at `7ded3fc` changes the new distribution value to `0`, 
but emits the JSON override only for a non-empty variable; this page's HStore 
configuration row notes that retained old files stay at `32000000000`.



##########
content/en/docs/quickstart/hugegraph/hugegraph-hstore.md:
##########
@@ -132,6 +132,7 @@ docker run -d \
 | `HG_STORE_GRPC_PORT` | No | `8500` | `grpc.port` | gRPC service port. |
 | `HG_STORE_REST_PORT` | No | `8520` | `server.port` | REST API port. |
 | `HG_STORE_DATA_PATH` | No | `/hugegraph-store/storage` | `app.data-path` | 
Data path. |
+| `HG_STORE_ROCKSDB_TOTAL_MEMORY_SIZE` | No | None | 
`rocksdb.total_memory_size` | RocksDB memory budget in bytes, digits only; 
other values stop the entrypoint with exit code 2. When unset, the value in 
`application-pd.yml` or auto-sizing applies. |

Review Comment:
   🧹 Minor: Blocking: no. Summary: The table says any non-digit value exits 
with code 2, but the entrypoint validates only non-empty values, so an empty 
string is accepted as unset. Please clarify that non-empty values must be 
digits and mirror the wording in Chinese. Evidence: #3355's 
`docker-entrypoint.sh` gates validation on `-n`; its 
`test-store-docker-entrypoint.sh` expects an empty value to leave the key 
absent.



##########
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. 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`, `-XX: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. 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:
   ⚠️ Important: Blocking: no. Summary: This row omits that `total_memory_size` 
is a sizing budget, not a hard memory ceiling; with 
`write_buffer_allow_stall=false`, writes are not stalled when the 
WriteBufferManager exceeds its limit, so native use can exceed the budget and 
hit the container's cgroup OOM limit. Please describe the budget as a sizing 
target and warn that OOM remains possible under write pressure (also in 
Chinese). Evidence: #3355 at `7ded3fc` passes `WRITE_BUFFER_ALLOW_STALL` 
(default `false`) into `WriteBufferManager`; its PR description also says the 
cache limits can be exceeded briefly under heavy writes.



-- 
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]

Reply via email to