MessageQueue: Change default queue size to 4096 KB #42296
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
1024 KB was low enough that many users seem to hit it, which can lead to the
editor freezing.
The proper fixed as described in #35653 would be to implement a page allocator
to prevent this overflow, but as a stop-gap measure, we can increase the
default value to a more lenient 4096 KB which should be high enough for the
vast majority of use cases.
The default size can be brought down again if/when #35653 is properly fixed,
and if it's actually relevant from a memory point of view.
For the reference, this was already proposed and rejected in the past: #28294.
But IMO, even if page allocation is implemented in
master
for 4.0, it's unlikely to be backported to the3.2
branch, so a stop-gap measure makes sense there IMO.I haven't done any impact assessment of what changing this default value would mean in practice in terms of memory use or performance. But IMO a 4096 KiB buffer size for something as critical as MessageQueue is a good compromise.
There's also a pending PR to implement page allocation: #35658, but it has yet to be reviewed by @reduz / merged or redone.