Minimizing memory usage. Why does icon-sender use more than 100 MiB of RAM?


While working on a minimized template and checking the memory usage, I noticed that the second most memory consuming process was /usr/lib/qubes/icon-sender which used more than 100 MiB of RAM. Considering the total used memory usage is less than 360 MiB, that seems significant for a minimal system.

AFAIK, this process, along with icon-receiver (running in dom0), is used for transferring of icon information between dom0 and domUs. Considering icons are very small data and there is nothing explicitly started, except a single xterm, why does this process use so much memory? Is it really too much or is my expectation unrealistic?

What memory reducing techniques do you use to lower memory consumption in minimal templates for the purpose of service qubes?

I think the simplest answer is “there’s Python for you”. In other words, the run-time penalty of coding in a bad programming language. Of course, this being “someone’s” choice which cannot be challenged.

Also note that the RES memory is much less than 100Mib, more like 28-32MiB. Still a lot for a piece of software dealing with icons, but not as bad.

I wouldn’t call Python language bad, it’s just memory and CPU inefficient. It’s good at some things, but not a using low resources :smiley:

1 Like

Fair enough :laughing:

OK. “Bad” Python. I don’t know if this could be optimized or how much effort it would be to translate it to C, so I guess it is what it is.

How do you minimize memory usage in minimal templates? What else can be done?

[irrelevant comment retracted]

use a modular kernel,

Is there such provided by dom0?

don’t use Fedora if you don’t need it.

I don’t. However, my experience shows that Fedora minimal uses less RAM than Debian minimal, although the latter is far smaller.

I also notice the AppVMs based on a particular template use about 90-100M more memory than the template itself. No idea why this is so.