[enhancement](stats) Make stats cache item size configurable (#19205)

This commit is contained in:
AKIRA
2023-05-11 14:59:37 +09:00
committed by GitHub
parent dc497e11bb
commit 6d2070c59d
4 changed files with 18 additions and 9 deletions

View File

@ -1948,5 +1948,17 @@ public class Config extends ConfigBase {
*/
@ConfField(mutable = false)
public static boolean enable_delete_existing_files = false;
/*
* The actual memory size taken by stats cache highly depends on characteristics of data, since on the different
* dataset and scenarios the max/min literal's average size and buckets count of histogram would be highly
* different. Besides, JVM version etc. also has influence on it, though not much as data itself.
* Here I would give the mem size taken by stats cache with 10_0000 items.Each item's avg length of max/min literal
* is 32, and the avg column name length is 16, and each column has a histogram with 128 buckets
* In this case, stats cache takes total 911.954833984MiB mem.
* If without histogram, stats cache takes total 61.2777404785MiB mem.
* It's strongly discourage analyzing a column with a very large STRING value in the column, since it would cause
* FE OOM.
*/
@ConfField
public static long stats_cache_size = 10_0000;
}