Re: Improving KDE Plasma Performance on Low-Resource Systems
Martin Steigerwald <[email protected]>
| Newsgroups | gmane.comp.kde.devel.general,gmane.comp.kde.devel.plasma,gmane.comp.kde.devel.plasma |
|---|---|
| Message-ID | <[email protected]> |
Greetings. Alexander Neundorf - 22.08.26, 12:51:35 CEST: > Also, maybe the web browser itself cannot do much about it, since it's > probably all the javascript running inside it. Agreed. Regarding quite some large so called modern web sites the web browser is basically the backdoor to load mostly proprietary¹ software onto client computers. But its not only that, web pages load large videos, even on the start page, sometimes with automatic start of play back of a video as a background of the page. They load images likes crazy and what not. That written, currently I have a foot print of about 5,5 GiB of memory usage with about 18 GiB of cache and buffers. That is for KMail + Akonadi with a enormous amount – as in easily more than a million - of mails, mostly stored locally, Baloo desktop search with an index over 700000 files, one Flatpak based messenger app which of course runs somewhat containerized and thus uses additional resources, Haruna media player with a Full-HD video, Dolphin and two FHD screens. IMHO that is not too bad. Sure I cannot claim 6 GiB of RAM would be comfortable for this workload, cause some caching is needed, maybe not as much when using flash based storage, but still. But then it is quite a luxurious setup. Content based indexing of more than 700000 files. Handling more than a million of mails with local search index. Using a Flatpak application. Baloo is a bit less than 530 MiB, the Flatpak based messenger app uses a bit more than 600 MiB and SQLite3 based Akonadi uses another around 260 MiB adding up all its processes – all values as PSIZE otherwise I would count libraries and other shared resources several times. That with several accounts including DAV for calender access. And I bet with some optimizations as noted below at least most of this could still run nicely enough within 8 GiB of RAM, given fast swapping onto and from flash based storage. And I am also pretty sure that Windows 2000 Server would not run this kind of workload within 1 GiB RAM. *Not even close.* Compared to that Plasmashell is about 385 MiB. But with three activities, with different background images. On the other hand I just loaded Firefox with 7 tabs, including two video platforms, a known one through Invidious proxy, and some image heavy pages. I am surprised it is "just" about 490 MiB. But I consider 7 tabs a light web browser workload and… I just started Firefox. It is not a long running browser session. Also this was with a browser profile that guards heavily against ads and all kinds of other modern nonsense on modern web pages. Including uBlock Origin which may easily reduce memory footprint quite a bit. And also if you just have 1 GiB of RAM about 500 MiB of RAM is a lot already. Of course Plasmashell is not the only kind of system like component, but this quick and probably still quite simplistic research shows: Lots of the RAM is consumed by apps, not Plasma itself. I believe there is quite some room for optimization on the user side – just to name a few: - Switch Baloo to filename based indexing and use KFind or ugrep to search for contents. - Make sure Akonadi uses SQLite3. - Drop using Flatpak applications, use distribution packages instead. - Be careful about what apps you choose to run. - Don't load high resolution images into desktop backgrounds. - Use a text-based browser or at least optimize your browser with add-ons like uBlock Origin. And if all of that plus the optimization measures you come up with is not enough, use LXQt or some other lighter desktop. That all written: Two other Plasma desktops on two devices with "just" 8 GiB of memory. Works well, including some light web browsing. Flash based storage. And granted… at least here you can buy an used laptop with 8 GiB for less than 200 Euro. I even see quite some offers for around 100 Euro. And that is for ThinkPad business-grade laptops. With SSD. Even in times of higher cost for flash and memory. And if you do not need a laptop form factor, you might even get by cheaper than that. However I accept that you will not be able to do this in every country and that in some countries 100 Euro would basically mean unaffordable to many. Still I wanted to bring this up to put things into some perspective. I bet even with 4 GiB of RAM with some care much can still be done in a productive way. Can Plasma and other KDE based core components use less memory? I am pretty sure they can. However… this requires more careful analysis and tedious optimization work than what developers and testers did so far. Sometimes there might be easy grabs – like probably not starting Akonadi migration agent in case it is not needed, which would give about 10 MiB –, but often enough it will be more elaborate work. I am sure some of that work is already done by individual and even group of developers. It would be nice to see more of that, but… someone needs to do the work. Especially as long as I am not pushing forward with that myself, I am grateful for anyone who does. But I also fully respect people using their often enough scarce free time as they see fit. And if optimizing for devices with 1 or 2 GiB of memory is not in their top 10 priorities, so it is. Also if people pay for targeted work on KDE components, they get to decide. As for donations I trust KDE to use them wisely. [1] Some building blocks of these applications might be free software, but in total it is often enough not transparent to the user what the software will actually do on their computer. And one can hope for the sand boxing mechanisms in browsers to be effective. Best, -- Martin