-
Notifications
You must be signed in to change notification settings - Fork 690
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
Reduce messages size used to communicate between subsystems #617
Comments
We could even provide something like a fast arena allocator for elements which must be boxed, so the subsystem processing the incoming messages mostly stays within the same memory pages. |
I think it is automatically done by jemalloc. |
Let's add a test as well that asserts |
In the current approach, orchestra can just transparently box all messages that pass over channels, so the size of AllMessages is not important. Furthermore, the actual channels are actually created over the concrete types of messages (I was under wrong impression that they are not), and the AllMessage wrapper is used merely to pass a message into the orchestra. In our case, we still have |
@sandreim status on this? Was this done? |
Orchestra support is implemented, we just need to pass |
Orchestra joins all message types into a single enumeration
AllMessages
. It means that all channels will have element size equal to the maximum size of any message in this enumeration. Withasync_channel
it also means that we preallocate memory rings equal tochannel_capacity * element_size
. Currently, the size ofAllMessages
is equal to 1008 bytes, that leads to huge overhead in terms of memory usage, latency and channels efficiency. We need toBox
messages where their size is more than, e.g. a cache line (64 bytes).Here is a list of message sizes:
The text was updated successfully, but these errors were encountered: