CPU usage

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

CPU usage

rarum
This post has NOT been accepted by the mailing list yet.
Hello  i have little problem when  I run exaple osgScaleViewer or seqPly,eqPly , eqHello  than this program using my CPU on 100% . Only example eqAsync using my CPU on 15% which is OK . I using  MVS2010 . What I must change to reduce CPU using of this programs ....change thread model or ? I runs exaples on one computer with default config ....
Reply | Threaded
Open this post in threaded view
|

Re: CPU usage

Stefan Eilemann

On 12. Nov 2012, at 23:06, rarum [via Software] <[hidden email]> wrote:

> Hello  i have little problem when  I run exaple osgScaleViewer or seqPly,eqPly , eqHello  than this program using my CPU on 100%.

Do you have VSync enabled? From your problem description I guess not. This is a general OpenGL problem.

If you stop the camera, CPU usage should drop to 0% since eqPly is event-driven.


HTH,

Stefan.
Reply | Threaded
Open this post in threaded view
|

Re: CPU usage

rarum
This post has NOT been accepted by the mailing list yet.
so I make timer in osgScaleviewer I get 20 miliseconds per frame it is ~60 FPS ....and when I turn on statistics in OSG i see  about 60 FPS   I think other working thread making 100% on CPU  .....vsync is default on ? ( i read this in book  EQ WINDOW IATTR HINT SWAPSYNC deafult ON )    which thread I must sleep to reduce CPU using ?   I see on Config::handleEvent metod and this is working still independent of frame but when I put sleep into this metod than aplication work incorectly ....handling working bad and response for user input was delayed or none . How to set some working latency or ......?
Reply | Threaded
Open this post in threaded view
|

Re: CPU usage

Stefan Eilemann

On 13. Nov 2012, at 10:21, rarum [via Software] <[hidden email]> wrote:

> so I make timer in osgScaleviewer I get 20 miliseconds per frame it is ~60 FPS ....and when I turn on statistics in OSG i see  about 60 FPS   I think other working thread making 100% on CPU  .....vsync is default on ? ( i read this in book  EQ WINDOW IATTR HINT SWAPSYNC deafult ON )    which thread I must sleep to reduce CPU using ?   I see on Config::handleEvent metod and this is working still independent of frame but when I put sleep into this metod than aplication work incorectly ....handling working bad and response for user input was delayed or none . How to set some working latency or ......?

I don't know which thread is eating your CPU. You'll have to profile this yourself. Seems that a free-running render thread is not your issue.

The event handling is executed from the main loop, and blocking there is certainly a bad idea.


HTH,

Stefan.
Reply | Threaded
Open this post in threaded view
|

Re: CPU usage

rarum
This post has NOT been accepted by the mailing list yet.
Hello I solved problem with Eqalizer programs and Visual studio 2010 (with 100% load my CPU)
The problem is in openMP ....visual studio 2010 wrong interpretate source code ....so compier have some problem with openMP  (so microsoft :D )
I solved this by replacing compiler in visual studio with another compiler .....(intel compiler)  and I changed in project settings  intel language properities enable-> in openMp support -> Generate Parallel Code (/Qopenmp)
and all works fine ...  

procesor load max 30 %