-
Notifications
You must be signed in to change notification settings - Fork 118
Limit remote batch size #724
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
When processing a remote batch, the system will process every single message that was available at the start of processing. This can lead to a long pause time if there have been a considerable number of frees to this thread. This commit introduces a new mechanism to only process messages up to a limit of 1MiB. The limit is configurable using CMake. Choosing too small a limit can cause freeing to never catch up with the incoming messages.
|
This seems entirely sensible. Might it be worth having different thresholds for the different times that we are servicing the message queue?
I could sort of imagine that making the latter of those consume the entire already pending queue but the former be a little more "hope we're in a steady state" flavor of choosy, but that's just an intuition that isn't backed by any kind of data. :) |
|
@nwf I have been wondering about something similar. If we had a remote per size class per allocator, then we could process the message queues to get a new free list, and only process other sizes if we needed to get a new slab. I think there are some great opportunities for further optimisations here. |
|
Oh hey, that's really clever! Just musing and catching up to things you already know...
|
|
The pagemap combines the remote pointer with a size class. I think we could do this, but we'd need the remotes to be at a well defined alignment to be able to read the size class cheaply for various mitigations. |
|
@nwf I propose we merge this as is, and raise an issue to continue this discussion? |
|
Yeah, that sounds like the right plan to me. :) |
When processing a remote batch, the system will process every single message that was available at the start of processing. This can lead to a long pause time if there have been a considerable number of frees to this thread.
This commit introduces a new mechanism to only process messages up to a limit of 1MiB. The limit is configurable using CMake.
Choosing too small a limit can cause freeing to never catch up with the incoming messages.