Re: Query regarding 2.6.335 RT and Non-RT performance

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



:
>
> Hello All,
>
>     I created a very simple program which has higher priority than normal tasks and runs a tight loop. Under same test environment I ran this program on both non-rt and rt 2.6.33.5 kernel.  To my suprise I see that performance of non-RT kernel is better than RT. non-RT kernel took 3 sec and 366156 usec while RT kernel took about 3 sec and 418011 usec.Can someone please explain why the performance of non-rt kernel is better than rt kernel? From the face of the test result, I feel RT has more overhead,Is there any configuration that I could do to bring down the overhead?
>
> Processor:
> ----------------
> processor       : 0
> cpu             : 7448
> clock           : 996.000000MHz
> revision        : 2.2 (pvr 8004 0202)
> bogomips        : 83.10
> processor       : 1
> cpu             : 7448
> clock           : 996.000000MHz
> revision        : 2.2 (pvr 8004 0202)
> bogomips        : 83.10
>
> CFS optimization:
> --------------------------
> # cat /proc/sys/kernel/sched_rt_runtime_us
> 1000000
> # cat /proc/sys/kernel/sched_rt_period_us
> 1000000
> # cat /proc/sys/kernel/sched_compat_yield
> 1
>
> Test Program:
> ---------------------
>
> main()
> {
>
>     int sched_rr_min,sched_rr_max;
>     struct sched_param scheduling_parameters;
>     struct timeval tv,late_tv;
>     suseconds_t usec_diff,avg_usec = 0;
>     time_t sec_diff, avg_sec = 0;
>     int i;
>     long count = 1;
>
>     sched_rr_min = sched_get_priority_min(SCHED_RR);
>     sched_rr_max = sched_get_priority_max(SCHED_RR);
>     scheduling_parameters.sched_priority = sched_rr_min+4;
>     sched_setscheduler(0, SCHED_RR, &scheduling_parameters);// Run the process with the given priority
>
>     for(i = 0 ; i < 150 ; i++) {
>        gettimeofday(&tv, NULL);
>        while(count > 0){
>         //printf(".");
>         count++;
>        }
>        gettimeofday(&late_tv, NULL);
>        count = 1;
>        sec_diff = (late_tv.tv_sec - tv.tv_sec);
>        avg_sec += sec_diff;
>        usec_diff = ( (late_tv.tv_usec > tv.tv_usec) ? (late_tv.tv_usec - tv.tv_usec) : ( tv.tv_usec - late_tv.tv_usec));
>        avg_usec += usec_diff;
>        printf("Iteration #%d sec %x usec %x\n",i,(sec_diff),(usec_diff));
>     }
>        printf("Average of #%d sec %x usec %x\n",i,(avg_sec/i),(avg_usec)/i);
> }
>
> Partial Result of non-rt kernel:
> -------------------------------------------
>
> Iteration #140 sec 3 usec 3aef8
> Iteration #141 sec 3 usec 3aefe
> Iteration #142 sec 3 usec 3aee4
> Iteration #143 sec 4 usec b935b  [Why there is this periodic bump ??] [Scheduler at work??]
> Iteration #144 sec 3 usec 3aef2
> Iteration #145 sec 3 usec 3aef0
> Iteration #146 sec 3 usec 3aef4
> Iteration #147 sec 4 usec b934b
> Iteration #148 sec 3 usec 3aeed
> Iteration #149 sec 3 usec 3aef9
>
> Partial Result of rt kernel:
> -------------------------------------------
> Iteration #135 sec 3 usec 47328
> Iteration #136 sec 4 usec ac4fd
> Iteration #137 sec 3 usec 48b0b
> Iteration #138 sec 3 usec 4738c
> Iteration #139 sec 4 usec ac4d5
> Iteration #140 sec 3 usec 483cb
> Iteration #141 sec 3 usec 48500
> Iteration #142 sec 4 usec acc49
> Iteration #143 sec 3 usec 47c1f
> Iteration #144 sec 3 usec 478c2
> Iteration #145 sec 3 usec 47e48
> Iteration #146 sec 4 usec ac9b5
> Iteration #147 sec 3 usec 48de4
> Iteration #148 sec 3 usec 46fbe
> Iteration #149 sec 4 usec ac52e
> Average of #150 sec 3 usec 660db
>
> Thanks,
> Mani
>
>
>
>


--
Thanks,
Manik

Think twice about a tree before you take a printout
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux