-
Notifications
You must be signed in to change notification settings - Fork 335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VPP: T1797: Optimizations for VPP memory allocation during startup #2074
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remember that we decided to break up the vyos.util
module: https://vyos.dev/T5195
One of the most important steps to break it up is to stop expanding it. ;)
These functions should go to vyos.util.system
.
One blocker for it is that there's no vyos.util.process
yet. The new cmd
should be in vyos.utils.process
— my plan is to make those functions aware of VRF and netns, and I'll get to it when I'm back from my vacation.
For now, I suppose we can copy the old cmd
to a stub vyos.utils.process
just to get the ball rolling.
- modified `sysctl_read()` to return the whole value - modified `sysctl_write()` logic to return `True` only in case a value was changed successfully - added `sysctl_apply()` to apply a dictionary of values at once
@dmbaturin thanks! New sysctl helpers were moved to |
Should we declare vyos-1x/python/vyos/utils/__init__.py Line 16 in e47668d
|
- changed memory requirement from total to available. This allows to start on systems with less total memory and protects from startup on systems with overloaded memory. - prevent startup if sysctl settings were not applied. This protects from situations when the system cannot allocate enough hugepages or apply other sysctl settings.
not for this case, as I can see. |
Change Summary
Optimizations for VPP memory allocation during startup
Types of changes
Related Task(s)
Component(s) name
util.py, VPP
Proposed changes
systems with less total memory and protects from startup on systems with
overloaded memory.
situations when the system cannot allocate enough hugepages or apply other
sysctl settings.
Additionally fixed sysctl helpers in
util.py
to makevpp.py
changes possible.How to test
Checklist: