PDA

View Full Version : 100% cpu use


chihowa
04-15-03, 02:30 PM
Hello,
I'm using a GeForce4 MX 440 (AGP) with driver 1.0-4349 on Debian Woody with a custom 2.4.20 kernel. The video BIOS version is 04.17.00.63.42, and I'm using a Athlon 1200 CPU in an Asus A7A266 motherboard.

My problem is that when I'm running glxgears, for example, its process takes up all of the available CPU time (FPS ~ 1000). This seems like my main CPU is doing the rendering and not the graphics card. I've tried running it as root and nothing changes.

Running glxinfo gives the info:
name of display: :0.0
display: :0 screen: 0
direct rendering: Yes
server glx vendor string: NVIDIA Corporation
server glx version string: 1.3
...
client glx vendor string: NVIDIA Corporation
client glx version string: 1.3
...
so it seems that everything is working ok.

Any suggestions?

Thanks in advance.

bwkaz
04-15-03, 04:19 PM
glxgears using a lot of CPU is normal. All the program does is dump as many frames as possible onto the video card. Your framerate is massively high, right? That's why your CPU is being used.

If the __GL_SYNC_TO_VBLANK implementation worked correctly (i.e. didn't busy-wait) -- which will only happen if the timer resolution on Intel gets a lot more fine-grained, but still -- then you could set that and get a much, much lower CPU usage percentage. Because the glxgears program would spend the vast majority of its time waiting for the vblank, instead of just dumping more frames onto the video card (that you can't see anyway, because your monitor does not display them).

adnans
04-15-03, 05:57 PM
If the __GL_SYNC_TO_VBLANK implementation worked correctly (i.e. didn't busy-wait) -- which will only happen if the timer resolution on Intel gets a lot more fine-grained, but still -- then you could set that and get a much, much lower CPU usage percentage. Because the glxgears program would spend the vast majority of its time waiting for the vblank, instead of just dumping more frames onto the video card (that you can't see anyway, because your monitor does not display them).

The bad news is that even if you sync to vblank the application will still use lots of CPU cycles because the GL lib uses polling to detect the vblank signal. I hope NVidia 'fixes' this soon, if it's fixable that is. Anyone from NVidia like to comment on this?

Thanks,
adnans

Andy Mecham
04-15-03, 06:47 PM
It's being worked on.

--andy

dlyne
07-25-03, 03:07 PM
Good to hear!