> Hi all,
> 
> I am currently evaluating free real time distributions for Linux and would 
> like to know if anyone knows of some source code that can  benchmark RT 
> Linux in terms of latencies, context switches, process response times, 
> interrupt dispatch time, network performance (especially)......etc.
>
Its not exactly benchmarking but to say if a system can do the job for you 
I would say three essential values should be checked, all these values will
be highly platform specific, and will also depend on the peripheral devices
installed .

1) highest achivable frequency of a periodic scheduler task 
2) scheduling jitter of a system under high interrupt load
3) scheduling jitter of a system under high process load 
4) interrupt response time 
5) event resolution of the system.

1) to check the highest frequency of a periodic task you can simply use
   the paralellport toggle example and measur the frequency at which you
   can obtain a satisfactory signal on the parallel port. I guess its ok
   to require any hardware to have the quality of a parallelport but naturally
   if you use some realy rotten ISA-card then you could have problems reaching
   a high frequency. 

2) to measure this you simply can run rt_process from examples/measurements/
   and ping-flood the box via multiple ports (NIC/PLIP/SLIP links) and produce
   high interrupt rates on internal devicess (dd if=/dev/hda of=/dev/null does
   a good job...) 

3) again run rt_process.o from examples/measurements and load the box , drive
   it up to a load of 25-30 (ither launche lots of apps or take a littl loop
   and fork some dummy computation 30 times) something like:

---snip---

  for (i=0; i<load; i++){
    if (fork()==0){
        break;
        }
    }
    
  n=m=1;
  while(1){
    for(i=0;i<1000;i++){
        n=n*m; n/=m; n-=1; m+=1;
        }
    }
  return 0;
}
---snip---

with load set to 25 will drive the box up to a load of 25++ .

4) interrupt response time, measured at the parallel port, and this value
   might be lower for PCI cards but measuring it at the paralellport is easy 
   and gives you a safe "estimation" of the interrupt response of the given
   system.

5) event resolution, to get the event resolution you basically need to
   run a loop calling consecutive gethrtime(); and check the difference
   this will give you the actually measurable even resolution (the clocks
   will have higher resolution but the timestamp precision is only exact
   to the runtime of gethrtime()). It's brute force but it does the job ...

---snip---        
        /* measure the resolution of clock_gethrtime */ 
        rtl_no_interrupts(old_interrupt_status);
        for(i=0;i<1000;i++){
                now = clock_gethrtime(CLOCK_MONOTONIC);
                diff = ((clock_gethrtime(CLOCK_MONOTONIC)) - now);
                sum += diff;        
        }
        time_resolution = (sum / 1000); 
        rtl_restore_interrupts(old_interrupt_status);
        rtl_printf("Time resolution is something like: %d us\n", time_resolution);
---snip---        

concerning network performance, you would need to be more specific , are you 
talking about realtime network performance or about non-realtime performance
while running realtime tasks ?

to run the tests mentioned above without installing anything on the box you
can use minirtl (version2.3 is the latest though... 3.0 is a littl overdue
but should be out soon....)

hofrat
*------------------------------------------------------------------------*
*THERE           {__}                             FSMLabs                *
*IS              oo )                       The RTLinux Company          *
*LIFE           O_   `_-------.             Mc  Guire  Nicholas          *
*IN               (-.         ,-\                                        *
*THE               || )---<  )                [EMAIL PROTECTED]         *
*NET !             |||     | |           1privat: [EMAIL PROTECTED]       *
*                                    [EMAIL PROTECTED]      *
*------------------------------------------------------------------------*
*ASCII-COW (C) 1996-2001 [EMAIL PROTECTED]    http://www.hofr.at          *
*------------------------------------------------------------------------*
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/

Reply via email to