I needed to evaluate the memory impact of adding a new topic in a 32-bit embedded application, so I made this model. I find it helpful, hopefully it will help someone else as well.
ram_model.html (9.5 KB)
TLDR: mildly-optimistic model: an unordered subscriber costs ~2 KiB, a publisher costs ~1 KiB. Actual usage depends on the traffic: how many incoming transfers in-flight, how many retained outgoing reliable messages waiting for confirmation, etc. Ordered subscribers can be very expensive because they may retain multiple messages with full payload etc. Reliable traffic has costs on both sides of the link: the sender retains the retry buffer, the receiver keeps ack state in case any get lost. One thing to be aware of is that the actual worst-case memory consumption of a node depends on others that communicate with it.
