Page 2 of 2

Re: cyclictest

Posted: Tue Jan 15, 2019 1:48 pm
by merlyn
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. :)

Re: cyclictest

Posted: Wed Jan 16, 2019 6:05 am
by merlyn
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

Re: cyclictest

Posted: Wed Jan 16, 2019 12:14 pm
by gimmeapill
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?

Re: cyclictest

Posted: Wed Jan 16, 2019 5:40 pm
by merlyn
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.

Re: cyclictest

Posted: Thu Jan 17, 2019 2:35 pm
by merlyn
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.

Re: cyclictest

Posted: Wed Mar 06, 2019 2:04 am
by pawan4749
# 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.

Re: cyclictest

Posted: Wed Mar 06, 2019 2:13 pm
by merlyn
Hi pawan4749. You need to install gnuplot. On ubuntu this would be

Code: Select all

sudo apt-get install gnuplot

Re: cyclictest

Posted: Thu Mar 07, 2019 7:39 am
by pawan4749
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

Re: cyclictest

Posted: Thu Mar 07, 2019 1:13 pm
by merlyn
What distro are you using?

Re: cyclictest

Posted: Sat Mar 09, 2019 7:36 am
by pawan4749
I'm using poky (Yocto)

Re: cyclictest

Posted: Sun Mar 10, 2019 2:56 pm
by merlyn
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.

Re: cyclictest

Posted: Mon Oct 07, 2019 1:15 pm
by pawan4749
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).

Re: cyclictest

Posted: Wed Oct 09, 2019 2:17 pm
by merlyn
I'm using :

Code: Select all

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

Re: cyclictest

Posted: Thu Oct 10, 2019 5:57 pm
by pawan4749
As I'm using -l loops as 100 million , so for histograms also using100 million

Re: cyclictest

Posted: Thu Oct 10, 2019 7:04 pm
by merlyn
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.