Skip to contentSkip to conversation

Paradox communication delay

Xenomai Franz Engel 2 participants 2 messages Feb 21, 2014

lore
Share & tools
lore
#0 lore raw

Hi,

I made a little benchmark of the communication performance of my system (with Rtnet). Therefore I use an external Data Analyzer (Anritsu) and measure the delay between each telegram. I tried to send every 4ms. Pseudo code:

while(true):

ret=sendto(...)

sleep(4ms)

endwhile

I make this test two times. One time with a totally unstressed system. That means I isolated the specific core, where my real-time task is working, and there are no other running programs. The result is that the mean delay of my communication was 0,004003518.

For the second test I stressed my system with "taskset -c 0-11 stress --cpu 12" (that means each core is working with 100%). Now I have the funny effect, that the result of the second test is better than the first one. In the second test I have an mean delay of 0,004000951. That means, the mean delay of the stressed system is 2.567 micro seconds faster than the unstressed system.

Does somebody have an idea what could be the reason for this phenomenon?

Regards,

franz

#1 lore raw
Quoted 7 lines · Franz Engel

Hi,

I made a little benchmark of the communication performance of my system (with Rtnet). Therefore I use an external Data Analyzer (Anritsu) and measure the delay between each telegram. I tried to send every 4ms. Pseudo code:

Quoted 7 lines

while(true):

ret=sendto(...)

sleep(4ms)

endwhile

If you really want to send a message every 4ms, this is not what you should do. What you should do is either use an absolute delay, or make the task periodic. Otherwise, the errors will add-up.

Quoted 6 lines

I make this test two times. One time with a totally unstressed system. That means I isolated the specific core, where my real-time task is working, and there are no other running programs. The result is that the mean delay of my communication was 0,004003518.

Quoted 8 lines

For the second test I stressed my system with "taskset -c 0-11 stress --cpu 12" (that means each core is working with 100%). Now I have the funny effect, that the result of the second test is better than the first one. In the second test I have an mean delay of 0,004000951. That means, the mean delay of the stressed system is 2.567 micro seconds faster than the unstressed system.

Does somebody have an idea what could be the reason for this phenomenon?

Sounds like a problem with power management. Maybe C1E mode on recent intel processor?

Signature · 1 line
Gilles.