GPU and CUDA lags machine

Hi folks! I’m stuck in making CUDA to work the way i think it must. I plan to use my box mostly for rendering and work with Blender. I brand a CUDA supported graphic card:

01:00.0 VGA compatible controller: NVIDIA Corporation GK107 [GeForce GT 640] (rev a1)

Now, the thing is, when i’m rendering entirely with the GPU, via Blender Cycles, i notice the rendering speed up almost 20x fast, but my machine starts to lag and freeze, instead of when i’m rendering with all my CPU cores. I’ve an AMD Fx 6100 with 8 Gb of RAM. I think it must be the other way around, my machine works very nice even when i’m rendering with all the CPU load, and on the other hand with GPU CUDA rendering that it lags my pc.

CUDA version:

community/cuda 5.0.35-3 [installed]
NVIDIA’s GPU programming toolkit


Blender 2.66 (sub 1)
build date: 2013-03-09
build time: 01:22:40
build revision: unknown
build platform: Linux
build type: Release
build c flags: -Wall -Wcast-align -Werror=declaration-after-statement -Werror=implicit-function-declaration -Werror=return-type -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts -Wno-unknown-pragmas -Wpointer-arith -Wunused-parameter -Wwrite-strings -Wlogical-op -Wundef -Winit-self -Wnonnull -Wmissing-include-dirs -Wno-div-by-zero -Wuninitialized -Wno-error=unused-but-set-variable -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -fopenmp -msse2 -msse -pipe -fPIC -funsigned-char -fno-strict-aliasing
build c++ flags: -Wall -Wno-invalid-offsetof -Wno-sign-compare -Wlogical-op -Winit-self -Wmissing-include-dirs -Wno-div-by-zero -Wuninitialized -Wundef -Wmissing-declarations -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -D__STDC_CONSTANT_MACROS -fopenmp -msse2 -msse -pipe -fPIC -funsigned-char -fno-strict-aliasing
build link flags: -Wl,–version-script=/build/src/blender-2.66a/source/creator/ -pthread
build system: CMake

Actually using the Con Koliva’s kernel and last NVIDIA driver

repo-ck/nvidia-ck-bulldozer 313.26-1 (ck-bulldozer) [installed]
NVIDIA drivers for linux-ck. AMD Bulldozer Family 15h microarchitecture optimized.

I’m thinking of downgrading the driver to 304xx, or i’m wrong and it’s normal to have that lag?

Thanks in advance!


I think main issue is that you are using the one GPU for both CUDA and display at the same time. CUDA devices cannot do preemptive multitasking, so while a CUDA kernel is running, the display cannot update (and vice versa). Depending on how long each CUDA kernel call is, this can lead to a lagging GUI interface. If you were to use your system for CUDA without a GUI display, you would not notice any lagging.

The best solution would be to have two GPUs: one for running and one for CUDA. The other solution is to make the CUDA kernel calls shorter, but that may not be in your control if you are using existing code.

I agree with seibert, you would be best served by another GPU to drive your display, assuming your developement system is not a laptop, in which case I’m not sure if there’s a solution.