risingwave icon indicating copy to clipboard operation
risingwave copied to clipboard

Eliminate hardcoded values

Open lmatz opened this issue 2 years ago • 3 comments

If some of the hardcoded values should not be visible/tuned by users, we may introduce a [developer] section to the src/config/risingwave.toml or config them in a separate file to prevent misuse/confusion.

Just never know when the value needs to be changed to see how the performance changes, recompiling is slow in the release mode.

lmatz avatar Sep 09 '22 10:09 lmatz

  • [x] DEFAULT_CHUNK_SIZE -> batch_chunk_size
  • [x] HASH_AGG_CACHE_SIZE -> unsafe_agg_cache_size
  • [x] JOIN_CACHE_CAP -> unsafe_join_cache_size
  • [x] EXTREME_CACHE_SIZE -> unsafe_extreme_cache_size
  • [x] PROCESSING_WINDOW_SIZE -> stream_chunk_size
  • [x] K_PROCESSING_WINDOW_SIZE -> batch_chunk_size
  • [ ] TOPN_CACHE_HIGH_CAPACITY_FACTOR
  • [x] ENABLE_EXECUTOR_ROW_COUNT -> stream_enable_executor_row_count
  • [ ] INDEX_BITS
  • [ ] LOCAL_EXECUTE_BUFFER_SIZE
  • [x] BOUNDED_BUFFER_SIZE
  • [x] CONNECTOR_MESSAGE_BUFFER_SIZE
  • [ ] ......

lmatz avatar Sep 12 '22 03:09 lmatz

By extracting the constants of streaming cache size, it'll also benifit #5080. 😄

BugenZhao avatar Sep 13 '22 06:09 BugenZhao

To contributors: one example of resolving this issue is: https://github.com/risingwavelabs/risingwave/pull/5361. It's just about moving variables to the config file. Welcome to have a try!

skyzh avatar Sep 16 '22 01:09 skyzh

Most important ones are done, the rest probably don't seem to have much impact, so we do it in the future if really necessary.

lmatz avatar Oct 13 '22 04:10 lmatz