v.22.2Experimental Feature
Add Memory Overcommit Feature to MemoryTracker with Guaranteed Settings
Add memory overcommit toMemoryTracker. Addedguaranteedsettings for memory limits which represent soft memory limits. In case when hard memory limit is reached,MemoryTrackertries to cancel the most overcommited query. New settingmemory_usage_overcommit_max_wait_microsecondsspecifies how long queries may wait another query to stop. Closes #28375. #31182 (Dmitry Novik).
Why it matters
This feature solves the problem of rigid and immediate query cancellation upon reaching memory limits by introducing a soft limit that allows temporary memory overcommitment. It improves query scheduling and stability by enabling queries to wait for others to release memory, thus optimizing resource usage and reducing unnecessary query failures.How to use it
Users can configure the newguaranteed memory limit in their MemoryTracker settings to establish soft memory limits and set the memory_usage_overcommit_max_wait_microseconds parameter to control how long queries wait for memory to be freed before cancellation happens.