Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
123257: colexecdisk: speed up external sort with low distsql_workmem r=yuzefovich a=yuzefovich This commit adjusts the setup of the external sorter to have a minimum amount of memory to work with. We already had a special case for `distsql_workmem = '1B'` (which usually means "force disk spill" testing scenario), but if the workmem was set to something larger than 1B but relatively small (e.g. 20KiB), we could still get into a pathological behavior where the external sort would process the data one tuple at a time, with each tuple comprising the full "partition". This is because we unconditionally consume "disk queue buffers usage" from the available memory, and this consumption is on the order of 1MiB by default. To prevent the pathological behavior we now always bump the memory limit to be at least "disk queue buffers usage" plus 100KiB. Fixes: #123185. Release note: None Co-authored-by: Yahor Yuzefovich <yahor@cockroachlabs.com>
- Loading branch information