Comments (7)
As it says in the Javadoc, it is a pragmatic length to encourage better design.
Large messages are a design smell. It is better to break them into chunks for transmission.
from aeron.
Hi @JPWatson, thanks for getting back to me.
I do understand that smaller messages are more 'pragmatic', but I was hoping for more clarification on exactly why on a hardware/OS level that using large messages is not pragmatic. My guess is because a large message would end up evicting other cached items.
For example, our L3 cache size is 64mb - does that mean we can safely increase the max message size to 32mb instead of 16mb (the current limit)?
Thanks again for your time!
from aeron.
Larger messages are more likely to increase the number of cache misses. You'll also have the cost of doing fragment assembly on the receiver size which involves additional copies. There is a bigger picture to consider. For instance, what are you optimising for? how would you build up the 32MB message to send in the first place?
from aeron.
Yes, I understand the cost of assembly.
The reason we have to consider large messages is because our source of data (from a grpc API) contains huge messages as large 60mb. The data would end up being built up in our application memory. This isn't something we can avoid, which is why we have to consider increasing the max message length of Aeron.
Yes, we can manually divide the messages into sub-messages in order to bypass Aeron's max message length when we receive the grpc message, but downstream we still have to manually join the sub-messages up. Our logic now has to consider both joining our sub-messages up as well as Aeron's own fragment assembler.
Hence my question as to whether it is safe to increase Aeron's max message length, and what the potential implications are.
Thanks again for your time.
from aeron.
If single messages get larger than what can practically fit in CPU cache along with other relevant data and code then performance can significantly degrade therefore we actively discourage designs that use large messages.
from aeron.
@mjpt777 do you mean the last level cache or per core one?
from aeron.
@mjpt777 do you mean the last level cache or per core one?
LLC is the general idea for the limit. However things are best when significantly less than per core caches.
from aeron.
Related Issues (20)
- Cannot set thread affinity in shared or sharednetwork modes for c media driver HOT 3
- list-members(ClusterTool) command does not show isLeader accurately
- big latency while transmit small packets cross different AWS zone over Aeron comparing with raw UDP HOT 2
- AeronCluster.AsyncConnect can forget to close subscription HOT 1
- [C++] `ReplayMerge` with multicast live destination doesn't merge. HOT 10
- AeronCluster.java decoding order issue HOT 3
- OpenTelemetry Integration HOT 1
- ArchiveException: ERROR - response for correlationId=15, error: 59232 position not aligned to a data header HOT 8
- Invoke fileChannel's force method before close HOT 2
- Heartbeats being sent, despite no publishing. HOT 5
- `ReplayMerge::doWork` throws exceptions without descriptions.
- ReplayMerge join position is greater than the replay position HOT 4
- AeronCluster client (gateway) - SIGSEGV HOT 1
- Set thread name to "client-conductor" fails.
- aeron ping-pong example build should detect sendmmsg
- code examples for C or C++ HOT 2
- Archive ConductorServiceTimeoutException when using `useConductorAgentInvoker` HOT 3
- [C Media Driver]: Custom poller and receiver functions HOT 2
- Entire cluster of 3 members getting stuck if one of the followers gets stuck HOT 3
- Aeron 1.43.0 - NullPointerException: Cannot invoke "io.aeron.archive.Session.doWork()" HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aeron.