-
Notifications
You must be signed in to change notification settings - Fork 197
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
Make automatic updates nicer #4676
base: main
Are you sure you want to change the base?
Conversation
Hi @morgaesis. Thanks for your PR. I'm waiting for a coreos member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
bc149f6
to
7675343
Compare
@@ -5,4 +5,5 @@ ConditionPathExists=/run/ostree-booted | |||
|
|||
[Service] | |||
Type=simple | |||
Nice=10 |
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.
Unfortunately this won't do what you want here, because ultimately this just calls into rpm-ostreed.service
.
I think by default one would need to use systemd drop-ins for rpm-ostreed.service
locally to have the desired effect.
In theory perhaps though, we could better differentiate "background updates" from "foreground activity" and the daemon could automatically lower its priority.
Hmm. Possibly there's a way we could inherit niceness and other properties from this unit.
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.
Wow, you're quick to reply 😮
Isn't the systemd service the right place to configure this? The service has a key made for this. Configuring "niceness" in the process itself is extra complexity, which would probably just end up calling nicectl from within anyway...
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.
I moved the niceness key to the daemon. When would you want rpm-ostreed to run at 0 niceness? It's such a heavy command, that I would always like it to be nice. Running the command manually or when automatic updates are applied, my system stutters.
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.
Does this really help you though?
I suspect the main problem is not CPU usage but I/O bandwidth for most people.
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.
Indeed, for the most part. There are still CPU bound parts
Writing OSTree commit: rpm-ostree start-daemon is CPU intensive (1-2 cores, i guess)
When I tried adding a new package, rpm-ostree start-daemon
was using ~180% CPU.
Then, Nice
is maybe not the right solution. I just want my system to run smoothly when the updates randomly start.
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.
Or what.... man pages suggest that setting nice
for the process also makes the I/O nice
https://linux.die.net/man/1/ionice
I think what would make me most comfortable here is a design where the automatic update path only has Basically I'm less certain that we want to default to doing |
Thank you for contributing to rpm-ostree.
If you are adding functionality to tree composes, please add
a corresponding test to the compose-test suite. Similarly,
if adding a client-facing feature, consider the vmcheck
suite. Regressions fixes are also great candidates for new
tests.
If you're not sure where or how to add tests, don't hesitate
to ask for help from the maintainers.
Cheers!