In my first article on the use of Flatpaks on Linux mobile devices, I tested the impact of Flatpaks on overall storage capacity. Now, in Part 2, I’m testing whether applications installed via Flatpaks use more or less RAM than the those installed from a traditional package repository.
Once again, I’m using the Moto G4 Play running pmOS and Phosh. I installed GNOME Usage via
sudo apk add gnome-usage to measure the RAM usage of each application. Here is a table of RAM usage for the applications installed in Part 1. This is the baseline RAM usage 15 to 30 seconds after the application has booted and is running idle in the background. Each application was tested one at a time. I tried to run them all at once but it crashed the phone. The Moto G4 Play has a total of 2GB of RAM.
|Application||Flatpak RAM Usage (MB)||Alpine Repository RAM Usage (MB)|
|Nautilus / Files||20||59|
|GNOME Maps||98 (Not in final tally)||Not Listed in Usage|
|OSM Scout Server||56||30|
|GNOME Weather||66 (Not in final tally)||Not Listed in Usage|
|GNOME Sound Recorder||53||49|
|GNOME Authenticator||Won’t Boot||47 (Not in final tally)|
|Total RAM Usage (17 Apps)||1117MB||749MB|
Some quick math will tell you that the use of 16 Flatpaks, over their Alpine repository alternatives, requires approximately 150% of the RAM. That may sound like small beans to someone running pmOS on a OnePlus6 with 8GB of available RAM. For other users of pmOS running older Android hardware like the Moto G4 Play with 2GB of RAM or the “high end” Librem 5 with 3GB of RAM, the unnecessary usage of 368MB of RAM is kind of a big deal. I should remind you that I wasn’t even using any of these applications, but they were only idling in the background.
One observation I made was that Flatpaks would often increase their RAM usage the longer I let them idle in the background. Instead of dropped a few MB or stabilizing after startup, some kept moving up by 2MB at a time until finally stabilizing after a minute or more.
A second observation which I found interesting is how some applications transferred relatively well over to Flatpak, such as MPV (38MB to 39MB) and Foliate (38MB to 41MB), while others were significantly less energy efficient, such as Newsflash (64MB to 163MB) and GNOME Web (86MB to 146MB). I’m sure the developers could speak to this in greater detail.
The conclusion I’m drawing from the results of Part 1 and Part 2 of The Flatpak Controversy is that Flatpaks are great; they are easy to build, widely available, and simple to control using Flatseal. For the moment, however, I can only recommend them for desktop and laptop computers with large storage media and plenty of RAM. Anyone hoping to daily drive a Linux phone today, unless it is a OnePlus 6 or similar device, should avoid Flatpaks unless the program they need is only available in that form (ie. Fragments for torrenting). Older Android phones, the Pinephone, and the Librem 5 lack the storage space and speed to comfortably run Flatpaks day in and day out.
Stay tuned for Part 3 of The Flatpak Controversy!