-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
Slow VM startup because of ballooning out unused memory pages #4736
Comments
If kernel package ships default-kernelopts-common.txt file, use that instead of hardcoded Linux-specific options. For Linux kernel it may include xen_scrub_pages=0 option, but only if initrd shipped with this kernel re-enable this option later. QubesOS/qubes-issues#4839 QubesOS/qubes-issues#4736
If kernel package ships default-kernelopts-common.txt file, use that instead of hardcoded Linux-specific options. For Linux kernel it may include xen_scrub_pages=0 option, but only if initrd shipped with this kernel re-enable this option later. QubesOS/qubes-issues#4839 QubesOS/qubes-issues#4736
If kernel package ships default-kernelopts-common.txt file, use that instead of hardcoded Linux-specific options. For Linux kernel it may include xen_scrub_pages=0 option, but only if initrd shipped with this kernel re-enable this option later. QubesOS/qubes-issues#4839 QubesOS/qubes-issues#4736
…tions Default kernel options like root= or plymouth.enable are specific to the kernel package (and initrd bundled with it). Start migrating away from built-in defaults in core-admin by adding a file in kernel package containing those options. Also, if new enough initramfs is included, add xen_scrub_pages=0 which will speed up the domain start. QubesOS/qubes-issues#4839 QubesOS/qubes-issues#4736
…tions Default kernel options like root= or plymouth.enable are specific to the kernel package (and initrd bundled with it). Start migrating away from built-in defaults in core-admin by adding a file in kernel package containing those options. Also, if new enough initramfs is included, add xen_scrub_pages=0 which will speed up the domain start. QubesOS/qubes-issues#4839 QubesOS/qubes-issues#4736 (cherry picked from commit 9cfa9a9)
I've noticed that VM startup and shutdown recently became extremely slow on my system: from <5s before to over 30s now, in some cases even longer (#2963 (comment)). I wonder if this could be the cause. |
Check |
(I've got a log from @andrewdavidwong) |
Ok, thanks. I'm not sure if my problem is the same as #2963. If not, let me know, and I can create a separate issue (so as not to hijack that one). |
This is done. |
Qubes OS version:
R4.0
Affected component(s):
kernel
Steps to reproduce the behavior:
memory
property much smaller thanmaxmem
. Default 400 / 4000 will do.Expected behavior:
Kernel startup almost instantaneously.
Actual behavior:
There is a delay, even before starting initramfs:
This is especially bad on DispVM start, which should be as fast as possible.
General notes:
This issue was initially discovered when debugging Qubes running in KVM (on OpenQA), where the effect was much worse, enough to cause startup timeout (60s). Problem and solution discussed here: https://markmail.org/thread/jlj4cxz5e33ile43
Applying this fix needs to be done carefully. There are two parts:
Applying only the first point but not the second could have bad security implications (leaking VM's memory into Xen or potentially other VMs). So, this needs to be done in a way guaranteeing either both points being applied or none. Applying only the second one is harmless (for example when the kernel is too old to support it).
There are two cases:
In both cases the same entity control both kernel command line and initramfs, so it shouldn't be that hard to handle dependencies between those two actions.
The text was updated successfully, but these errors were encountered: