LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-03-2013, 11:26 AM   #1
Gullible Jones
Member
 
Registered: Apr 2011
Posts: 142

Rep: Reputation: 10
How much difference in performance can a window manager make?


I've noticed for a while that Fluxbox is actually kind of slow in most distros. Things like window redraws are clearly visible on a Fluxbox desktop, on my Pentium Dual laptop. For a while I ascribed this to slow GTK themes. It's a little annoying, but not bad enough that I can't deal with it on a modern computer.

Recently though I tried compiling Fluxbox from source. On a whim I tried some heavily optimized CXXFLAGS (-O3 -march=native -fomit-frame-pointer); and on logging into my new desktop I was surprised to find that the sluggishness was gone. Window redraws in GTK programs were not visible any more, and there was less delay when starting new applications.

Thus my question: in terms of desktop responsiveness, how much does a window manager count?

e.g.

How much overhead, in terms of CPU cache use and function calls, does window manager code usually incur?

Should the window manager have any effect on widget redraw delays when moving, resizing, or uncovering a window? Or on how long it takes for popup menus to appear?

In general, in what operations other than the drawing of window frames, etc. can a window manager incur additional latency?
 
Old 11-03-2013, 02:28 PM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,292

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
It counts in 2 ways:
If it is bloatware, talking to itself more than actually doing anything, it can slow you down a lot. I am thinking kde, and increasingly gnome.
If it is poorly coded you may lose somewhat. I have found little gained by tuning compiles - perhaps that has something to do with the cpus I buy :-).

Slackware offered xfce as a low cholesterol window manager. I was instantly sold on it.
 
Old 11-03-2013, 09:25 PM   #3
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,324
Blog Entries: 28

Rep: Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142
Fluxbox is lighter than XFCE. XFCE is a desktop environment; Fluxbox is a window manager.

When I first switched from KDE to XFCE to Fluxbox (mumble) years ago, I noticed a significant difference because of Fluxbox's relative lightness. Since then, Fluxbox has been my default choice for a window manager, though lately I've been having fun with E17.

Gullible Jones, what are the specs of your computer? I have never encountered the symptoms you've described with Fluxbox.

By the way, here's what top reports on this computer; you'll see that Flux is using minimal resources; swisswatch uses more:

Code:
Tasks: 126 total,   1 running, 125 sleeping,   0 stopped,   0 zombie
%Cpu(s): 14.1 us,  3.1 sy,  0.0 ni, 79.8 id,  3.1 wa,  0.0 hi,  0.0 si,  0.0 st
KiB Mem:   3373156 total,  2869732 used,   503424 free,   257792 buffers
KiB Swap:  2650688 total,    27124 used,  2623564 free,  1463052 cached

  PID USER      PR  NI  VIRT  RES  SHR S  %CPU %MEM    TIME+  COMMAND           
31207 [username]  20   0  664m 572m  26m S   2.7 17.4  55:04.19 opera             
 3987 [username]  20   0  4256 1232 1124 S   1.3  0.0 637:34.03 swisswatch        
23763 [username]  20   0  173m  11m 8316 S   1.3  0.3   0:04.64 gnome-terminal    
 2460 root      20   0 65380 4304 3132 S   0.3  0.1   2:57.64 avgd              
 3981 [username]  20   0 13020 5536 3780 S   0.3  0.2   1:28.79 fluxbox  
(snip)
This computer, by the way, serves primarily as my file server, though I use it while reading LQ while I watch old movies on the one next to it, over there ---------------------------->

The last time I rebooted it was for a kernel upgrade:

Code:
~$ uptime
 22:33:56 up 32 days,  1:39,  2 users,  load average: 0.00, 0.06, 0.15

Last edited by frankbell; 11-03-2013 at 09:31 PM.
 
Old 11-04-2013, 11:40 AM   #4
Germany_chris
Senior Member
 
Registered: Jun 2011
Location: NOVA
Distribution: Debian 12
Posts: 1,071

Rep: Reputation: 497Reputation: 497Reputation: 497Reputation: 497Reputation: 497
I've found fluxbox a bit slower than openbox but if I were doing anything other than watching it I don't think I'd notice.
 
Old 11-05-2013, 10:30 AM   #5
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Debian
Posts: 6,142

Rep: Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314
Window managers are not always lighter than desktops. My records show Xfce on SalineOS and ZevenOS slightly lighter than Openbox on CrunchBang and SalentOS. In fact, the differences between distros can be huge: with Xfce, Fedora uses twice as much RAM as ZevenOS. The one wm that seems consistently light is Ice.
 
Old 11-05-2013, 11:59 AM   #6
JWJones
Senior Member
 
Registered: Jun 2009
Posts: 1,444

Rep: Reputation: 709Reputation: 709Reputation: 709Reputation: 709Reputation: 709Reputation: 709Reputation: 709
On my ThinkPad T61 (Slackware 64-bit), I've noticed no appreciable performance gain from using fluxbox vs. xfce. RAM usage is about 40MB less or so, idling, in fluxbox, but performance is about the same.

Having said that, I increasingly spend most of my time in no-X framebuffer sessions, which of course blows away all DEs and WMs in terms of performance and RAM usage.

Last edited by JWJones; 11-05-2013 at 12:23 PM.
 
Old 11-05-2013, 03:57 PM   #7
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,982

Rep: Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625
Video mode may be important too. Try it in VESA maybe? Should let the card do most of the work.
 
Old 11-06-2013, 02:09 PM   #8
selfprogrammed
Member
 
Registered: Jan 2010
Location: Minnesota, USA
Distribution: Slackware 13.37, 14.2, 15.0
Posts: 635

Rep: Reputation: 154Reputation: 154
I have used KDE (from slackware) on machines from a 166MHz to a 1.6GHz Athlon, and it is getting slower. On another machine I set up, with 1.3Ghz, KDE was intolerable and I have to use xfce4. I have had battles with the new security library KDE now requires (but xfce4 does not). Similar problems could be affecting your use of Fluxbox.

A visible update delay is not normal and for a manager it must be considered that it is in some distress somewhere. Most probable is a busy wait, with a timeout.

Any program can get into performance wasting busy waits, error recovery loops, and use inefficient interfaces. They may be due to configuration, missing libraries, or just having to use generic code and generic routines. All these things are affected by a custom compile. Even a default font that does not exist will be a problem when the code must discover this with every window manager draw.

Consider error recovery, missing libraries, busy waiting for unavailable devices, etc...
Look at the console that starts Fluxbox for any interesting messages. Does it shutdown cleanly or have have complaints about missing handlers ??
If you do not start Fluxbox from a console, then consider starting without a graphical interface and start Fluxbox from a console to see the feedback.
Slowdowns could be something like background file searching, self starting applications, music programs that you don't know are running (because they only minimize to the bar), and you must configure any add-ons to be less obnoxious.

When you make a custom compile, there is usually a configuration to what libraries and interfaces you have. You get an executable that has best code for your actual processor, which can include using advanced instruction sets (which can impact graphics handling).
It can detect the lack of a library, so it can remove some code and remove attempts to use that library. It might have changed some code from a generic poll to some other more efficient interface. Check in the compile directory for a compile configuration file and see what it detected and configured.

Actual drawing is handled by the X11 video drivers, which are not a part of Fluxbox.
Always consider that you might have changing drivers, or settings, during experimentation and have forgot about it.

Last edited by selfprogrammed; 11-06-2013 at 02:42 PM.
 
Old 11-06-2013, 03:40 PM   #9
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941
(heh ...)

I rather suspect that these folks know that they are ultimately competing with Win-doze, which ... on a very good day(!) ... could not "out-perform" a paper (... airline, barf ...) bag.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Make Compiz Default Window Manager \/4A Linux - Desktop 2 09-09-2013 01:15 AM
How to make system boot up into window manager-less X session? browny_amiga Linux - General 10 01-04-2011 10:44 AM
how to make a custom minimalistic DE/window manager? dirtysoap Linux - Software 2 10-05-2010 09:24 PM
difference between a desktop and a window manager user222 Linux - General 6 11-09-2004 05:18 PM
Difference between Window Manager and Desktop Environment glock19 Linux - General 1 01-22-2002 02:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration