You are not logged in.

#1 2011-12-03 02:17:30

penguin geek
Member
Registered: 2011-05-22
Posts: 9

CPU pegs at 100% with 3D apps

I have a GeForce 8800 GTS, and running the proprietary drivers. When I run Urban Terror (FPS game), I get a lot of lag. I did some tests with glxgears, and saw that my both CPU cores are pegging at 100%, and the 3D app I use is the one that is pegging according to top. I am not using an xorg.conf, just letting X set itself. Here is my xorg.log: http://pastie.org/2957867

Any suggestions on what to look for or try?

Offline

#2 2011-12-06 21:27:54

Darksoul71
Member
Registered: 2010-04-12
Posts: 319

Re: CPU pegs at 100% with 3D apps

Hm, sound pretty much as if you are running the OpenGL software stack.

Do a "glxinfo | grep OpenGL". If you are running hardware accelerated OpenGL you will most likely get an output similar to this:
>OpenGL vendor string: NVIDIA Corporation
>OpenGL renderer string: GeForce 9500 GT/PCI/SSE2
>OpenGL version string: 3.3.0 NVIDIA 280.13
>OpenGL shading language version string: 3.30 NVIDIA via Cg compiler

I am not shure if the NVidia driver is loaded without xorg.conf.

Check out the great arch wiki:
https://wiki.archlinux.org/index.php/Nvidia

Minimal configuration

To create a basic /etc/X11/xorg.conf, as root:

# vi /etc/X11/xorg.conf

And add the driver:

Section "Device"
   Identifier     "Device0"
   Driver         "nvidia"
   VendorName     "NVIDIA Corporation"
EndSection


My archlinux x86_64 host:
AMD E350 (2x1.6GHz) / 8GB DDR3 RAM / GeForce 9500GT (passive) / Arch running from 16GB USB Stick

Offline

#3 2011-12-06 22:03:43

penguin geek
Member
Registered: 2011-05-22
Posts: 9

Re: CPU pegs at 100% with 3D apps

Thanks for the suggestions Darksoul. Here is my glxgears/OpenGL output. First, you can see there is a ridiculous FPS return from glxgears.

[jbess@Scooter ~]$ glxgears
21874 frames in 5.0 seconds = 4374.720 FPS
35463 frames in 5.0 seconds = 7092.545 FPS
^C
XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":0"
      after 44 requests (44 known processed) with 0 events remaining.

[jbess@Scooter ~]$ glxinfo | grep OpenGL
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce 8800 GTS/PCI/SSE2/3DNOW!
OpenGL version string: 3.3.0 NVIDIA 290.10
OpenGL shading language version string: 3.30 NVIDIA via Cg compiler
OpenGL extensions:

I ran the nvidia-xconfig command, which added the Driver "nvidia" line to the xorg.conf file, and restarted X. There was no change, I still pegged my CPU.

Offline

#4 2011-12-07 06:29:39

Darksoul71
Member
Registered: 2010-04-12
Posts: 319

Re: CPU pegs at 100% with 3D apps

Hm, ok....from the glxinfo output you seem to be running the nvidia driver.

Sorry mate, I am out off ideas here. You might closely watch your logs (dmesg and so on) for any strange looking messages and google for them.

May be some issue with your version of Xorg, your desktop environment and the driver you use ?
You can also boot up from a live distribution which has 3D drivers integrated (Linux gamers DVD, Sabayon, Kanotix) and check out wether the issues still exists here.
If not then try to find out what is different compared to your arch system

Edit: You might also want to play around with the OpenGL settings of your card. May be some feature eats up CPU ?

HTH,
D$

Last edited by Darksoul71 (2011-12-07 06:35:53)


My archlinux x86_64 host:
AMD E350 (2x1.6GHz) / 8GB DDR3 RAM / GeForce 9500GT (passive) / Arch running from 16GB USB Stick

Offline

#5 2011-12-08 16:41:39

penguin geek
Member
Registered: 2011-05-22
Posts: 9

Re: CPU pegs at 100% with 3D apps

Well I started nvidia-settings, and checked the Sync to vBlank option under OpenGL Settings, and now my FPS are at 60 in glxgears, and my CPU is not maxed out. I still have some issue with Urban Terror having some lag, but it's not that big of a loss. Thanks for the suggestion DarkSoul!

Last edited by penguin geek (2011-12-08 16:42:17)

Offline

#6 2011-12-09 19:19:23

Darksoul71
Member
Registered: 2010-04-12
Posts: 319

Re: CPU pegs at 100% with 3D apps

Good to hear that something changed although I am unsure what was caused the CPU load.

-D$


My archlinux x86_64 host:
AMD E350 (2x1.6GHz) / 8GB DDR3 RAM / GeForce 9500GT (passive) / Arch running from 16GB USB Stick

Offline

#7 2011-12-09 19:27:29

MrCode
Member
Registered: 2010-02-06
Posts: 373

Re: CPU pegs at 100% with 3D apps

Good to hear that something changed although I am unsure what was caused the CPU load.

If VSync isn't enabled, then any OpenGL apps (unless explicitly configured to do otherwise) will try to push out as many frames as they can at a time.  This causes both high GPU load (because it has to render all the extra frames that you'll never see, since the display can only refresh so fast), and high CPU load (since it has to push out all those extra GL commands to the GPU).  Forcing VSync system-wide will force all OpenGL apps to only update their display when the monitor has finished refreshing and is about to start on a new image (the VBlank interval), effectively capping the frame rate to the refresh rate of your monitor, though unless you're using triple buffering, this can also have some nasty side-effects as well; see here and here for more details if you're interested.

Offline

#8 2011-12-09 19:34:11

penguin geek
Member
Registered: 2011-05-22
Posts: 9

Re: CPU pegs at 100% with 3D apps

Good to know MrCode. Thanks!

Offline

#9 2011-12-12 18:51:01

Darksoul71
Member
Registered: 2010-04-12
Posts: 319

Re: CPU pegs at 100% with 3D apps

Interesting...thanks MrCode...I never payed attention to this effect when disabling VSync.
May be mostly because I have nearly always VSync enabled ?


My archlinux x86_64 host:
AMD E350 (2x1.6GHz) / 8GB DDR3 RAM / GeForce 9500GT (passive) / Arch running from 16GB USB Stick

Offline

Board footer

Powered by FluxBB