use "quiet" kernel parameter for aws and vmware #2277
Merged
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.
Issue number:
N/A
Description of changes:
Use the "quiet" parameter for platforms where the hardware is known and the kernel output is not generally needed on the console in order to diagnose issues. This includes the "aws" and "vmware" variants.
The "metal" variants continue to use the more verbose default output so that any hardware without matching driver support can be detected.
Force systemd to always print the status of units, since this can be invaluable data when troubleshooting failures caused by dependency ordering problems.
Remove the printk settings from the default sysctls, since these will be applied by
systemd
very early and override the "quiet" behavior. The default values in/proc/sys/kernel/printk
are controlled by the kernel config, and will be "7 4 1 7" without the "quiet" parameter, and "4 4 1 7" when it is present.The main motivation for this is to improve boot performance and make it more consistent. printk logging is expensive, and can slow down many code paths in the kernel.
Testing done:
Verified that we still get reasonable systemd output in the "success" and "failure" cases:
https://gist.github.com/bcressey/1b8889c772cef9d88ce37b38f6051b0a
Overall this change saves at least two seconds when booting an m5ad.large instance in EC2. I ignored the results from the first boot to rule out the impact of populating the EBS volume with snapshot blocks.
Measurements were done with
systemctl show --all | grep UserspaceTimestampMonotonic
, which is whatsystemd-analyze
uses as the zero point for its own measurements.Before:
After:
Terms of contribution:
By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.