Open idnovic opened 5 years ago
I want precached to support flatpak and snaps as well, so thank you for your report! I will investigate this...
maybe create a plugin for this. Because the "normal" files used by flatpak are preloaded. Just not layered files. So the service and connector and libraries.
OK, I have looked into this: To make this work, precached needs to instantiate fanotify
watches on subordinate mounts in different mount-namespaces too, not just inside the root namespace.
precached did seem to show interest in this folder: /app/* (I had dropbox installed over flatpak running, strange part is before that precached never seemed to care about my flatpak apps)
I added the rule below to my config for now because I had unexplained high cpu usage #14 "/app/*/",
precached did seem to show interest in this folder: /app/*
Yes, these are paths used by flatpak "containerized" apps. But precached is currently unable to map the path inside of a mount namespace to the respective path outside of the mount namespace.
It seems that precached somehow got an fanotify
event for the /app
directory of a flatpak app.
I added the rule below to my config for now because I had unexplained high cpu usage
Has the high CPU usage problem been fixed by this change?
I am not sure yet. Let me try to reproduce it.
I just finished up a small prototype program in rust, that is able to monitor the /
filesystem for changes, and if it detects that an event originated in a different mount namespace, will use /proc/$pid/mountinfo
to map paths from inside the "container" to the outside namespace.
Confirmed to work with Flatpak, Snaps and Docker, etc. testing comming soon...
Well I did not view all of my 1600 precached files but it seems precached does not preload files of flatpaks.
Maybe that is because of the layering of the filesystem. I do not mind that just something what seems to happen.
I expect that snaps may have the same effect.