-
My understanding of the Let's start simple with an application with a single subscriber and a single publisher with the following characteristics:
Under these assumptions, I would choose the following capacities:
First of all, is this thinking correct? Am I misinterpreting these options somehow? Second, when I set this, I get a message saying that:
It seems like this is governed by |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
You are correct.
We had to start somewhere and 256 seems to be a number which fits 99% of all use cases. Congratulations you are now in the 1% use case 😄
This defines the capacity of the internal fixed size queues which are storing the samples. You can increase those numbers to 2000 but this would massively affect the size of a subscriber port stored inside the management segment in roudi. If memory is not important to you , you can go ahead and adjust it but be aware that the management segment
This and the previous constant also affects the internal sample tracking. When an application crashes roudi has to cleanup the samples they reserved and therefore it has to track which application owns what samples. This also increases the size of the iceoryx management segment. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the detailed answers. One additional question: how much memory are we talking about here? Is it based on the size of the struct that I'm passing around? Let's say if I have
If I reserve 2000 elements, won't this only be 2000 * (8 + 8) = 32000 bytes = 31 KiB? Is there a significant amount of overhead? How can I calculate how much RAM is being used? |
Beta Was this translation helpful? Give feedback.
-
Thanks for the detailed answer. I'm still trying to grasp how Iceoryx works internally, especially around how it actually passes data around, especially since you mention the memory usage is independent of the size of the data I'm passing around. I've found some documentations that I should read once I have a bit more time: chunk_header.md, and lockfree_queue.md. Are there any other docs I should read? Thanks again. |
Beta Was this translation helpful? Give feedback.
@shuhaowu
You are correct.
We had to start somewhere and 256 seems to be a number which fits 99% of all use cases. Congratulations you are now in the 1% use case 😄
This defines the capacity of the internal fixed size queues which are storing the samples. You can increase those numbers to 2000 but this would massively affect the size of a subscriber port stored inside the management segment in roudi. If memory is not important to you , you can go ahead and adjust it but be aware …