Skip to content

impl/lola: Added shm-size calculation by analysis for DATA/CONTROL#760

Open
crimson11 wants to merge 3 commits into
mainfrom
mf_new_shm_size_calculation
Open

impl/lola: Added shm-size calculation by analysis for DATA/CONTROL#760
crimson11 wants to merge 3 commits into
mainfrom
mf_new_shm_size_calculation

Conversation

@crimson11

@crimson11 crimson11 commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Currently we determine shm-sizes of the
CTRL and DATA shm-objects by a simulation run.
I.e. we initialize the content of both section
1st within a heap-allocated resource. At the end
we use the sizes to correctly size the shm-objects. This "SIMULATION" method is exact but has high runtime costs and might consume lots of memory during startup.

This change now redesigns the containers/dynamic data types being used within the DATA section, to use only classes, which we are in control of and where we exactly know based on our configuration, who much size they will need. Thus the whole simulation canbe skipped and we calculate the size correctly from the configuration settins for the service instance.

We re-introduce therefore the ESTIMATION mode in parallel to the SIMULATION mode.

Tackles issue #761

Currently we determine shm-sizes of the
CTRL and DATA shm-objects by a simulation run.
I.e. we initialize the content of both section
1st within a heap-allocated resource. At the end
we use the sizes to correctly size the shm-objects.
This "SIMULATION" method is exact but has high runtime costs
and might consume lots of memory during startup.

This change now redesigns the containers/dynamic data
types being used within the DATA section, to use only
classes, which we are in control of and where we exactly
know based on our configuration, who much size they will
need. Thus the whole simulation canbe skipped and we calculate
the size correctly from the configuration settins for the
service instance.

We re-introduce therefore the ESTIMATION mode in parallel
to the SIMULATION mode.
@crimson11
crimson11 force-pushed the mf_new_shm_size_calculation branch from c72a678 to a090932 Compare July 23, 2026 21:01
@crimson11 crimson11 changed the title impl/lola: Added shm-size calc for CTRL impl/lola: Added shm-size calc by estimation for DATA/CONTROL Jul 23, 2026
@crimson11
crimson11 force-pushed the mf_new_shm_size_calculation branch from a090932 to 59cd98d Compare July 23, 2026 21:24
enum class ShmSizeCalculationMode : std::uint8_t
{
kSimulation,
kEstimation,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is no longer an estimation - this is now an calculation! We should be clear in the wording.

Added analytical estimate/ANALYSIS mode for the
shm-size calculation for the CONTROL
section.
@crimson11
crimson11 force-pushed the mf_new_shm_size_calculation branch from 59cd98d to e088dba Compare July 24, 2026 09:46
@crimson11
crimson11 requested a review from castler July 24, 2026 09:57
Adapted signature of LinearSearchMap to
support custom KeqEqual just like
std::unordered_map.
@castler castler changed the title impl/lola: Added shm-size calc by estimation for DATA/CONTROL impl/lola: Added shm-size calculation for DATA/CONTROL Jul 27, 2026
@castler castler changed the title impl/lola: Added shm-size calculation for DATA/CONTROL impl/lola: Added shm-size calculation by analysis for DATA/CONTROL Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

2 participants