feat: fit the message cap, the pools, the ring and the stacks to this device - #18
Merged
Conversation
Contributor
Author
|
@coderabbitai pause |
|
Note Reviews pausedUse the following commands to manage reviews:
Use the checkboxes below for quick actions:
Comment |
✅ Action performedReviews paused. |
DavidCozens
force-pushed
the
stage-17-aes-gcm
branch
from
August 16, 2026 21:52
bf9eb36 to
695d00e
Compare
… device Every collaborator is in place, so the compile-time sizes come down to what the device uses. Flash +13,788 B (unchanged) RAM +36,048 B (-3,488) Log stack +600 B (-80) Service +3,688 B (-80) The message cap comes first: the ring, the store's record buffer and the formatter frame on both task stacks all follow it. The worst case measured here is 345 octets — four SD-ELEMENTs with both counters at full 32-bit width and both addresses at fifteen characters, plus a short message — and the cap is set to 400 to allow for longer messages on this device. The ring then drops from eight records to four, the store holding the backlog. Three pool tunables come down to one, the library's defaults being sized for a device running several transports at once. The stacks go last, at twice their measured high-water marks rounded up to a whole configMINIMAL_STACK_SIZE. The overrides arrive through SOLIDSYSLOG_USER_TUNABLES_FILE, as an absolute path quoted for the preprocessor, and every group that includes a SolidSyslog header is given it: Core, the platform sources and this application. They change struct sizes, and a build where only some translation units saw them would disagree about how big those structs are. Nothing here changes what the device does or what protection it is under. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
DavidCozens
force-pushed
the
stage-18-right-size
branch
from
August 16, 2026 21:52
524d97b to
880108b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fit the compile-time sizes to what this device uses, now that every collaborator is in place.
The message cap comes first, because the ring, the store's record buffer and the formatter frame on
both task stacks all follow it.
The worst case measured here is 345 octets: the four SD-ELEMENTs with both counters at full 32-bit
width and both addresses at fifteen characters, plus a short message. 400 allows for longer messages
on this device. Anything longer is truncated rather than dropped.
The pool defaults suit a device running several transports at once. This one runs a single sender
over a single stream to a single destination.
The overrides reach the library through
SOLIDSYSLOG_USER_TUNABLES_FILE, an absolute path quotedfor the preprocessor and given to every group that includes a SolidSyslog header: Core, the platform
sources and this application. They change struct sizes, and a build where only some translation
units saw them would disagree about how big those structs are.
The ring drops from eight records to four. The store holds a backlog, so the ring only has to absorb
what can be logged while the service task is sending.
The task stacks go last, at twice their measured high-water marks rounded up to a whole
configMINIMAL_STACK_SIZE.When you need it. Once the pipeline is complete. Sizing earlier means sizing against a device
that is still missing collaborators.