This PR is based on PR 106 (issue: 3777348 Simplifying sockinfo inheritance)
This PR starts from commit (issue: 3777348 Moving sock stats outside the socket)
What
Socket statistics consume a big chunk of memory in each socket separately.
Even in case statistics are not needed these stats take memory and are accesses and updated.
This PR moves statistics to a global vector and sockets ask for stats object.
Sockets will receive stats objects up to configured max stats. Other sockets will not have stats.
This allows:
Saving memory when less stats are needed then amount of sockets (Like 1M sockets)
Disable stats and save CPU cycles and cache access.
Why ?
Performance optimization
Change type
What kind of change does this PR introduce?
[ ] Bugfix
[X] Feature
[ ] Code style update
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Tests
[ ] Other
Check list
[X] Code follows the style de facto guidelines of this project
[X] Comments have been inserted in hard to understand places
Description
This PR is based on PR 106 (issue: 3777348 Simplifying sockinfo inheritance) This PR starts from commit (issue: 3777348 Moving sock stats outside the socket)
What
Socket statistics consume a big chunk of memory in each socket separately. Even in case statistics are not needed these stats take memory and are accesses and updated. This PR moves statistics to a global vector and sockets ask for stats object. Sockets will receive stats objects up to configured max stats. Other sockets will not have stats. This allows:
Why ?
Performance optimization
Change type
What kind of change does this PR introduce?
Check list