Skip to contentSkip to conversation

cyclictest - trouble explaning results

DISCUSSION Oleg Galimov 5 participants 6 messages Jun 11, 2008 – Jun 16, 2008

lore
Share & tools
lore
#0 lore raw

Hello all,

I use cyclictest as a benchmark for my diploma thesis. I have a strange behavior however, which I can't explain:

I have a dual-core cpu. When I run cyclictest on both cores and then start a time hog (like cp /dev/zero /dev/null), then the average latency on the core where it runs goes down significantly (on my machine it is like 30us before and 10us after, when using rt-patch). It returns to the original values, when I kill the cp process.

I have a similar behavior but less clearly visible with interbench.

The results appeared so far on 2.6.22, 2.6.22+rt, 2.6.25 and 2.6.25+rt.

I hope someone can help me explaining this.

Thank you,

Oleg Galimov

#1 lore raw

On Wed, Jun 11, 2008 at 05:14:37PM +0200, Oleg Galimov wrote:

| Hello all,
| 
| I use cyclictest as a benchmark for my diploma thesis. I have a strange
| behavior however, which I can't explain:
| 
| I have a dual-core cpu. When I run cyclictest on both cores and then
| start a time hog (like cp /dev/zero /dev/null), then the average latency on
| the core where it runs goes down significantly (on my machine it is like
| 30us before and 10us after, when using rt-patch). It returns to the
| original values, when I kill the cp process.

Are you using cpufreq or a similar tool?

Cyclictest is not CPU nor I/O intensive and depending on your settings for cpufreq, it may influence the results. Another good test is, along with disabling cpufreq, booting with idle=poll.

Luis

| I have a similar behavior but less clearly visible with interbench.
| 
| The results appeared so far on 2.6.22, 2.6.22+rt, 2.6.25 and 2.6.25+rt.
| 
| I hope someone can help me explaining this.
| 
| Thank you,
| 
| Oleg Galimov
| --
| To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
| the body of a message to [email protected]
| More majordomo info at  http://vger.kernel.org/majordomo-info.html

---end quoted text---

Signature · 2 lines
[ Luis Claudio R. Goncalves                    Bass - Gospel - RT ]
[ Fingerprint: 4FDD B8C4 3C59 34BD 8BE9  2696 7203 D980 A448 C8F8 ]
#2 lore raw
In reply to Oleg Galimov

Hello Oleg,

Quoted 4 lines · Oleg Galimov

I use cyclictest as a benchmark for my diploma thesis. I have a strange behavior however, which I can't explain:

I have a dual-core cpu. When I run cyclictest on both cores and then start a time hog (like cp /dev/zero /dev/null), then the average latency on the core where it runs goes down significantly (on my machine it is like 30us before and 10us after, when using rt-patch). It returns to the original values, when I kill the cp process.

Possibly, without the single-threaded 'time hog', your cyclictest threads maybe are scheduled across the two cores, resulting in increased (peak and average) latencies.

See if you can use the CPU affinity feature to fix each thread to a dedicated core, and see if this matters.

I'm quite sure cyclictest has an option for this, but please check.

Regards,

Signature · 1 line
Leon
#3 lore raw

Hello,

Quoted 3 lines · Leon Woestenberg

Possibly, without the single-threaded 'time hog', your cyclictest threads maybe are scheduled across the two cores, resulting in

stated more correctly: ...each of your cyclictest threads may be migrated between cores...

Signature · 1 line
Leon
#4 lore raw
In reply to Oleg Galimov
Quoted 1 line · Oleg Galimov <Galimov <at> gmx.de> writes:

I have a dual-core cpu. When I run cyclictest on both cores and then start a

time hog (like cp /dev/zero

Quoted 1 line

/dev/null), then the average latency on the core where it runs goes down

significantly (on my machine it is

Quoted 1 line

like 30us before and 10us after, when using rt-patch). It returns to the

original values, when I kill the cp process.

I made a similar observation while measuring the jitter in the time of execution of usleep(). The more load the machine has the less becomes the average jitter. Of course, there is a point of inflection when the system is fully stretched.

I observed this behavior on a ppc405 based embedded system (no SMP) with and without CONFIG_PREEMPT_RT. Interestingly enough, I was unable to reproduce your observation with the cyclictest tool on this system.

Regards,
Jens Wirth

#5 lore raw
Quoted 14 lines · Jens Wirth
Quoted 1 line · Oleg Galimov <Galimov <at> gmx.de> writes:

I have a dual-core cpu. When I run cyclictest on both cores and then start a

time hog (like cp /dev/zero

Quoted 1 line

/dev/null), then the average latency on the core where it runs goes down

significantly (on my machine it is

Quoted 1 line

like 30us before and 10us after, when using rt-patch). It returns to the

original values, when I kill the cp process.

I made a similar observation while measuring the jitter in the time of execution of usleep(). The more load the machine has the less becomes the average jitter. Of course, there is a point of inflection when the system is fully stretched.

Quoted 4 lines

I observed this behavior on a ppc405 based embedded system (no SMP) with and without CONFIG_PREEMPT_RT. Interestingly enough, I was unable to reproduce your observation with the cyclictest tool on this system.

I have to correct myself: When running multiple threads I get the same behavior as you described. Remarkably, this is a single core system with a fixed cpu frequency.

Jens