Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Reducing CPU load while running xorg
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
chrisstankevitz
Guru
Guru


Joined: 14 Dec 2003
Posts: 472
Location: Santa Barbara, CA, USA

PostPosted: Fri Nov 04, 2011 5:24 pm    Post subject: Reducing CPU load while running xorg Reply with quote

Hi,

I'm running gnome with the nvidia driver. Please consider this case: I have multiple "workspaces" and can switch between them using hotkeys. I switch between two of them very quickly, back and forth. One has a chromium window, the other has a thunderbird window. While I am doing this, my CPU is pegged.

Question:

Can I offload this CPU load to the GPU?
Will installing compiz reduce my CPU load in this situation?
What can I do, besides installing the nvidia driver, to reduce the load on my CPU while running xorg?

My motivation is not to get more eye candy; I am motivated only by reducing the load on my CPU.

Thank you,

Chris
Back to top
View user's profile Send private message
tomtomp
Tux's lil' helper
Tux's lil' helper


Joined: 10 Oct 2011
Posts: 89

PostPosted: Fri Nov 04, 2011 5:43 pm    Post subject: Reply with quote

Not realy on topic but you can install fluxbox :)
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6779

PostPosted: Fri Nov 04, 2011 5:56 pm    Post subject: Reply with quote

When you switch workspaces without a compositing manager running, X has to tell all windows on the new workspace to redraw their contents. If you have a compositor installed (even a 2D one) then the window contents are always in memory and theoretically only need copying to the output buffer instead of re-rendering. The tradeoff is slightly more memory usage.

You might get better performance with the nouveau driver - proprietary drivers are usually abysmal at 2D accel.
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7466

PostPosted: Fri Nov 04, 2011 7:32 pm    Post subject: Reply with quote

You have some memory (or kernel config) troubles, even if nvidia drivers are crappy at 2D (i'm not saying they are, in fact, i'm not even thinking they are, but i didn't test nouveau, so i will just assume Ant P. is right when saying nouveau is better, even i don't think the proprietary drivers should be called abysmal), refreshing the screen should let your GPU do the work, only if you need to get back the applications status to refresh then your CPU might be in use, so more a lack of memory and need to get the applications back from swap should do that kind of issue (slow+high cpu load) or using a very low video memory videocard.
I own 4 desktops on big desktop with gnome, and 3D or not i don't get this kind of issue.
Back to top
View user's profile Send private message
chrisstankevitz
Guru
Guru


Joined: 14 Dec 2003
Posts: 472
Location: Santa Barbara, CA, USA

PostPosted: Fri Nov 04, 2011 10:48 pm    Post subject: Reply with quote

My machine is a brand new Dell m6600: a quad-core laptop, 2.3Ghz, with an Quadro 3000M with 2GB GDDR5. This is a kick-ass laptop.

I suspect my CPU is hogged when I switch desktops because:

- Some part of xorg is running on the CPU when it should be running on the CPU
- My CPU is being "slowed down" to save battery life
- some other reason I don't understand.

I'm still looking into it, but I thank you all for your comments.

Chris
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7466

PostPosted: Sat Nov 05, 2011 1:01 am    Post subject: Reply with quote

you might then suffer from optimus results, this stuff should totally disable (read poweroff) your video card and re-enable it when more power is need : on the desktop, card disable, swithing to another -> enabling the card : lag while waking up the card ?
(never own one, but it's the big lines i have (maybe mis)understood from optimus tech)
Back to top
View user's profile Send private message
chrisstankevitz
Guru
Guru


Joined: 14 Dec 2003
Posts: 472
Location: Santa Barbara, CA, USA

PostPosted: Sat Nov 05, 2011 3:43 am    Post subject: Reply with quote

Krinn,

Thank you for your help. I believe I have solved the mystery.

First, my "CPU hogging" problem happened because I powered on the laptop with a 100W power supply instead of the 200W power supply. A BIOS message warned me there could be dire consequences. One consequence was that the CPUs were placed into 800Mhz mode. I determined this was happening by running the GNOME applet "CPU Frequency Scaling Monitor". As soon as I powered up with the appropriate power supply, the problem went away

Second, yes my machine does indeed have "optimus"; however, I have disabled it in the BIOS.

And third, while the experiment in my OP is now running smoothly, I can't shake the nagging feeling that my xorg is not taking advantage of the latest and greatest GPU acceleration that I could be offering it. This is frustrating for me because I'm not sure where to find a 'definitive' guide on how to setup xorg. I'm happy to read all weekend long, I just don't know what to read. For now I've loaded the nvidia driver (need nvidia because I am doing CUDA programming) and I have enabled the "glx" module in xorg.conf. AntP's lesson about composting taking the redraw burden off of processes has not fallen on deaf ears though -- I plan to make this "upgrade" as soon as I figure out how (one gentoo page I found suggests a lot of unmasking is required).

Thank you again,

Chris
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum