]> rtime.felk.cvut.cz Git - lisovros/canprio_benchmark.git/blob - README
Added benchmarks performed on P4 on vcan device.
[lisovros/canprio_benchmark.git] / README
1 This folder contains results of benchmarks of canprio filter.
2
3 Test1 + Test2
4 =============
5 Output files of this two tests show time of execution of can_send() function
6 measured by Ftrace function tracer.
7
8 Main algorithm of benchmark consists of running "cangen" command (with 
9 different parameters) on different qdisc + filter configurations and 
10 measuring time of execution of function can_send().
11
12 Testing set of Test2 is identical to Test1 besides the delay between each
13 sent frame -- Test1 measures on packets sent in 1 ms interval while Test2
14 on packets sent in 0 ms interval.
15 Absolute times (for each single test) measured in Test1 and Test2 differ
16 in some constant value (cca 12 us), but the relative change in time among 
17 each single test in a set is in Test1 and Test2 quite the same.
18
19 Observations:
20 * Classification with canprio (measured on P4 CPU) has negligible overhead.
21 * Processing of EFF frames takes longer than of SFF frames.
22 * Storing SFF rules in bitmap leads to much quicker classification 
23   (difference grows with number of rules).
24 * Sending frames with "0 ms" delay leads to buffering them and storing into
25   device after some periode (unlike sending in 1 ms interval sends 
26   each frame separately -- i.e. communication with hardware because of each 
27   frame).
28
29
30 Test3 + Test4 + Test5
31 =====================
32 Test3, 4, 5 are similar to Test1 and 2 -- the only difference is 3, 4 and 5
33 were run on PPC CPU (MPC5200). Test3 makes statistics while cangen sends
34 packets in 0 ms interval, while Test4 is for packets sent in 1 ms interval.
35 In test4/sff_array/ftrace_sff_prio2.txt there are mostly two essential values
36 (second one is cca twice as big as the first one) which occur quite equally.
37 This behaviour can be caused by frequent invocation of some interrupt handler.
38 It can even be caused by CAN device sending data (in interrupt context).
39 Therefore Test5 was run on packets sent in 2 ms interval (above described
40 behaviour is no more observable.)
41
42
43
44 Note
45 ====
46 Simple command to calculate median value from ftrace measurements:
47
48 cd /test1/sff_array/
49 for X in $(ls *txt); do echo -n "${X}: "; cat ${X} | \
50 cut -d" " -f 4 | sort -n | \
51 awk '{arr[NR]=$1} END { if (NR%2==1) print arr[(NR+1)/2]; \
52 else print (arr[NR/2]+arr[NR/2+1])/2}'; done
53