LWN.net Logo

Xfce 4.4: The best lightweight desktop environment (Linux.com)

Xfce 4.4: The best lightweight desktop environment (Linux.com)

Posted Feb 21, 2007 19:23 UTC (Wed) by muwlgr (guest, #35359)
In reply to: Xfce 4.4: The best lightweight desktop environment (Linux.com) by drag
Parent article: Xfce 4.4: The best lightweight desktop environment (Linux.com)

Please also check and specify if you have 'multiScroll' set to 'true' in your xterm resources. This should speed things up.

As I see there is quite an speed race between various x-terminals developers. In Gnome 2.14, gnome-terminal had been sped up greatly. But it is also worth to note that this speed-up is mostly for local case (X client and server both on the same host). xterm as lower-level X application is said to have more stable performance being run over the network.


(Log in to post comments)

Xfce 4.4: The best lightweight desktop environment (Linux.com)

Posted Feb 22, 2007 8:02 UTC (Thu) by drag (subscriber, #31333) [Link]

cool. I like fast x terminals. Used to be these things would bring a machine to it's knees.

I am using PowerPC 1.2ghz G4 with ATI 9200 DRI/XAA drivers.

The
time python -c "print 'a'*10000000"
microbenchmark

With Gnome-terminal:
real 0m19.088s
user 0m0.059s
sys 0m0.382s

With Xterm:
real 0m24.315s
user 0m0.052s
sys 0m0.364

I tried the tables thing by sticking:
xterm*multiScroll: on

in .Xresources file. But it didn't seem to make any difference.

Now with remote X it was pretty bizzare.

This is going over ssh on a internet connection with a 45KB/s connection between both hosts.
ssh -X remote-host gnome-terminal

I ran:
time python -c "print 'a'*10000000"
real 0m5.861s
user 0m0.016s
sys 0m0.068s

!!! that's bizzare.

Then I tried my first microbenchmark which was run find on my home directory
find ./

First time I ran it I got 1minute 23 seconds. But second time I ran it I got:
real 0m28.653s
user 0m0.584s
sys 0m1.480s

And the 3rd time was exactly the same.

Just so you know...
time find ./ |wc
133705 151271 10996476

real 0m19.248s
user 0m1.444s
sys 0m0.812s

(which I suppose is why the python command is much better, eh?)

Now with:

user 0m0.052s
sys 0m0.364

I tried the tables thing by sticking:
xterm*multiScroll: on

in .Xresources file. But it didn't seem to make any difference.

Now with remote X it was pretty bizzare.

This is going over ssh on a internet connection with a 45KB/s connection between both hosts.
ssh -X remote-host gnome-terminal

I ran:
time python -c "print 'a'*10000000"
real 0m5.861s
user 0m0.016s
sys 0m0.068s

!!! that's bizzare.

Then I tried my first microbenchmark which was run find on my home directory
find ./

First time I ran it I got 1minute 23 seconds. But second time I ran it I got:
real 0m28.653s
user 0m0.584s
sys 0m1.480s

And the 3rd time was exactly the same.

Just so you know...
time find ./ |wc
133705 151271 10996476

real 0m19.248s
user 0m1.444s
sys 0m0.812s

(which I suppose is why the python command is much better, eh?)

Now with:
ssh -X remote-host xterm

real 9m3.364s
user 0m0.020s
sys 0m0.048

!!!

That's over 9 minutes for xterm versus 5 _seconds_ for gnome-terminal.

And I was watching the bandwidth usage. It got a solid 42-46 KB/s the entire time. There was only a disconnect for about 6 seconds.

time find ./
real 14m37.836s
user 0m0.464s
sys 0m1.100s

That's 15 minutes for Xterm vs 25 seconds for Gnome-terminal.

That's bizzare. The Gnome folks are nailing some sort of optimization in their libraries for this. Are they incorporating NX optimizations or something?

I am sorry, but this is hilarious. Completely unexpected.
Comparing Gnome-terminal vs Xterm over a slow network connection is like watch Gozilla vs Methuselah (in his later days) in a no-hold-barred cage fight.

To be fair I tried
ssh -XC remote-host xterm

The python command gave me this:
real 0m22.725s
user 0m0.020s
sys 0m0.088s

So compression helps a lot.

The find ./ game me this
real 1m30.950s
user 0m0.464s
sys 0m1.140s

So I tried it with gnome-terminal and compression:

The python command:
real 0m5.912s
user 0m0.016s
sys 0m0.088s

the find command:
real 0m24.609s
user 0m0.512s
sys 0m1.460s

So not that much of a difference, for gnome-teminal.

So I figure I don't want any disk I/O limits to limit performance.
So I mounted tmpfs to /mnt
and went:
find ./ > /mnt/cow

That created a 11meg file.

So with:
ssh -XC remote-host gnome-terminal

Then:
time cat /mnt/cow
real 0m7.314s
user 0m0.000s
sys 0m0.168s

With
ssh -XC remote-host xterm
real 1m18.927s
user 0m0.008s
sys 0m0.128s

Then for comparision the amount of time it takes to transfer the file.

time scp -C remote-host:/mnt/cow ./
cow 100% 10MB 488.1KB/s 00:22

real 0m27.538s
user 0m0.483s
sys 0m0.265s

Keep in mind that there was about 3-4 seconds before the command launched.

So Gnome-terminal is cheating. Cheating heavily. I don't dissaprove.

Is there a better benchmark? Or is this going to reflect real-world performance? I don't have any problem using either over the connection.

Xfce 4.4: The best lightweight desktop environment (Linux.com)

Posted Feb 22, 2007 8:08 UTC (Thu) by drag (subscriber, #31333) [Link]

Sorry for the very long post.

I won't do it again. It's absurdly long.

Xfce 4.4: The best lightweight desktop environment (Linux.com)

Posted Feb 24, 2007 20:06 UTC (Sat) by mikov (subscriber, #33179) [Link]

I did a few tests on my machine. gnome-terminal came out 2 times faster than xterm with the "python" test. konsole came out 30 times faster than xterm ! I am as surprised as you are.

As for starting time, xterm literally trumps them. From this test (time seq 1 18 |while read i;do xterm -e ls ;done) I have:

xterm - 2.723s
gnome-terminal - 11.137s
konsole - 15.590s

In all cases I had another instance already open.

Xfce 4.4: The best lightweight desktop environment (Linux.com)

Posted Mar 1, 2007 11:19 UTC (Thu) by azverkan (guest, #41051) [Link]

Give multi-gnome-terminal a try.

It's nearly as fast as xterm, but with support for tabs.

Xfce 4.4: The best lightweight desktop environment (Linux.com)

Posted Feb 23, 2007 6:48 UTC (Fri) by muwlgr (guest, #35359) [Link]

May be gnome-terminal does more aggressive "perceptive" optimizations. i.e. it buffers everything until network becomes ready, or until its application calls "read" from the pty. Which xterm does not and so loses, unfortunately.
It could be understood that on slower networks gnome-terminal could be even faster since it has to update its window less frequently than in local case.
Weird, indeed. But anyway, these optimizations do not seem to be a "rocket science" and I think it should not be hard to repeat them in xterm.
Should Dickey wish it :>

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds