kvrocks
kvrocks copied to clipboard
Add a option to specify write_buffer_size for minor column families
For #2193
Add a lite_mode option to special kvrock running at lite_mode,
At this mode, the lite_opts will replace for subkey_opts on some infrequently used column families
for reduce memory usage in some scenarios.
@jjz921024 Thanks for your contributions.
I believe "lite mode" is not a suitable name as it does not clearly convey its purpose.
We should find a more specific name instead of labeling any random behavior as "lite mode".
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
56.0% Coverage on New Code
0.0% Duplication on New Code
I believe "lite mode" is not a suitable name as it does not clearly convey its purpose.
We should find a more specific name instead of labeling any random behavior as "lite mode".
Maybe we can rename this option to reduce_infrequently_column_memory_usage so that explicitly tell the user that it is used to reduce the memory size of an infrequently used column family?
I believe "lite mode" is not a suitable name as it does not clearly convey its purpose. We should find a more specific name instead of labeling any random behavior as "lite mode".
Maybe we can rename this option to
reduce_infrequently_column_memory_usageso that explicitly tell the user that it is used to reduce the memory size of an infrequently used column family?
It can be minor_columns_write_buffer_size num.
@jjz921024 I'm good with this implementation.
@jjz921024 Maybe a simpler way is:
- Config an extra "rocksdb.minor_write_buffer_size" as extra arguments, it can be a bit smaller
- "default" and "metadata" cf is "major", other column families are "minor"
- Adjust the size for these two parts. There are two kinds of ways: (1) using same default "rocksdb.minor_write_buffer_size", or even a smaller "rocksdb.minor_write_buffer_size", and separate the two args. This would nice for new user and most users, since it could reducing the arg here and just improve some performance (2) Using current way, this would be good for some extra user who adjusted the write_buffer_size previously
Personally (3) is a bit hard but I think these CF should be tuned themselves in the future, maintaining two configs both for "minor"( like if "rocksdb.write_buffer_size" is set and "rocksdb.minor_write_buffer_size" doesn't set, using "rocksdb.write_buffer_size", and otherwise separate them) is better for users, but might be a bit tricky. Maybe we can separate it into other patch?
Thanks for the efforts!