ozone icon indicating copy to clipboard operation
ozone copied to clipboard

HDDS-11404. Make RocksDB all parameters configurable.

Open weimingdiit opened this issue 1 year ago • 8 comments

What changes were proposed in this pull request?

Make RocksDB all parameters configurable.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-11404

How was this patch tested?

unit tests and local test environment, and i will provide some test results from my local test environment

Additional notes:

  1. We can use different ini files to customize the rocksDB configuration of corresponding services (such as OM, SCM, DN). For example, you can create a file such as om.db.ini to configure OM's rocksDB, scm.db.ini to configure SCM's rocksDB, and container.db.ini to configure DN's rocksDB
  2. OM, SCM, and DN were tested separately, and the results were in line with expectations

for OM

om.db.ini file:

image

OPTION file:

image image image image

for SCM

scm.db.ini file:

image

OPTION file:

image image image image image

for DN

container.db.ini file:

image

OPTION file:

image image image image image image image

weimingdiit avatar Sep 03 '24 07:09 weimingdiit

@jojochuang @szetszwo @adoroszlai Could you help review this PR? Thanks.

weimingdiit avatar Sep 03 '24 08:09 weimingdiit

@weimingdiit instead of wrapping every config via Ozone, why not let Ozone specify the RockDB config file https://github.com/facebook/rocksdb/blob/5b40c0c074f16dae6e1d60a3c5d7aa3e7d63fdc7/include/rocksdb/utilities/options_util.h#L56 This way, we do not need to keep managing RocksDB Config value additions or deprecation.

kerneltime avatar Sep 03 '24 18:09 kerneltime

@kerneltime I agree. I made the same suggestion in #7117 with a pointer to the RocksDB docs. The approach taken here is not sustainable to maintain and also less intuitive than having Ozone work with RocksDB's config file exactly how RocksDB documents it.

This DBProfile abstraction is old and not really used as far as I know. It might be better to just get rid of it. We can instead directly provide example RocksDB config files for different use cases. This will be much easier to follow than hiding the tuning inside the Java code.

errose28 avatar Sep 03 '24 21:09 errose28

@errose28 @kerneltime This is a very good idea. I looked at the relevant code and felt that directly supporting INI files might be a better choice. Thank you very much for your suggestion. I will modify the code to fully support INI files. By the way, I think this issue https://github.com/apache/ozone/pull/7117 should be closed

weimingdiit avatar Sep 05 '24 03:09 weimingdiit

@weimingdiit Do we have mechanism to control service specific usecase, like if OM, SCM and DN have different configuration, like WAL manual flush may need disable only for OM ?

sumitagrawl avatar Sep 06 '24 05:09 sumitagrawl

Do we have mechanism to control service specific usecase, like if OM, SCM and DN have different configuration, like WAL manual flush may need disable only for OM ?

Probably we could have configuration files for each Role . By default all of these can point to a base config but also provide an option to add overrides for each role. Similar to ozone.metadata.dirs where each process can define its own metadata dir but if not defined , we can fallback to the common config

sadanand48 avatar Sep 06 '24 07:09 sadanand48

Do we have mechanism to control service specific usecase, like if OM, SCM and DN have different configuration, like WAL manual flush may need disable only for OM ?

Probably we could have configuration files for each Role . By default all of these can point to a base config but also provide an option to add overrides for each role. Similar to ozone.metadata.dirs where each process can define its own metadata dir but if not defined , we can fallback to the common config

@sumitagrawl @sadanand48 Yes, this may be our ultimate goal.

weimingdiit avatar Sep 13 '24 07:09 weimingdiit

@errose28 @szetszwo Hi, could you help review the pr?

weimingdiit avatar Sep 16 '24 14:09 weimingdiit

@weimingdiit Hi, is this pull request still work in progress?

Galsza avatar Feb 10 '25 20:02 Galsza

DBConfigFromFile already supports configuring DBOptions from a ini file. But it doesn't configure column family options.

I also wonder if opening up rocksdb options and make all of them configurable is the right thing to do. It's possible to shoot in the foot. Worst case is causing corruption (not sure if it's possible). Most of the projects based on RocksDB opens up a few selected rocksdb options.

Also note there are existing Ozone configuration properties that overrides the RocksDB options loaded from ini file. A proper documentation would be needed to help clarify the interactions of these properties.

jojochuang avatar Feb 12 '25 16:02 jojochuang

If I understand correctly, this is continued (with different approach) in #8173.

adoroszlai avatar May 22 '25 14:05 adoroszlai