rockeet commented on code in PR #420:
URL: 
https://github.com/apache/incubator-hugegraph-doc/pull/420#discussion_r2432057304


##########
content/en/blog/RocksDB Plus Configuration YAML.md:
##########
@@ -0,0 +1,230 @@
+---
+date: 2025-09-30
+title: "RocksDB Plus YAML configuration file"
+linkTitle: "RocksDB Plus YAML configuration file"
+---
+
+RocksDB provides a rich set of configuration parameters, but most of them 
typically require hardcoded setup.
+
+RocksDB Plus ([ToplingDB](https://github.com/topling/toplingdb)) introduces a 
**SidePlugin + YAML** mechanism, making configuration more modular and 
composable.
+
+This document focuses on the **extended parameters of RocksDB Plus**, helping 
readers understand their purpose and usage.
+
+## 0. rocksdb_plus.yaml used in HugeGraph
+
+The following includes only the configuration parameters used in HugeGraph. 
For the full configuration supported by ToplingDB, refer to the [SidePlugin 
Wiki](https://github.com/topling/sideplugin-wiki-en/wiki):
+
+```yaml
+http: # Web Server related configuration
+  # normally parent path of db path
+  document_root: /dev/shm/rocksdb_resource # Static resource directory, 
extracted by `preload_topling.sh` in HugeGraph
+  listening_ports: '2011' # Web Server listening port for management/monitoring
+
+setenv: # Environment variable settings
+  StrSimpleEnvNameNotOverwrite: StringValue
+  IntSimpleEnvNameNotOverwrite: 16384
+  OverwriteThisEnv:
+    #comment: overwrite is default to false
+    overwrite: true
+    value: force overwrite this env by overwrite true
+
+Cache: # Cache configuration
+  lru_cache: # Define an LRU cache instance
+    class: LRUCache
+    params: 
+      capacity: 8G # Cache capacity: 8GB
+      num_shard_bits: -1 # Number of shards, -1 means auto
+      strict_capacity_limit: false
+      high_pri_pool_ratio: 0.5
+      use_adaptive_mutex: false
+      metadata_charge_policy: kFullChargeCacheMetadata # Metadata also counts 
toward cache capacity
+
+Statistics: # Sampling configuration
+  stat:
+    class: default
+    params:
+      discard_tickers: # Discarded tickers to reduce overhead
+        - rocksdb.block.cache
+        - rocksdb.block.cachecompressed
+        - rocksdb.block
+        - rocksdb.memtable.payload.bytes.at.flush
+        - rocksdb.memtable.garbage.bytes.at.flush
+        - rocksdb.txn
+        - rocksdb.blobdb
+        - rocksdb.row.cache
+        - rocksdb.number.block
+        - rocksdb.bloom.filter
+        - rocksdb.persistent
+        - rocksdb.sim.block.cache
+      discard_histograms: # Discarded histogram metrics
+        # comment: ....
+        - rocksdb.blobdb
+        - rocksdb.bytes.compressed
+        - rocksdb.bytes.decompressed
+        - rocksdb.num.index.and.filter.blocks.read.per.level
+        - rocksdb.num.data.blocks.read.per.level
+        - rocksdb.compression.times.nanos
+        - rocksdb.decompression.times.nanos
+        - rocksdb.read.block.get.micros
+        - rocksdb.write.raw.block.micros
+      # comment end of array
+      #stats_level: kAll
+      stats_level: kDisableAll  # Disable all statistics
+
+MemTableRepFactory: # MemTable implementation in memory
+  cspp: # ToplingDB-specific high-concurrency memory structure
+    class: cspp
+    params:
+      mem_cap: 16G # Preallocate sufficient virtual memory space; may reserve 
address space without actual allocation
+      use_vm: false
+      token_use_idle: true
+      chunk_size: 16K # Internal allocation granularity
+      convert_to_sst: kFileMmap # Convert MemTable directly to SST, skipping 
flush; options: {kDontConvert, kDumpMem, kFileMmap}
+      sync_sst_file: false # Whether to fsync after SST conversion when using 
kFileMmap
+
+  skiplist: # Default skiplist structure in RocksDB
+    class: SkipList
+    params:
+      lookahead: 0
+
+TableFactory:
+  cspp_memtab_sst:
+    class: CSPPMemTabTable # TableFactory paired with cspp
+    params: # empty params
+
+  bb:
+    class: BlockBasedTable # Default block-based table in RocksDB
+    params:
+      checksum: kCRC32c
+      block_size: 4K
+      block_restart_interval: 16
+      index_block_restart_interval: 1
+      metadata_block_size: 4K
+      enable_index_compression: true
+      block_cache: "${lru_cache}" # Use the LRU cache defined above
+      readers:
+        BlockBasedTable: bb

Review Comment:
   这三行是 DispatcherTable 的参数,不是 BlockBasedTable 的参数,应该删掉



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