Originally from the User Slack
@Daria_Fedorova: I have a question about twcs_max_window_count config.
How will scylla be affected if we raise this limit ?
We used to have no TTL at all with TWC strategy and now I want to set TTL = 3 years with window size = 1 week resulting in 156 windows.
@Felipe_Cardeneti_Mendes: See https://github.com/scylladb/scylladb/issues/6923
The more windows you have, the more SSTables you have, adding more memory pressure. 156
may be fine, but read in particular https://github.com/scylladb/scylladb/issues/6923#issuecomment-1016592469 from @raphaelsc, which is the reason why it is currently hardcoded at 50.
GitHub: Too many windows with default Time Window Compaction Strategy configuration · Issue #6923 · scylladb/scylladb
@raphaelsc: if your queries touch many windows, you’d rather stay with a small number of windows for better perf. we have had improvements around single-key reads, where only one window is consumed at a time, reducing significantly memory usage. but more windows still can yield higher read amplification, decreasing throughput. if you do full scans (or think you may need at some point), I’d stay with a small number of windows, around 20.
example of queries that might benefit from optimization aforementioned:
select * from partition_key=X LIMIT 1;
select * from partition_key=X where timestamp_clustering_key > some_timestamp;
@Daria_Fedorova: Thank you for reply
we try to read in weeks , year&week number are in in the key for convenience