Reduce RAM usage

Board : Apalis iMX6 Quad 1GB
Build environment : Yocto Zeus
Kernel : 5.4

Hi,

I am using Apalis iMX6 Quad 1GB board with xwayland.
I have observe the 220MB RAM usage at starting without launching any application(using chromium).
I would like to reduce RAM consumption.
What could be the possible approaches to do that?

Hello,

Could you explain “using chromium?”

If you have launched the Chromium browser on target be glad it only took 220MB. Usually that is a multi-gig bundle of obesity.

Personally, with a target that has only 1GB of RAM, I would be spinning back to a much older version of Yocto torizon. One that is pre-Wayland/Weston. If you want minimal footprint with graphics and touch screen you want a pure X11 solution. NXP and others ripped out support for native X11 despite it being a robust, proven, mature technology. You might want to also look at this 2020 message thread.

You might also want to do a Web search using more than one engine for “embedded DOS.”

Most of today’s Yocto build versions strive to be all things to everyone, thus becoming “Big Fat Pig” releases. You can spend days stripping your Yocto build by commenting out/removing bitbake recipes of things you don’t think you need, but, if you are using Wayland/Weston, given all of the buffers it needs, don’t expect to peel any serious MB out of the memory footprint. The only way one could really do that, and I don’t know the specifics, would be to delve into the config and startup scripts for each module of it shrinking the default buffer sizes. You really need help from the Toradex people if you go down that route.

I haven’t been following the project for a while now. Judging from that link, to get rid of Wayland and return to pure X11 you will need an early Dunfell based LTS. You also need an official answer as I’m just thinking out loud on a Sunday. I also have some potential projects coming up that want to use 512MB or less targets (to increase battery life) and that means we would not be able to have the bloat of Wayland or even Docker.

The short answer is I’m very interested in the details of how you get around this.

People who want to build things like fanny pack infusion pumps

need a tiny OS and tiny RAM so the battery lasts 10 days or more on a single charge. They, whoever they are, keep wanting newer models to have touch screens for “ease of use”

image

but touch screens inhale battery like you and I do air.

Hi @seasoned_geek ,

Thanks for your reply.

I want to use dotnet app with Chromium. So, I just launched chromium before reading the memory consumption.

Wow!

I didn’t think Chromium could even start in under 2GB. It’s some of the most bloated software on the market. It creates hundreds, perhaps thousands of threads at startup “just in case” it needs them.

Hi @bhavanihimanshu,

Let us know if you need further more information on this or else we can mark this close.
Additionally I see you are using zeus branch which is no longer support. We suggest you to move to latest supported branch.

Best Regards
Ritesh Kumar