-
-
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
Reduce memory usage of Fedora qubes #7028
Comments
I am running a Fedora qube that provides IPsec VPN services at 268MB. |
I have such additional fedora excludes: |
I'd rather not uninstall additional stuff, but this may be a good hint what to look for to disable in autostart. |
User process nm-applet appears to be running in all Linux VMs whether the VM is configuring hardware or not. Uses 80MB physical memory when not under paging pressure. Outside of a sys-net, does it serve other purposes that lower level processes aren't already handling? B |
@brendanhoar It does not. Also, to be fair, my firewall qube may be under significant paging pressure. |
The nm-applet use of significant RAM goes at least as far back to (non-minimal) fedora-29, where it's using 65MB. Fedora-29 is the earliest template I have installed on R4.0. RAM used seems to increase as fedora version increases. :) B |
Slimming templates is good. Also, there is/was RAM page deduplication (transparent page sharing) (if carefully considering side-channel implications) and page compression from Oracle included up to Xen 4.7-testing. |
tmem was way too complex to be security supported technology. It never went out of "experimental" stage, and there was only a single developer who understood its internals and quirks (who later stopped working on Xen, thus the feature was removed). And generally, various memory deduplication technologies are very risky in terms of side channels. |
Not only hide nm-applet, but not start it at all when there is no network manager. This reduces memory usage of a VM. QubesOS/qubes-issues#7028
Yuck. Thanks for the info. I saw the patches removed from the Linux kernel and the discussions there, but I didn't realize the whole implementation was like playing with mud. I don't understand throwing terrible code over the wall in order to publish a relatively trivial paper. Thoughtful, attack surfaces-mitigated dedupe and compression would be challenging, complicated, and interesting. |
A safer approach would be to share only data that is provided by dom0 and is strictly read-only, such as dom0-provided kernel and initramfs pages. |
? That doesn't make sense or provide any benefit.
…On Thu, Nov 11, 2021 at 3:46 AM Demi Marie Obenour ***@***.***> wrote:
A safer approach would be to share only data that is provided by dom0 and
is strictly read-only, such as dom0-provided kernel and initramfs pages.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#7028 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABWYMFUOEWRMVGLN6PXBKDULOGHDANCNFSM5HCGKNUA>
.
|
It does if the kernel and initramfs are provided by dom0: they can be mapped read-only into every qube that uses them, without any need for deduplication. |
Deduplicating initramfs this way is not very helpful, it's freed early in the boot process anyway. |
I think this issue is best addressed in the Xen project. I'm sorry I
brought it up. :)
…On Thu, Nov 11, 2021 at 5:26 PM Marek Marczykowski-Górecki < ***@***.***> wrote:
Deduplicating initramfs this way is not very helpful, it's freed early in
the boot process anyway.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#7028 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABWYMHTXF3KZ35PXVIKXFDULRGLTANCNFSM5HCGKNUA>
.
|
Not only hide nm-applet, but not start it at all when there is no network manager. This reduces memory usage of a VM. QubesOS/qubes-issues#7028
Thanks for asking! This should be addressed in some sort of FAQ; it is by no means obvious. |
Cross-linking some forum discussions directly linked to the need of increasing sys-net and sys-usb assigned memory for Fedora based service qubes, otherwise consistent weird issues happening:
This is an example of why deploying Qubes ISO as is requires end users to search for the same bugs over and over, and why OEM (or certified resellers) can't simply deploy Qubes OS with the defaults. Or requires OEM/Organizations to maintain an OEM disk image and clone on their fleet to reduce redundant support requests (and then cryptsetup-reencrypt, which is not perfect since some UUIDs and seeds won't be unique), and why... those issues should be fixed upstream instead. |
I suggest masking the following user services:
Also, PackageKit should default off outside of templates, and CUPS and systemd-resolved should be opt-in. |
@DemiMarie There are people who are using tracker directly as a search or indirectly via e.g a Music Player. |
In the past folks have suggested distributing and installing minimal templates in the ISO but IIRC that was rejected due to DVD space constraints. An alternative might be to, as part of install, clone the standard fedora-xx template, then script (salt?) some modifications (disable services, remove packages, other memory reduction changes, etc.) and name the clone something like fedora-xx-sys. Then use that for the sys-* components. B |
@kalkin Tracker could be made controllable via |
I think that tracker packages and services should be removed at least from minimal templates. I created the ticket here with reasons for this action: If user installs something manually that requires tracker (e.g. Nautilus) - it will be installed as dependency. |
How to file a helpful issue
The problem you're addressing (if any)
Recent Fedora versions (33, 34) require noticeably more RAM even when no application is running inside. For several qubes I have it at 700MB+, which reduce the number of qubes that can be started.
The solution you'd like
Review list of processes running inside and consider disabling by default some that are not needed - especially those irrelevant when running in a VM (various hardware support services for example).
The value to a user, and who that user might be
Smaller hardware requirements.
The text was updated successfully, but these errors were encountered: