-
Notifications
You must be signed in to change notification settings - Fork 127
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
Added watermark_scale_factor tuning #609
Added watermark_scale_factor tuning #609
Conversation
Adds a method for determining an appropriate vm.watermark_scale_factor value for baremetal systems. Implements: spec memory-fragmentation-tuning
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.
Thank you for the patch for the additional functionality. I have a few inline comments (please see against the file), and also I think the tests need to be expanded to test the calculate_watermark_scale_factor()
function (i.e. only the watermark_scale_factor()
function is tested).
It would also be good to actually feed it test fixtures for the /proc/zoneinfo
and /proc/meminfo/
.
Also, technically, the library still supports Py27 charms, and definitely supports Py35 (xenial) charms.
Thanks.
- improving tests - implemented suggested changes
Thanks for the feedback @ajkavanagh. |
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.
Very much more readable this time; much improved. Unfortunately(!) this let me see some more areas (mostly docstrings) and also a suggestion on improving the code around the searching or proc/zoneinfo.
Many thanks.
Hi Alex, The heuristics for calculating vm.watermark_scale_factor might change based on this charm spec, and subsequent reviews. |
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.
LGTM - let me know if it's ready for merging; you mentioned that there might be a change? Also, thanks very much for your work on this and the changes.
@ajkavanagh I think this should now be ready for merging. The associated spec is approved and the tests are passing for me in my env with the latest commit. |
Thanks @brettmilford ; I'm back from leave now and have just kicked off the tests. |
Hey @ajkavanagh, can you please run the tests again. TY |
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.
LGTM, minor changes required.
Removed get_memtotal implementation and tests
@niedbalski @ajkavanagh please take another look, I've added the changes requested. TY |
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.
Minor change requested.
Depends: juju/charm-helpers#609 Implements: spec memory-fragmentation-tuning Change-Id: I0195d5f65f36442abf1355dd5150d48a37184e97
* Update charm-swift-storage from branch 'master' to 34b00a0530d5241b43fda7ba2dbe1abdbf31ecd3 - Merge "Add vm.watermark_scale_factor tuning" - Add vm.watermark_scale_factor tuning Depends: juju/charm-helpers#609 Implements: spec memory-fragmentation-tuning Change-Id: I0195d5f65f36442abf1355dd5150d48a37184e97
Adds a method for determining an appropriate vm.watermark_scale_factor
value for baremetal systems.
Implements: spec memory-fragmentation-tuning
https://review.opendev.org/c/openstack/charm-specs/+/792383