Awn

overall high memory consumption

Bug #539736 reported by Marco Leise
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Awn
Confirmed
Medium
Unassigned

Bug Description

This is no bug report, but when awn + applets reached 400 MB memory consumption I thought it's worth a request anyway. I have 2 GB system RAM and thus awn is going close to using 20% of that. Now I wonder if something can be done about that.
First of all my awn python processes use 35 to 41 MB memory. Is that unusual? If yes then maybe some setting in python could help, that I don't know about. Second the stacks applet framework in case of 'Stacks Plugger' is spawning a new process for every volume icon. On a 1 TB USB disk with 8 partitions that sums up to 355 MB alone for me.

Some random ideas I had are:
1. reduce python process footprint through whatever is possible (includes? parameters?)
2. have stacks plugin keep children in it's own process
3. keep delimiters in the main process (40 MB for no functionality)
4. configuration option to keep all python plugin code in one process, with a hint that bug reports are invalid with this option
In addition to the work I see some problems with my ideas 2/3/4:
- one applet could crash others
- memory leaks cannot be tracked down to the right applet
- untrusted applets could probably spy on each other if there is no way to prohibit this in python

The gnome applets are using several MB each as well, I know. They often combine functionality though so additional applets are not required. Drive Mount keeps all volume icons in process. The load monitor may show up to 6 criteria. The clock includes an appointment overview as well as a brief weather report. That's not intended to be a fair comparison, I just liked to point out that one cannot say "gnome applet = awn applet".

------------------------------------------
Distribution: Gentoo Linux
Installation: from source (ebuild) with USE="gnome -debug -doc -vala -xfce"
Awn version: 0.3.2.1
Window manager: Compiz
Video card: nVidia GeForce 8600 M, nVidia binary drivers 190.53
------------------------------------------

Revision history for this message
Marco Leise (marco-leise) wrote :
Revision history for this message
Michal Hruby (mhr3) wrote :

> First of all my awn python processes use 35 to 41 MB memory. Is that unusual?

Yes, typically Awn's python processes use 12-20 MB of memory. As you said the biggest problem will be the plugger applet, so perhaps it would be a good idea to replace it with something else. (File-browser-launcher in awn-extras 0.3.9 can display mounted volumes, so I'd suggest that).

Changed in awn:
status: New → Incomplete
Revision history for this message
Marco Leise (marco-leise) wrote :

12-20 MB and no separate process for each volume would make me happy. I'm already using the File Browser Launcher and like it much. What I was looking for was a replacement for drivemount_applet2 in Gnome. Stacks can unmount volumes and offers a quick overview of what is still mounted before you disconnect that FAT32 USB-Stick before all data has been written. It is just convenience though, as it can be done from within Nautilus with some more clicks.

I am using Python version 2.6.4 on a 32-bit system. An empty program like
while True:
    a = 1
is using 2,7 MB memory.

Revision history for this message
moonbeam (rcryderman) wrote :

Basically, a awn python applet has a baseline memory usage here of 10.5 MB, a vala applet 3.5, and C applets should be a bit lower or the same as vala. These results are relatively consistent between systems in my experience.

Running all python applets in one process has been discussed in the past and is probably feasible. With some issues that would follow of course.

Revision history for this message
Marco Leise (marco-leise) wrote :

Thank you for your input. I tried something yesterday: I recompiled all the packages that contain any executable or library that is loaded by any python program currently running; from python down to glibc. Additionally I added the --as-needed switch for the linker. I expected that to reduce the number of loaded libraries, and thus the amount of memory used.
Well the number of libraries did not change - if at all it increased probably to other programs running at the moment. But the memory footprint is now much better anyway: 20-24 MB. This is kinda esoteric to me. Was it the --as-needed flag? Did previous runs of the program lafilefixer or prelink mess things up?
I could not get down to 12-20 MB, but as soon as there is a good system-monitor for paranoid people like me that shows network traffic and memory use as well (like the multi-load-applet) and a slim drive-mount applet I will definitly replace that old edgy gnome-panel for good.
So this 'bug' has lost some of it's weight in in the end and I would only want to keep it open as a reminder to keep a sane ratio of resource use vs. functionality. ;-)

Povilas Kanapickas (p12)
Changed in awn:
importance: Undecided → Medium
status: Incomplete → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.