There is no need in separate read/write throttling, because you cannot
write faster then read anyway, and plus this makes the code less cleaner
(and also it will allow avoid implementing throttling backups to S3,
since it does not use common S3 writer).
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
Server settings:
- max_local_read_bandwidth_for_server
- max_local_write_bandwidth_for_server
Query settings:
- max_local_read_bandwidth
- max_local_write_bandwidth
This is the preparation for adding ability to throttle BACKUPs
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
Right now those two settings are applied only at start:
- max_remote_read_network_bandwidth_for_server
- max_remote_write_network_bandwidth_for_server
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
After #36425 there was a lot of confusions/problems with configuring pools - when the message was confusing, and settings need to be ajusted in several places.
See some examples in #44251, #43351, #47900, #46515.
The commit includes the following changes:
1) Introduced a unified mechanism for reading pool sizes from the configuration file(s). Previously, pool sizes were read from the Context.cpp with fallbacks to profiles, whereas main_config_reloader in Server.cpp read them directly without fallbacks.
2) Corrected the data type for background_merges_mutations_concurrency_ratio. It should be float instead of int.
3) Refactored the default values for settings. Previously, they were defined in multiple places throughout the codebase, but they are now defined in one place (or two, to be exact: Settings.h and ServerSettings.h).
4) Improved documentation, including the correct message in system.settings.
Additionally make the code more conform with #46550.
* Remove obsolete code for archive suffixes.
* Simplify backup coordination, stop using it for restoring.
* Build all file infos before writing to backup. Decrease number of znodes.
* Split long values before writing to ZooKeeper.
* Use separate mutexes for unrelated activities.
* Make test test_disallow_concurrency less flaky.
* Add comments and test for backup_keeper_value_max_size.
Those settings can be applied only at start, so it is better to have
them in configuration file instead of user profile settings.
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
ClickHouse reads table data in blocks of 'max_block_size' rows. Due to
filtering, aggregation, etc., result blocks are typically much smaller
than 'max_block_size' but there are also cases where they are much
bigger. Setting 'query_cache_squash_partial_results' (enabled by
default) now controls if result blocks are squashed (if they are tiny)
or split (if they are large) into blocks of 'max_block_size' size before
insertion into the query result cache. This reduces performance of
writes into the query cache but improves compressability of cache
entries and provides more natural block granularity when query results
are later served from the query cache.
Entries in the query cache are now also compressed by default. This
reduces the overall memory consumption at the cost of slower writes into
/ reads from the query cache. To disable compression, use setting
'query_cache_compress_entries'.