Skip to content

Conversation

@akredalen
Copy link
Contributor

@akredalen akredalen commented Aug 3, 2025

Increased stack sizes for mesh provisoner sample. Values are based on thread analysis, plus added margin.

Comment on lines 2 to 6
CONFIG_MAIN_STACK_SIZE=4392
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4740
CONFIG_BT_MESH_SETTINGS_WORKQ_STACK_SIZE=1664
CONFIG_BT_MESH_ADV_STACK_SIZE=3960
CONFIG_BT_RX_STACK_SIZE=3288
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
CONFIG_MAIN_STACK_SIZE=4392
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4740
CONFIG_BT_MESH_SETTINGS_WORKQ_STACK_SIZE=1664
CONFIG_BT_MESH_ADV_STACK_SIZE=3960
CONFIG_BT_RX_STACK_SIZE=3288
CONFIG_MAIN_STACK_SIZE=4400
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4800
CONFIG_BT_MESH_SETTINGS_WORKQ_STACK_SIZE=1700
CONFIG_BT_MESH_ADV_STACK_SIZE=4000
CONFIG_BT_RX_STACK_SIZE=3300

I just rounded it up to next hundred. If not, we will definitely get questions on how did we calculate exact number, as those numbers to veryy specific down to unit place.

Now, we can say, we experiemented, added some 10% (or something, I don't know how much margin did you add), and rounded it up to next hundred.

What do you think? Does anyone else has any other opinion?

Copy link
Contributor Author

@akredalen akredalen Aug 4, 2025

Choose a reason for hiding this comment

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

@omkar3141 Sorry, I forgot to mention - the values are set with 50% margin, based off the thread analysis. With a lot for testing it seems that such margin was needed due to spikes in usage during provisioning. Rounding up is fine with me.

 Increased stack sizes for mesh provisoner sample.
 Values are based of thread analysis, plus added margin.

Signed-off-by: Stine Åkredalen <[email protected]>
@akredalen akredalen force-pushed the mesh_sample_stack_update branch from ccdca76 to 3594a32 Compare August 4, 2025 13:37
@akredalen akredalen marked this pull request as ready for review August 4, 2025 13:37
@akredalen akredalen requested review from alxelax and omkar3141 August 4, 2025 13:39
@alxelax alxelax added this to the ncs-3.1.0 milestone Aug 4, 2025
@rlubos rlubos merged commit 8876f35 into nrfconnect:main Aug 5, 2025
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants