GitHub user git-hulk added a comment to the discussion: Memory leak and 
confusing logs

> Ok, I think this makes sense to me! If I interpret this correctly there was a 
> compaction running just as the memory spiked correct?

Yes, exactly. I suspect the compaction involves too many files at once and 
occupies too much memory.

> Just so I understand, this config will split up what was likely one too-big 
> compaction into smaller compaction tasks, allowing kvrocks to reclaim memory 
> in between?

Yes, `rocksdb.max_compaction_bytes` is mainly used for controlling the 
compaction bytes to avoid involving too many input files. Its default value is 
25 * target_file_size_base(128MiB).

> I'm still not sure why compactions happen outside of the set cron (I have 
> both compaction-checker and compaction crons set), but maybe my understanding 
> of this is wrong?

We don't disable the auto-compaction by default(controlled by the option 
`rocksdb.disable_auto_compactions`). We encourage users to use 
`compaction-checker` over `compaction-cron` for the sake of the latter will do 
the full compaction, which is a resource-intensive operation(both CPU and IO).

GitHub link: 
https://github.com/apache/kvrocks/discussions/2984#discussioncomment-13228209

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]

Reply via email to