You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by GitBox <gi...@apache.org> on 2022/10/10 02:58:37 UTC

[GitHub] [incubator-kvrocks] caipengbo commented on a diff in pull request #953: feat: add mutil_path to conf

caipengbo commented on code in PR #953:
URL: https://github.com/apache/incubator-kvrocks/pull/953#discussion_r990887712


##########
kvrocks.conf:
##########
@@ -745,10 +745,61 @@ rocksdb.write_options.low_pri no
 
 # If enabled, this writebatch will maintain the last insert positions of each
 # memtable as hints in concurrent write. It can improve write performance
-# in concurrent writes if keys in one writebatch are sequential. 
+# in concurrent writes if keys in one writebatch are sequential.
 #
 # Default: no
 rocksdb.write_options.memtable_insert_hint_per_batch no
 
+# A list of paths where SST files can be put into, with its target size.
+# Newer data is placed into paths specified earlier in the vector while
+# older data gradually moves to paths specified later in the vector.
+#
+# For example, you have a flash device with 10GB allocated for the DB,
+# as well as a hard drive of 2TB, you should config it to be:
+#   [{"/flash_path", 10GB}, {"/hard_drive", 2TB}]
+#
+# The system will try to guarantee data under each path is close to but
+# not larger than the target size. But current and future file sizes used
+# by determining where to place a file are based on best-effort estimation,
+# which means there is a chance that the actual size under the directory
+# is slightly more than target size under some workloads. User should give
+# some buffer room for those cases.
+#
+# If none of the paths has sufficient room to place a file, the file will
+# be placed to the last path anyway, despite to the target size.
+#
+# Placing newer data to earlier paths is also best-efforts. User should
+# expect user files to be placed in higher levels in some extreme cases.
+#
+# If left empty, only one path will be used, which is db_name passed when
+# opening the DB.
+# Default: empty
+#
+# If KVRocks stores a lot of cold data, you can use this parameter to
+# reduce the amount of high performance disk usage.
+#
+# Note that when enable_db_paths is set to yes, kvrocks db date will save to
+# rocksdb.db_paths0' path & rocksdb.db_paths1's path
+#
+# Default: no
+# rocksdb.enable_db_paths yes
+#
+# rocksdb.db_paths0's value will be set into rocksdb.db_paths[0]'s path
+#
+# rocksdb.db_paths0 /mnt/ssd
+#
+# rocksdb.db_paths0_size_gb's value will be set into rocksdb.db_paths[0]'s size(GB)
+#
+# rocksdb.db_paths0_size_gb 10
+#
+# rocksdb.db_paths1's value will be set into rocksdb.db_paths[1]'s path
+#
+# rocksdb.db_paths1 /mnt/hdd
+#
+# rocksdb.db_paths1_size_gb's value will be set into rocksdb.db_paths[1]'s size(GB)
+# If value is 0, means that rocksdb.db_paths off
+#
+# rocksdb.db_paths1_size_gb 10

Review Comment:
   > I've tested that db_paths supports up to four paths, but only the first and last items will write data
   
   I think we need to fully understand rocksdb's behavior first, so that we can use this feature in kvrocks. We won't be able to use this feature until we know if it will behave as we expect.



-- 
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: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org