Maxed-out cpu usage

Maxed-out cpu usage

Post by stephe » Sat, 07 Sep 2002 08:08:38



I've been playing around with OpenGL for a little while now and I've noticed
that all the animated programs seem to max-out the CPU. For example,
rotating cube demos, and the simple game engine I'm currently working on.
Anything that uses a timer or OnIdle as a 'heartbeat'. This bothers me a
little. Anyone have any thoughts on this?

- stephen

 
 
 

Maxed-out cpu usage

Post by Lev Povalahe » Sat, 07 Sep 2002 08:39:59


If vsync is off this is normal behaviour. If vsync on it depends on a
driver. Good implementations will give the CPU time to other processes
while waiting for a vertical refresh. Bad implementation won't do that
and they will use all available CPU time.

The current NVIDIA detonator drivers on WinXP are a good implementation
in above terms. I can't say anything about other implementations.

Regards,
-Lev

stephen schrieb:

Quote:> I've been playing around with OpenGL for a little while now and I've noticed
> that all the animated programs seem to max-out the CPU. For example,
> rotating cube demos, and the simple game engine I'm currently working on.
> Anything that uses a timer or OnIdle as a 'heartbeat'. This bothers me a
> little. Anyone have any thoughts on this?

> - stephen


 
 
 

Maxed-out cpu usage

Post by zed » Sat, 07 Sep 2002 13:13:05



> I've been playing around with OpenGL for a little while now and I've noticed
> that all the animated programs seem to max-out the CPU. For example,
> rotating cube demos, and the simple game engine I'm currently working on.
> Anything that uses a timer or OnIdle as a 'heartbeat'. This bothers me a
> little. Anyone have any thoughts on this?

> - stephen

the problem lies in windows, theres a thread in www.opengl.org forums of
the technical reasons for it.
linux btw doesnt suffer from the same problem ie its normal there to see
opengl apps run at 1% cpu time!!!
 
 
 

Maxed-out cpu usage

Post by Gib Bogl » Sat, 07 Sep 2002 15:26:41




> > I've been playing around with OpenGL for a little while now and I've noticed
> > that all the animated programs seem to max-out the CPU. For example,
> > rotating cube demos, and the simple game engine I'm currently working on.
> > Anything that uses a timer or OnIdle as a 'heartbeat'. This bothers me a
> > little. Anyone have any thoughts on this?

> > - stephen

> the problem lies in windows, theres a thread in www.opengl.org forums of
> the technical reasons for it.
> linux btw doesnt suffer from the same problem ie its normal there to see
> opengl apps run at 1% cpu time!!!

Linux/X/OpenGL/nVidia cooks!
 
 
 

Maxed-out cpu usage

Post by Adam Har » Sat, 07 Sep 2002 20:20:50


Quote:> the problem lies in windows, theres a thread in www.opengl.org forums of
> the technical reasons for it.
> linux btw doesnt suffer from the same problem ie its normal there to see
> opengl apps run at 1% cpu time!!!

which forum, I can't seem to find it.

When i play counterstrike in XP, it only uses 50% CPU (vync on) - i thought
it was a driver issue, not OS. Ah well, i would like to read that thread

 
 
 

Maxed-out cpu usage

Post by Wolfgang Draxinge » Sat, 07 Sep 2002 20:28:22



> I've been playing around with OpenGL for a little while now and I've noticed
> that all the animated programs seem to max-out the CPU. For example,
> rotating cube demos, and the simple game engine I'm currently working on.
> Anything that uses a timer or OnIdle as a 'heartbeat'. This bothers me a
> little. Anyone have any thoughts on this?

> - stephen

You're fooled a bit by the CPU monitor. There's still enough CPU time
for other stuff. The problem is only, that Windows thinks, that your
program is working permanently and needs all avaliable resources. Just
include a Sleep(0) at the end of your message loop. That doesn't delay
your program, but makes windows measuring right.

--
+------------------------------------------------+
| +----------------+ WOLFGANG DRAXINGER          |
| | ,-.   DARKSTAR | lead programmer             |

| | `-' / GAMES /                                |
| +----+''''''''     http://www.darkstargames.de |
+------------------------------------------------+

 
 
 

Maxed-out cpu usage

Post by Adam Har » Sat, 07 Sep 2002 20:49:27


found a thread in linux group saying it's exactly same problem with linux!
Basically it doesn't do a thread block, but consistently checks for v-sync.
And they also indicate it's a driver issue, not OS.

oh, on further thought, prehaps Counterstrike does it's own timing. I
remember something like that in Q1 source.


Quote:> > the problem lies in windows, theres a thread in www.opengl.org forums of
> > the technical reasons for it.
> > linux btw doesnt suffer from the same problem ie its normal there to see
> > opengl apps run at 1% cpu time!!!

> which forum, I can't seem to find it.

> When i play counterstrike in XP, it only uses 50% CPU (vync on) - i
thought
> it was a driver issue, not OS. Ah well, i would like to read that thread

 
 
 

1. O2 High Cpu usage with lossless jpeg

Hi,
  I'm trying to playback high quality 1.0, lossless?, jpeg movies. I
have a process to display the data and another to read the compressed
frames and decompress them with dmic. The read and decompress process at
times uses 65% of the cpu on high quality movies (9MB/second) and about
30% with lower quality movies (3.5MB/second). I think alot of this time
is system as opposed to user time. This cpu usage seems high to me, does
anyone know why? Any ideas on how to reduce this?

Thanks,
Dave

2. computer graphic related links

3. PS7 pegs CPU usage at 100%

4. Lightwave 7 and version 6 book

5. PS6: 70 % CPU Usage for Cursor in Texttool ?!

6. Chordal Axis Transform

7. CPU USAGE

8. IRTC stills winners for Mar-Apr 1999

9. CPU usage with glui

10. CPU usage while rendering?

11. CPU usage in openGL application

12. Minimizing CPU/bus usage