Hi Robert,

What tool are you using to monitor and change affinity of the threads?
Its sounds something that would be useful.

A small program that I wrote myself. I attached to the email.

Also when I change the threading modes I don't see much difference in
the performance of cull and draw.


This suggests that performance bottleneck isn't pure CPU performance -
its may well be that memory bandwidth and latency is the bottleneck,
or the OpenGL fifo being filled and blocking things.  I don't think
the GPU itself will be bottleneck.

But why is there a performance difference between osgproducerviewer and osgviewer when other threading modes are used? Do you observe such a difference?

Monday I'll look into it again and make a more formal test using the paths to be sure that camera is in the same position. What threading model should I choose to make a fair comparison between osgproducerviewer and osgviewer?



Boy there is few extra options since I last updated drivers and
tweaked xorg.conf.


I have two graphics cards but SLI is disabled
and only one of the cards' outputs are used.


Using twin view on a dual card system is a bit of shame, unleash the
poor machine - configure it so that each card has a single ouput.
There are example configs up on the OSG wiki.

You can mix and match twin view and dual cards as well - I have four
cards in front of me for testing just this set up.   I haven't tried
it with osgViewer yet though...  Will post pics once I have.

All configurations except the current one had a problem. For the moment I just leave it as it is not to create more problems for myself.


Tugkan
#include <stdio.h>
#include <stdlib.h>
#include <sched.h>

#define SUSE9   
 


int main( int argc , char* argv[] )
{
        if ( argc < 2 )
        {
                printf("schedTool priority cpu[0,1,...] scheduler[0:SCHED_OTHER 
 1:FIFO 2:RR]\n");
                return -1;
        }
        
        int prio = atoi(argv[1]);
        int CPU = atoi( argv[2] );
        int scheduler = atoi( argv[3] );        
        
        for ( int i = 0 ; i < argc - 4 ; i++ )
        {
                int pid = atoi(argv[i+4]);
                printf("pid = %i\n" , pid );
        
                printf("Current scheduler %i\n" , sched_getscheduler(pid));
        
                sched_param param;
                param.sched_priority = prio;
                if ( sched_setscheduler( pid , scheduler, &param ) != 0 )
                {
                        perror("Scheduler change failed");
                }
                else
                {
                        printf("Scheduler changed to %i with priority %i \n" , 
sched_getscheduler(pid),prio);
                }


#ifdef SUSE9            
                cpu_set_t cpuSet;
                __CPU_ZERO( &cpuSet );
                __CPU_SET( CPU , &cpuSet );
                if ( sched_setaffinity( pid , sizeof(cpuSet) , &cpuSet ) != 0)
                {
                        perror("Affinity change failed");
                }
                else
                {
                        printf("CPU affinity set to %i\n" , CPU );
                }       
                        
#elif defined SUSE8
                unsigned long mask     = 0x01;
                mask <<= CPU;
                if ( sched_setaffinity(pid, sizeof(mask), &mask) != 0)
                {
                        perror("Affinity change failed");
                }
                else
                {
                        printf("CPU affinity set to %i\n" , CPU );
                }
#endif


                        
        }

        return 0;

} 
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to