nV News Forums

 
 

nV News Forums (http://www.nvnews.net/vbulletin/index.php)
-   NVIDIA Linux (http://www.nvnews.net/vbulletin/forumdisplay.php?f=14)
-   -   Excessive Xorg CPU usage while running CUDA apps (http://www.nvnews.net/vbulletin/showthread.php?t=168827)

microchip 11-18-11 08:27 AM

Excessive Xorg CPU usage while running CUDA apps
 
Hi,

I'm running a GT 440 on a server which crunches for various BOINC projects that offer CUDA work. With recent drivers and Xorg, I've noticed an excessive CPU usage (+90%) by the Xorg server and I suspect the NV driver being at fault here. Specifically when running Milkyway@home, "top" reports ~95% CPU usage by X. Previously X CPU usage used to be between 10 and 20% but after upgrading the OS to a newer version (with newer Xorg as well) this started to happen. My Xorg package is version 7.6 and I'm on openSUSE 12.1 (64-bit)

To give a summary about CPU usage by project while crunching CUDA tasks

- Milkyway@home: 100% of one core + 95% of X
- Einstein@home: 23% of one CPU core + 10% of X
- PrimeGrid: 6% of one CPU core + 30% of X
- GPUGRID: 70% of one CPU core + 80% of X

Any idea if I can do something to lower the CPU usage by X ?

Thanks

microchip 11-21-11 11:55 AM

Re: Excessive Xorg CPU usage while running CUDA apps
 
bump

gilboa 01-03-12 01:13 AM

Re: Excessive Xorg CPU usage while running CUDA apps
 
Seeing the same. When Milky-way uses CUDA, X becomes unbearably slow (aside from eating 100% CPU).
As a result, pending a solution to this problem, I've disabled GPU usage within BOINC across the board.

- Gilboa

Plagman 01-03-12 02:37 PM

Re: Excessive Xorg CPU usage while running CUDA apps
 
Are you running the CUDA apps from a terminal emulator displaying through X, or remotely?

microchip 01-03-12 03:02 PM

Re: Excessive Xorg CPU usage while running CUDA apps
 
I run them locally on the server, which BOINC starts them. For now, I've disabled X acceleration with "Accel False" in xorg.conf. As it is a server, I don't really need X but it's easier for managing things. I run a very lightweight WM on it (IceWM)

I've seen reports stating that an older driver version from the 260 and 270 series does not have that issue but I have not used these versions to confirm.

Plagman 01-03-12 03:32 PM

Re: Excessive Xorg CPU usage while running CUDA apps
 
That's pretty much what the option is for. CUDA stresses the GPU in ways not really compatible with using it interactively, so having a dedicated compute GPU or disabling GPU acceleration is the way to go if you still want to use X interactively.

AaronP 01-03-12 04:11 PM

Re: Excessive Xorg CPU usage while running CUDA apps
 
I agree. Speculating wildly, it's possible that something IceWM is doing was previously unaccelerated and is now performed on the GPU. Normally that would be an improvement, but if the GPU is bogged down running compute work it might end up slower.

gilboa 01-05-12 12:18 AM

Re: Excessive Xorg CPU usage while running CUDA apps
 
My setup is rather simple (see DEV machine in my signature).
BOINC is running in a headless (DISPLAY=) account, while I'm logged in running KDE WM.
My question is rather simple: Why am I seeing Xorg eating so much CPU? (even when kwin/KDE are idle).
Is it normal GL context operations being bogged down in some kind of busy loop, while the drivers struggles to schedule their request within the stream of BOINC processing?
I'm no GL expect (not even close), but shouldn't X requests simply sleep until the GPU can schedule them? (As opposed to spinning at 100% CPU?)

... What I'm trying to gather is: Is it a X bug? KDE? nVidia drivers?

- Gilboa

jcornwall 01-05-12 10:08 AM

Re: Excessive Xorg CPU usage while running CUDA apps
 
I don't know if it's related to your problem, but the application has some control over CUDA host activity.

See e.g. cudaDeviceSetFlags and corresponding flags to cuCtxCreate.

microchip 01-05-12 01:44 PM

Re: Excessive Xorg CPU usage while running CUDA apps
 
Quote:

Originally Posted by AaronP (Post 2516514)
I agree. Speculating wildly, it's possible that something IceWM is doing was previously unaccelerated and is now performed on the GPU. Normally that would be an improvement, but if the GPU is bogged down running compute work it might end up slower.

Hi,

I don't think IceWM is at fault here. Previously I was running Window Maker and had the same experience. Even if I'm not logged in in the WM, X is really using a lot of CPU time while doing CUDA work. This was previously not the case as I mentioned in my first post. X used to use a max of 30% of CPU time on my previous version of openSUSE which was 11.3. After upgrading to 12.1, X started to consume a lot. The only way I was able to stop this is by completely turning Accel off which gives you a very slow experience in any WM (but this is not an issue for me)


All times are GMT -5. The time now is 11:47 AM.

Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.