Debian 6.0: Fat, Fatter, Slim

Brad R Wednesday 25 May 2011 - 20:22:59  

A few days ago I mentioned Conky, the desktop system resource monitor. I'd been meaning to install this for some time, and did so after my upgrade to Debian 6.0 "Squeeze". And I was immediately alarmed to see that with only my web browser and email client open, I was using over 450 MB of RAM!

Now, partly this is due to my preferred web browser, Opera. Once upon a time Opera was lean and mean, but after my recent upgrade to Opera 11, I've noticed it's become quite the memory hog, typically using between 100 and 200 MB of RAM. But still, that didn't explain it all.

Enter Conky, which reported that Xorg (the graphical display server) was using over 17% of my 1GB available RAM...over 170 MB. And the first thing I thought of was KDE 4. So I decided it was time for some comparison tests. I decided to restart the X server, launch one of the installed desktop environments, open a solitary terminal window, and use "top" to display the biggest memory consumers.
Here's KDE 4:
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND            
 1954 root      20   0  194m 138m 3608 S  0.3 13.7   0:08.60 Xorg               

"RES" is the amount of physical RAM the task is using, in this case 138 MB, which is 13.7% of available memory (%MEM).

After installing Trinity (formerly known as KDE 3.5), I got a slightly better result:
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 1278 root      20   0  158m 112m 3580 S  3.6 11.2   0:06.56 Xorg

112 MB is better than 138 MB, but it's still too damned much.

Because of a long-ago installation mistake, I still had the Gnome desktop installed, so I tried that:
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND            
 2678 root      20   0 99.3m  52m 5236 S  3.3  5.2   0:07.32 Xorg               

And I noticed that Debian includes an absoultely-minimal window manager, TWM (Tiny Window Manager), which lived up to its name:
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 2678 root      20   0 82460  15m 3692 S  1.0  1.5   0:16.42 Xorg

Now that was reassuring: it told me that Xorg was not itself a memory hog, but rather the desktop environments that use Xorg were making wildly different demands.

Today I decided to install LXDE, the Lightweight X Desktop Environment, and run the test again:
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND            
 7963 root      20   0 84604  36m 4556 S  3.0  3.6   0:03.13 Xorg               


All of these tests were run on the exact same hardware, with the same Xorg.conf file. And here's a summary of the results:

KDE 4: 138 MB
Trinity: 112 MB
Gnome: 52 MB
LXDE: 36 MB
TWM: 15 MB

TWM is a bit too minimalistic for me to use as an everyday desktop, but LXDE seems to have the features I need. The default LXDE appearance will be familiar to anyone who has used Windows 95/98, and since I've never used Vista or Win7, I really don't care if my desktop has their glitz.

So, I've made LXDE my default desktop environment, and I'll be giving it a spin for the next week or so. Trinity was nice, but I really don't want that much overhead when I've got RAM-hungry applications to run.


printer friendly