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


##########
content/en/docs/quickstart/hugegraph/hugegraph-hstore.md:
##########
@@ -214,12 +215,20 @@ 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` | `auto` | Auto-sized, see note | Off-heap 
memory budget shared across all RocksDB instances on this node (`auto` or byte 
count). See below for derivation rules. |
+| `rocksdb.write_buffer_size` | `32000000` | Derived, see Meaning | Memtable 
size in bytes. When absent or `0`, the node uses `total_memory_size / 1000`, at 
least `1048576` (1 MiB). |
 | `rocksdb.min_write_buffer_number_to_merge` | `16` | `16` | Number of 
memtables merged together before a flush. |
 | `rocksdb.write_buffer_ratio` | not set | `0.66` | Share of 
`total_memory_size` given to the write cache. The rest becomes the block cache. 
|
 {.td-table--wide}
 
+### RocksDB memory budget sizing rules {#rocksdb-memory-budget}
+
+> [!NOTE]
+> When `rocksdb.total_memory_size` is set to `auto` (or absent / `0`), the 
node sizes the off-heap RocksDB budget automatically:
+> - **Calculation Formula**: Takes physical memory (using the visible cgroup 
limit in containers) minus JVM maximum heap (`-Xmx`), direct memory 
(`MaxDirectMemorySize`), and a 1.5 GiB system reserve, then allocates half the 
remainder, clamped between 256 MiB and 32 GiB.

Review Comment:
   Fixed in 06e75d3d: both pages now say 32 GB (`32000000000` bytes), matching 
`MAX_AUTO`.



##########
content/en/docs/quickstart/hugegraph/hugegraph-hstore.md:
##########
@@ -214,12 +215,20 @@ 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` | `auto` | Auto-sized, see note | Off-heap 
memory budget shared across all RocksDB instances on this node (`auto` or byte 
count). See below for derivation rules. |
+| `rocksdb.write_buffer_size` | `32000000` | Derived, see Meaning | Memtable 
size in bytes. When absent or `0`, the node uses `total_memory_size / 1000`, at 
least `1048576` (1 MiB). |
 | `rocksdb.min_write_buffer_number_to_merge` | `16` | `16` | Number of 
memtables merged together before a flush. |
 | `rocksdb.write_buffer_ratio` | not set | `0.66` | Share of 
`total_memory_size` given to the write cache. The rest becomes the block cache. 
|
 {.td-table--wide}
 
+### RocksDB memory budget sizing rules {#rocksdb-memory-budget}
+
+> [!NOTE]
+> When `rocksdb.total_memory_size` is set to `auto` (or absent / `0`), the 
node sizes the off-heap RocksDB budget automatically:
+> - **Calculation Formula**: Takes physical memory (using the visible cgroup 
limit in containers) minus JVM maximum heap (`-Xmx`), direct memory 
(`MaxDirectMemorySize`), and a 1.5 GiB system reserve, then allocates half the 
remainder, clamped between 256 MiB and 32 GiB.
+> - **Write Cache & Block Cache**: Budget is divided according to 
`rocksdb.write_buffer_ratio` (default 0.66). This is a soft capacity target; 
under heavy concurrent write loads, set `rocksdb.write_buffer_allow_stall` to 
`true` to enforce strict memory bounds.

Review Comment:
   Fixed in 06e75d3d, in EN and CN: allow-stall now holds the write cache to 
its share at the cost of write latency, and the note says the block cache is 
not a strict limit, so native memory can still exceed the budget and a 
container can still be OOM-killed.



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