cyclictest

Optimize your system for ultimate performance.

Moderators: khz, MattKingUSA

merlyn
Established Member
Posts: 489
Joined: Thu Oct 11, 2018 4:13 pm

Re: cyclictest

Postby merlyn » Tue Jan 15, 2019 1:48 pm

There's a new RT kernel 4.19.13-rt10-1-rt available and I tested it. The trend of gradual improvement is continuing.

4.19.13-rt10-1-rt #1 SMP PREEMPT RT.png

Again there's one rebellious core. :)
You do not have the required permissions to view the files attached to this post.

merlyn
Established Member
Posts: 489
Joined: Thu Oct 11, 2018 4:13 pm

Re: cyclictest

Postby merlyn » Wed Jan 16, 2019 6:05 am

And a new low latency kernel came out: 4.20.1-arch1-1-ARCH. Comparing this plot to the previous one shows the difference between low latency (this) and real time (previous).

4.20.1-arch1-1-ARCH #1 SMP PREEMPT.png
You do not have the required permissions to view the files attached to this post.

gimmeapill
Established Member
Posts: 546
Joined: Thu Mar 12, 2015 8:41 am

Re: cyclictest

Postby gimmeapill » Wed Jan 16, 2019 12:14 pm

Interesting results. Even at 540 us worst case latency the stock kernel does quite ok'ish for audio.
Regarding those RT results with one core acting up: did you try to run the RT cyclictest with 3 cores?
I'm wondering if sacrificing one core wouldn't actually help.
It could be also a matter of RT priorities stepping on each other's toes. Do you have something like rtirq enabled?

merlyn
Established Member
Posts: 489
Joined: Thu Oct 11, 2018 4:13 pm

Re: cyclictest

Postby merlyn » Wed Jan 16, 2019 5:40 pm

gimmeapill wrote:It could be also a matter of RT priorities stepping on each other's toes. Do you have something like rtirq enabled?


I do. rtirq behaves differently on Arch from on KXstudio. I have set RTIRQ_RESET_ALL=1 on both systems. On Arch I get this:

Code: Select all

★ /usr/bin/rtirq status

  PID CLS RTPRIO  NI PRI %CPU STAT COMMAND   
  353 FF      95   - 135  0.0 S    irq/20-snd_ice1   
   61 FF      50   -  90  0.0 S    irq/9-acpi   
  115 FF      50   -  90  0.0 S    irq/8-rtc0   
  176 FF      50   -  90  0.0 S    irq/17-ehci_hcd   
  188 FF      50   -  90  0.0 S    irq/19-ehci_hcd   
  189 FF      50   -  90  0.0 S    irq/14-pata_ati   
  190 FF      50   -  90  0.0 S    irq/15-pata_ati   
  194 FF      50   -  90  0.0 S    irq/24-ahci[000   
  206 FF      50   -  90  0.0 S    irq/16-ohci_hcd   
  222 FF      50   -  90  0.0 S    irq/16-ohci_hcd   
  223 FF      50   -  90  0.0 S    irq/18-ohci_hcd   
  224 FF      50   -  90  0.0 S    irq/18-ohci_hcd   
  225 FF      50   -  90  0.0 S    irq/18-ohci_hcd   
  349 FF      50   -  90  0.0 S    irq/19-snd_hda_   
  360 FF      50   -  90  0.0 S    irq/18-radeon   
  383 FF      50   -  90  0.0 S    irq/25-enp2s0   
    9 TS       -   0  19  0.0 S    ksoftirqd/0   
   27 TS       -   0  19  0.0 S    ksoftirqd/1   
   36 TS       -   0  19  0.0 S    ksoftirqd/2   
   45 TS       -   0  19  0.0 S    ksoftirqd/3   

On KX no irqs except the soundcard are on scheduler FF.

I've found that I only get a rogue core when JACK is started. That would make sense as both JACK and cyclictest have a high priority.

merlyn
Established Member
Posts: 489
Joined: Thu Oct 11, 2018 4:13 pm

Re: cyclictest

Postby merlyn » Thu Jan 17, 2019 2:35 pm

I ran mklatencyplot.bash again without JACK, and got this:

4.19.13-rt10-1-rt #1 SMP PREEMPT RT No JACK.png


That's a very low maximum latency. One core having a higher maximum latency than the others was due to JACK. I don't think the previous plots show a problem, because the maximum latency is still under the recommended 100us, even with hackbench running and two high priority threads (JACK and cyclictest) competing for a core. In normal audio use JACK wouldn't have to compete with other high priority threads like those used by cyclictest.
You do not have the required permissions to view the files attached to this post.

pawan4749
Established Member
Posts: 5
Joined: Wed Mar 06, 2019 1:56 am

Re: cyclictest

Postby pawan4749 » Wed Mar 06, 2019 2:04 am

# 8. Execute plot command
gnuplot -persist <plotcmd

I'm running the cyclictest but getting error as:
gnuplot: command not found

Any help please to overcome this.

merlyn
Established Member
Posts: 489
Joined: Thu Oct 11, 2018 4:13 pm

Re: cyclictest

Postby merlyn » Wed Mar 06, 2019 2:13 pm

Hi pawan4749. You need to install gnuplot. On ubuntu this would be

Code: Select all

sudo apt-get install gnuplot

pawan4749
Established Member
Posts: 5
Joined: Wed Mar 06, 2019 1:56 am

Re: cyclictest

Postby pawan4749 » Thu Mar 07, 2019 7:39 am

Hi Merlyn,
Thanks for your suggestion.
Im running cyclictest on rt-kernel image of 4.14.
sudo apt-get install gnuplot command is not working.
Results:
apt-get: Command not found

merlyn
Established Member
Posts: 489
Joined: Thu Oct 11, 2018 4:13 pm

Re: cyclictest

Postby merlyn » Thu Mar 07, 2019 1:13 pm

What distro are you using?

pawan4749
Established Member
Posts: 5
Joined: Wed Mar 06, 2019 1:56 am

Re: cyclictest

Postby pawan4749 » Sat Mar 09, 2019 7:36 am

I'm using poky (Yocto)

merlyn
Established Member
Posts: 489
Joined: Thu Oct 11, 2018 4:13 pm

Re: cyclictest

Postby merlyn » Sun Mar 10, 2019 2:56 pm

OK, that's a distro aimed at embedded systems? I'm not familiar with it. You managed to install rt-tests. Or did that come with the distro?

However you install software on your distro, use that method to install gnuplot. You may have to download the gnuplot source and compile it.

pawan4749
Established Member
Posts: 5
Joined: Wed Mar 06, 2019 1:56 am

Re: cyclictest

Postby pawan4749 » Mon Oct 07, 2019 1:15 pm

Hi
I have created python script for the cyclictest command "cyclictest -l100000000 -m -Sp90 -i200 -h100000000" and running on target through remotely (using ssh). But, it is taking abnormal time around 13 hrs, 15 hrs.
can any one please suggest what can be the reason(do executing script through ssh may have any effect).

merlyn
Established Member
Posts: 489
Joined: Thu Oct 11, 2018 4:13 pm

Re: cyclictest

Postby merlyn » Wed Oct 09, 2019 2:17 pm

I'm using :

Code: Select all

cyclictest -l100000000 -m -Sp90 -i200 -h400 -q
Why are you using a large value for -h?

pawan4749
Established Member
Posts: 5
Joined: Wed Mar 06, 2019 1:56 am

Re: cyclictest

Postby pawan4749 » Thu Oct 10, 2019 5:57 pm

As I'm using -l loops as 100 million , so for histograms also using100 million

merlyn
Established Member
Posts: 489
Joined: Thu Oct 11, 2018 4:13 pm

Re: cyclictest

Postby merlyn » Thu Oct 10, 2019 7:04 pm

That could be the problem. From the cyclictest manpage :

Code: Select all

 -h, --histogram=US
              Dump  latency  histogram to stdout after the run. US is the max
              latency time to be be tracked in microseconds. This option runs
              all threads at the same priority.

100000000 microseconds is 100 seconds.


Return to “System Tuning and Configuration”

Who is online

Users browsing this forum: No registered users and 1 guest