Re: actual weight of WMs



alexxx.magni@xxxxxxxxx writes:

I was thinking about switching to a light-weight WM, to alleviate the
load on my not-too-fast PC - I currently use KDE under FC5.

Good idea.


I wanted to investigate a question, though: where does the lower load
comes from?

You've turned the question around, the question should be 'Where does
the higher load of KDE/Gnome come from?' - this is not nitpicking, we
don't have to accept KDE as the norm.

I ask because it seems to me that if I use, say, IceWM, all my
KDE/Gnome apps still work without problem, the libraries are still
there, right?

Right, not only that, there's also quite a number of helper-processes
started, see below.

So the lower load comes from ... what? kdeinit? But how much does it
weight in terms of CPU/memory? Do you know some statistics where these
things are actually measured?


OK, so I decided to run some tests, here's my system:

CPU: Pentium II MMX, 400 MHz, 128M ram.
Debian etch, newly updated, kernel version 2.6.16.

This is what 'top' told me when I've started X without most
extensions and with sithwm, the lean, mean window manager.
Sorted on resident memory use:

Mem: 127164k total, 41908k used, 85256k free, 3780k buffers
Swap: 144576k total, 0k used, 144576k free, 23244k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
4484 root 5 -10 24872 5700 2708 S 0.0 4.5 0:05.78 Xorg
4443 root 16 0 8592 2524 2088 S 0.0 2.0 0:00.10 sshd
4445 olr 16 0 8592 1564 1120 R 0.0 1.2 0:00.04 sshd
4485 olr 16 0 2512 1092 860 S 0.0 0.9 0:00.05 sithwm


So I started an applications, the abiword word processor - on a
relatively small file:

Mem: 127164k total, 66956k used, 60208k free, 6180k buffers
Swap: 144576k total, 0k used, 144576k free, 40660k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
4513 olr 15 0 26476 15m 10m S 0.0 12.3 0:06.17 abiword
4484 root 5 -10 25820 6788 3620 S 0.0 5.3 0:07.14 Xorg
4537 root 17 0 8592 2520 2088 S 0.0 2.0 0:00.09 sshd
4539 olr 16 0 8752 1580 1124 S 0.3 1.2 0:00.01 sshd
4485 olr 16 0 2512 1152 920 S 0.0 0.9 0:00.07 sithwm

abiword starts up reasonably fast, and works great.


Then I started ooffice, this takes some time, and its rather
Cpu-intensive - and there's this silly splash screen.

Mem: 127164k total, 124732k used, 2432k free, 1364k buffers
Swap: 144576k total, 84k used, 144492k free, 76912k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
4634 olr 15 0 145m 58m 34m S 0.0 47.4 0:15.99 soffice.bin
4513 olr 15 0 27108 16m 11m S 0.0 13.4 0:09.05 abiword
4484 root 5 -10 26052 7168 3724 S 0.0 5.6 0:20.72 Xorg
4555 root 17 0 8592 2524 2088 S 0.0 2.0 0:00.08 sshd
4557 olr 16 0 8752 1580 1124 R 0.0 1.2 0:00.13 sshd
4624 olr 16 0 2956 1420 960 S 0.0 1.1 0:00.04 soffice
4485 olr 15 0 2512 1152 920 S 0.0 0.9 0:00.13 sithwm

So - that's about it, once started ooffice would work reasonably fast,
and as you can see we're still not starved for memory.


OK then, on to the KDE stuff, kword should do the same thing as
abiword, kind of revealing though: there was no kword on this system
so I had to install it first:

Mem: 127164k total, 97752k used, 29412k free, 7196k buffers
Swap: 144576k total, 84k used, 144492k free, 57116k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
5264 olr 15 0 45932 30m 22m S 0.0 24.8 0:29.64 kword
5273 olr 16 0 26700 10m 8852 S 0.0 8.5 0:00.72 kded
4484 root 5 -10 27044 8220 2992 S 0.0 6.5 0:39.25 Xorg
5271 olr 16 0 24692 8024 6864 S 0.0 6.3 0:00.05 klauncher
5266 olr 17 0 23960 7888 6300 S 0.0 6.2 0:00.51 kdeinit
5276 olr 18 0 24236 7720 6056 S 0.0 6.1 0:00.04 kio_file
5269 olr 16 0 23416 6764 5624 S 0.0 5.3 0:00.05 dcopserver
5188 root 18 0 8592 2520 2088 S 0.0 2.0 0:00.08 sshd
5190 olr 16 0 8752 1580 1124 S 0.0 1.2 0:00.33 sshd
5160 olr 16 0 2508 1152 920 S 0.0 0.9 0:00.18 sithwm

So there's definitively an overhead from the extra processes started,
kword took quite some time to start, and as you can see - there's a
number of hang-around processes, e.g. 'klauncher' ... does it need
eight MBs to launch kde applications?
kword took a long time to start, and there's a lot of disk-accesses.

On the upside it is quite responsive once it has started, and starting
other kde applications don-t add much overhead.



So, lets run the entire KDE thing, I killed sithwm and ran startkde on
the running X-server expecting the applications to survive as they
would usually do on restart of the WM. No such luck, they got killed.
When I started them again there was this annoying animation stuck to
the mouse pointer, all my attempts to shake it off failed :-) The fact
that it looked a bit odd without the XShape extension made it funny
though. The observant reader will notice that the X server has been
restarted (for other reasons).

Mem: 127164k total, 117820k used, 9344k free, 6524k buffers
Swap: 144576k total, 264k used, 144312k free, 60988k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
5839 olr 15 0 44688 27m 19m S 0.0 22.0 0:21.61 kword
5840 olr 16 0 42396 23m 17m S 0.0 19.2 0:10.35 kspread
5830 olr 15 0 30952 14m 11m S 0.0 11.8 0:03.11 kicker
5828 olr 16 0 29304 14m 11m S 0.0 11.3 0:01.36 kdesktop
5818 olr 15 0 28820 13m 10m S 0.0 10.5 0:02.94 kded
5848 olr 16 0 28948 12m 10m S 0.0 10.4 0:02.18 korgac
5847 olr 15 0 32740 12m 9872 S 0.0 10.0 0:00.45 knotify
5826 olr 16 0 26264 11m 9808 S 0.0 9.5 0:01.89 kwin
5843 olr 16 0 25476 10m 8852 S 0.0 8.6 0:00.36 klipper
5740 root 5 -10 28608 9700 2924 S 0.0 7.6 0:08.21 Xorg
5825 olr 16 0 24620 9548 7608 S 0.0 7.5 0:00.23 ksmserver
5837 olr 16 0 24496 9284 7380 S 0.0 7.3 0:00.22 kaccess
5816 olr 16 0 24832 8324 7068 S 0.0 6.5 0:00.17 klauncher
5831 olr 16 0 24236 7384 5728 S 0.0 5.8 0:00.05 kio_file
5811 olr 17 0 23960 7340 5728 S 0.0 5.8 0:00.56 kdeinit
5835 olr 15 0 21296 7260 5268 S 0.0 5.7 0:00.95 artsd
5814 olr 15 0 23416 2784 1604 S 0.0 2.2 0:00.15 dcopserver
5850 root 16 0 8592 2524 2088 S 0.0 2.0 0:00.09 sshd
5852 olr 16 0 8752 1584 1124 S 0.0 1.2 0:00.03 sshd
5764 olr 16 0 2956 1404 952 S 0.0 1.1 0:00.43 startkde


KDE took around 40 seconds to start up, the applications around 8
seconds, with a similar amount of time to load the data. Even the
internal menus appeared to work slower, as if the WM somehow
interfered, but was still acceptable. Note: I've started kspread, the
KDE spreadsheet program too.

At this point we can answer the OP's question, Yes, running the entire
KDE desktop uses more resources than just running single applications
in an other environment, and you can see above why - more
processes, more memory used.



By now I was getting a bit upset, where was that sluggish behemoth I'd
been expecting?, this was a bit to good to be true, so I started
firefox, and again; slow startup, reasonably fast operation, in ~30
seconds I had thedailywtf.com up and running. Desperate now - I
started ooffice, and - finally I had a system that would do a lot of
paging, once it all had started though, it would again work reasonably
well:


Mem: 127164k total, 124496k used, 2668k free, 368k buffers
Swap: 144576k total, 61732k used, 82844k free, 58528k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
4687 olr 15 0 176m 57m 34m S 0.0 46.1 0:27.18 soffice.bin
4667 olr 16 0 51432 13m 9540 S 0.0 11.1 0:19.12 kword
4664 olr 16 0 98736 13m 8040 S 0.0 11.0 0:18.48 firefox-bin
4661 olr 16 0 42460 10m 7948 S 0.0 8.4 0:12.83 kspread


I could switch between the applications without any significant amount
of paging taking place.

As a final experiment I tried to disable swap space and, not
surprisingly, the system would be much slower with a lot of paging
going on.

NOTE: throughout all these experiment I have not really worked the
applications a lot, "working reasonably well" in the above
experiments really means having menus pop reasonably fast. Operating
the applications for a longer time might bring about other results.


To sum up: Not surprisingly KDE applications are a bit more
heavyweight than abiword and gnumeric but could probably work
reasonably within 64 MB or so. Running the kde desktop require more
resources still, but works well within 128 MB. And from the last
experiments, a surprisingly large set of applications can run on
rather modest hardware and: do enable swap space.



--
... __o Øyvind
... _`\(, http://www.darkside.no/olr/
... (_)/(_) ... biciclare necesse est ...
.



Relevant Pages

  • Re: actual weight of WMs
    ... load on my not-too-fast PC - I currently use KDE under FC5. ... PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND ... So - that's about it, once started ooffice would work reasonably fast, ... eight MBs to launch kde applications? ...
    (alt.os.linux)
  • Re: Novell Desktop Linux 10: getting closer to a toss up between Linux & Windows?
    ... much about KDE or Gnome bogging things down. ... Qt applications) like for example the kernel xfonfig. ... the sake of upgrading, I'm saying that people shouldn't be limiting ... purchase cost. ...
    (comp.sys.ibm.pc.hardware.chips)
  • Re: GNOME new file selection dialogs
    ... while there are lots of GTK-based applications that don't ... has wide acceptance outside the KDE community. ... (which is not my main browser or file manager, ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". ...
    (Debian-User)
  • Re: [kde] detaching a (non-KDE) program window from a frozen KDE desktop
    ... What can I do to save work in non-KDE applications? ... Does there exist an other generic KDE way to tell other applications to ... As I wrote before it might be possible with a saved session. ... Can you check if just KDE is frozen, or if the X server stops responding? ...
    (KDE)
  • Re: What Dell notebook is best for Linux?
    ... > considered what a Pig the machine would be turned into by KDE and ... After all anything reasonably fast to run KDE ... Fundamentalism is fundamentally wrong. ...
    (comp.os.linux.portable)