GNOME dependencies

Eero Tamminen oak at helsinkinet.fi
Thu Aug 16 19:04:47 UTC 2007


Hi,

On Thursday 09 August 2007, Jani Monoses wrote:
> Because it came up in the other thread, and also because I have been
> thinking about it lately:
>
> I started out with the 'no gnome dependencies' policy in addition to the
> no 'mono/java/kde' one because most apps were covered by GTK only
> alternatives and we had to have some kind of criteria.
>
> It is no doubt that having additional dependencies affect performance so
> while not very quantifiable it made sense to avoid those apps.
> The disadvantages of having gnome deps (or any extra deps for that
> matter) are: - size of packages on the CD (I have not looked at this
> lately, IIRC it was something along 20M or more, I may be wrong though)
> - installed size on disk (only a minor issue)
> - startup time - GNOME deps mean an additional 25 or so shared objects
> linked to the app, all of whic are processed at startup. The difference
> is noticable, especially slower CPUs.

Response time could be measured with something like this:
	http://projects.o-hand.com/xresponse


> - memory footprint - the same 
> shared objects, even if possibly shared with other apps consume extra
> RAM, IIRC between 500K and 2M per process using them.

It's not so bad.  Code is read-only so on memory pressure it can be
forgotten and paged back in from the disk.  The .data section is private,
but those are usually fairly small.  The actual allocations done when
the library is initialized use more.

However, any additional memory usage from an additional library
pales when compared to memory overhead from another always running
UI-process.  Memory-wise it's additional always-running processes that
should be avoided, not so much additional libraries (especially if the new
libraries are not used by always running processes).  Ubuntu (and therefore
Xubuntu) is getting worse in this respect.


> In case of long running processes these affect the memory used by the
> desktop permanently. In case of explicitely started apps the main
> drawback is the startup speed.

Exactly.


> I have been thinking lately about using even more GNOME apps in Xubuntu.
> Until now in the past cycles we picked evince, gnome-system-tools,
> gcalctool and some of the python tools specific to Ubuntu (update
> manager, restricted manager). All of these have been previously - and in
> collaboration with upstream - been made buildable with GTK only
> dependencies. There are some other in the queue for Gutsy if upstream
> GNOME accepts some patches.
>
> There are two problems with having separate GTK apps (not GNOME ones
> built without GNOME libs) - duplication of effort. We would be better off
> if some apps were comaintained with Ubuntu. - the GTK apps are usually
> less featureful and less actively maintained (ex: xfburn, xarchiver)
>
> So we would gain by starting to use some GNOME apps while keeping Xfce
> core obviously. But we'd give up some space on the CD (maybe not that
> bad) some memory and startup times. These will not help in making Xubuntu
> lighter. That characterization has only been true when compared to GNOME
> or KDE though, with python running in the base system (hplip daemon for
> HP printers ), firefox in the mix and the liveCD no longer installing
> iwth 128M it is not really a light distro anymore.

Is there any change of getting the Ubuntu base system smaller?
Or getting a lighter variant of it, for example by teaming with the Ubuntu
Mobile/Embedded?


> So we have a choice of keeping it like now, only small GTK only apps and
> let the user add whatever else she needs or start making a more complete
> and maintainable default at the cost of making it too heavy for some hw
> configurations.

In general the trivial optimization of whether an (not-always) running
application uses just Gtk or also Gnome are a gnat's piss compared to
overhead of just starting (& running) a full desktop like Xfce compared to
running just some (lightweight) windowing system like IceWM.

If GnomeVFS/Gconf/D-BUS/etc are not already running, the first startup
of an application using them is slower.


> And by this I do not mean CD size or startup time or even short term
> memory use, those will probably not make much of a difference but long
> running processes. Do we want gnome-power-manager and network-manager?
> IS Xubuntu widely used on laptops and wifi setups? Do we want
> update-notifier (I am sure we do). All these are continually running and
> each eats up somewhere around 3-4 megs of RAM.
>
> The printing applet which is the default since feisty is also always
> running and is a python app, 4-5 megs probably.

Normally only the private/dirty memory used by a process is really
significant.  You can get it for the whole system with something like:
cd /proc/; for pid in [0-9]*; do
  echo "$(awk '/Private_Dirty/{d+=$2}END{print d}'<$pid/smaps) kB: 
$(tr '\0' ' '<$pid/cmdline|cut -d' ' -f1)[$pid]";
done|sort -n; cd -

X is probably at the top, so you need also to check with xrestop which
X client is "hiding" its resource at the server side.


> From a developer perspective and long term the easiest would be to add in
> as many GNOME stuff as possible besides the Xfce core and thunar.
>
> What's best for most users we don't know. Some use Xubuntu because they
> like Xfce or hate the other desktops but they have powerful computers.
> Other are more sensible to changes in RAM usage.
>
> I would like to hear feedback from more people, more importanlty from
> those who deploy many Xubuntu's either in LTSP setups or preinstalled on
> old computers who have a better idea of what most people like dislike and
> would like to be changed. Personal opinions are ok as well but those are
> often far too biased.

On really old computer you don't install Xfce, it's too close in memory
usage to KDE and Gnome [1] as the plain desktop takes the memory you
would like to reserve for applications.  You install just a WM like IceWM. 
Slow startup is bearable, but if app takes more memory than you have,
it cannot be run at all.

So, the I'd say to go for the features, pick the lighter variant which uses
the Desktop libraries if it's mature and has the features most users care
about (e.g. Abiword instead of OO, Sylpheed instead of Thunderbird etc)
and avoiding additional always running processes.
- XFce supports in-process panel applets, those should be preferred to
  out-of-process applets.


	- Eero




More information about the xubuntu-devel mailing list