Re: [arch-proaudio] cyclictest
Hi Ralf, Here are my results with various versions of the RT kernel + latest stock: [root@pill-mobile4 gimmeapill]# cat /proc/cpuinfo | grep "model name" | uniq model name : Intel(R) Core(TM) i5-3317U CPU @ 1.70GHz Linux 4.9.40-rt30-1-rt [root@pill-mobile4 gimmeapill]# cyclictest -S -m -p98 # /dev/cpu_dma_latency set to 0us policy: fifo: loadavg: 0.10 0.06 0.02 1/161 470 T: 0 ( 463) P:98 I:1000 C: 57257 Min: 2 Act: 4 Avg: 4 Max: 12 T: 1 ( 464) P:98 I:1500 C: 38168 Min: 2 Act: 4 Avg: 4 Max: 11 T: 2 ( 465) P:98 I:2000 C: 28624 Min: 3 Act: 5 Avg: 4 Max: 12 T: 3 ( 466) P:98 I:2500 C: 22897 Min: 3 Act: 4 Avg: 4 Max: 11 Linux 4.11.12-rt14-1-rt [root@pill-mobile4 gimmeapill]# cyclictest -S -m -p98 # /dev/cpu_dma_latency set to 0us policy: fifo: loadavg: 0.02 0.02 0.00 1/210 573 T: 0 ( 570) P:98 I:1000 C: 47702 Min: 2 Act: 4 Avg: 3 Max: 13 T: 1 ( 571) P:98 I:1500 C: 31794 Min: 2 Act: 4 Avg: 3 Max: 12 T: 2 ( 572) P:98 I:2000 C: 23844 Min: 2 Act: 4 Avg: 3 Max: 10 T: 3 ( 573) P:98 I:2500 C: 19072 Min: 2 Act: 4 Avg: 4 Max: 13 Linux 4.14.6-rt7-1-rt [root@pill-mobile4 gimmeapill]# cyclictest -S -m -p98 # /dev/cpu_dma_latency set to 0us policy: fifo: loadavg: 0.10 0.06 0.02 1/161 521 T: 0 ( 515) P:98 I:1000 C: 50834 Min: 2 Act: 5 Avg: 3 Max: 14 T: 1 ( 516) P:98 I:1500 C: 33887 Min: 2 Act: 3 Avg: 3 Max: 15 T: 2 ( 517) P:98 I:2000 C: 25412 Min: 2 Act: 3 Avg: 3 Max: 14 T: 3 ( 518) P:98 I:2500 C: 20327 Min: 3 Act: 3 Avg: 4 Max: 14 Linux 4.14.7-1-ARCH [root@pill-mobile4 gimmeapill]# cyclictest -S -m -p98 # /dev/cpu_dma_latency set to 0us policy: fifo: loadavg: 0.13 0.08 0.03 1/139 492 T: 0 ( 489) P:98 I:1000 C: 27676 Min: 2 Act: 6 Avg: 3 Max: 16 T: 1 ( 490) P:98 I:1500 C: 18453 Min: 2 Act: 5 Avg: 4 Max: 21 T: 2 ( 491) P:98 I:2000 C: 13839 Min: 3 Act: 5 Avg: 3 Max: 9 T: 3 ( 492) P:98 I:2500 C: 11070 Min: 3 Act: 4 Avg: 4 Max: 13 BR, LX
On Fri, 22 Dec 2017 20:54:47 +0100, LX wrote:
On Fri, 22 Dec 2017 06:33:11 +0100, Ralf Mardorf wrote:
Intel(R) Core(TM) i5-3317U CPU @ 1.70GHz 4.14.6-rt7-1-rt [root@pill-mobile4 gimmeapill]# cyclictest -S -m -p98 # /dev/cpu_dma_latency set to 0us policy: fifo: loadavg: 0.10 0.06 0.02 1/161 521 Max: 15
Intel(R) Celeron(R) CPU G1840 @ 2.80GHz 4.14.6-rt7-1-rt cyclictest -S -m -p98 WARN: open /dev/cpu_dma_latency: Permission denied policy: fifo: loadavg: 0.13 0.09 0.02 1/208 4690
T: 0 ( 1245) P:98 I:1000 C:35539474 Min: 1 Act: 31 Avg: 27 Max: 83
Hi, does the CPU make such a big difference? If so, I'll order another CPU today. Or is it the combination of CPU and mobo that does cause such a big difference? Is there a reason to run cyclictest as root? We do audio work as an user without root privileges. This short run already seems to answer my questions: [root@archlinux rocketmouse]# uname -rm 4.14.6-rt7-1-rt x86_64 [root@archlinux rocketmouse]# cyclictest -S -m -p98 # /dev/cpu_dma_latency set to 0us policy: fifo: loadavg: 0.00 0.02 0.00 1/254 10107 T: 0 (10106) P:98 I:1000 C: 8583 Min: 1 Act: 1 Avg: 1 Max: 6 T: 1 (10107) P:98 I:1500 C: 5720 Min: 1 Act: 1 Avg: 1 Max: 6 ^C[root@archlinux rocketmouse]# However, regarding my questions the manpage of cyclictest isn't helpful. Regards, Ralf
On Sat, 23 Dec 2017 02:37:18 +0100, Ralf Mardorf wrote:
On Fri, 22 Dec 2017 20:54:47 +0100, LX wrote:
On Fri, 22 Dec 2017 06:33:11 +0100, Ralf Mardorf wrote:
Intel(R) Core(TM) i5-3317U CPU @ 1.70GHz 4.14.6-rt7-1-rt [root@pill-mobile4 gimmeapill]# cyclictest -S -m -p98 # /dev/cpu_dma_latency set to 0us policy: fifo: loadavg: 0.10 0.06 0.02 1/161 521 Max: 15
Intel(R) Celeron(R) CPU G1840 @ 2.80GHz 4.14.6-rt7-1-rt cyclictest -S -m -p98 WARN: open /dev/cpu_dma_latency: Permission denied policy: fifo: loadavg: 0.13 0.09 0.02 1/208 4690
T: 0 ( 1245) P:98 I:1000 C:35539474 Min: 1 Act: 31 Avg: 27 Max: 83
Hi,
does the CPU make such a big difference? If so, I'll order another CPU today. Or is it the combination of CPU and mobo that does cause such a big difference?
Is there a reason to run cyclictest as root? We do audio work as an user without root privileges.
This short run already seems to answer my questions:
[root@archlinux rocketmouse]# uname -rm 4.14.6-rt7-1-rt x86_64 [root@archlinux rocketmouse]# cyclictest -S -m -p98 # /dev/cpu_dma_latency set to 0us policy: fifo: loadavg: 0.00 0.02 0.00 1/254 10107
T: 0 (10106) P:98 I:1000 C: 8583 Min: 1 Act: 1 Avg: 1 Max: 6 T: 1 (10107) P:98 I:1500 C: 5720 Min: 1 Act: 1 Avg: 1 Max: 6 ^C[root@archlinux rocketmouse]#
However, regarding my questions the manpage of cyclictest isn't helpful.
PS: What does it all mean? A cheap Intel(R) Celeron(R) CPU G1840 @ 2.80GHz has got less latency, than a much more expensive Intel(R) Core(TM) i5-3317U CPU @ 1.70GHz? How does it affect audio work? What is the relevance of cyclictest? Is the result somehow related to audio latency and/or MIDI jitter?
Aye, you're right, the results of cyclictest are completely different when running as root, here's what I get as a normal user with 4.14.8-rt9-1-rt: [gimmeapill@pill-mobile4 ~]$ cyclictest -S -m -p98 WARN: open /dev/cpu_dma_latency: Permission denied policy: fifo: loadavg: 0.45 0.51 0.23 1/407 1048 T: 0 ( 1044) P:98 I:1000 C: 21816 Min: 2 Act: 9 Avg: 13 Max: 52 T: 1 ( 1045) P:98 I:1500 C: 14541 Min: 3 Act: 24 Avg: 14 Max: 58 T: 2 ( 1046) P:98 I:2000 C: 10903 Min: 3 Act: 15 Avg: 15 Max: 76 T: 3 ( 1047) P:98 I:2500 C: 8721 Min: 3 Act: 4 Avg: 15 Max: 65 and as root: [root@pill-mobile4 gimmeapill]# cyclictest -S -m -p98 # /dev/cpu_dma_latency set to 0us policy: fifo: loadavg: 0.35 0.49 0.22 1/407 1053 T: 0 ( 1050) P:98 I:1000 C: 12415 Min: 2 Act: 4 Avg: 3 Max: 13 T: 1 ( 1051) P:98 I:1500 C: 8272 Min: 2 Act: 4 Avg: 3 Max: 12 T: 2 ( 1052) P:98 I:2000 C: 6201 Min: 3 Act: 4 Avg: 3 Max: 13 T: 3 ( 1053) P:98 I:2500 C: 4958 Min: 3 Act: 4 Avg: 4 Max: 11 My previous tests where meant to compare the performance between RT kernel versions (I just happened to have a root terminal open at that time and didn't think further). For that purpose it worked: I could see a slight degradation since 4.9.x., but yeah, that doesn't help to compare between different systems, better run cyclictest as the audio user. That difference when running as root is nevertheless puzzling, if these results ever translate to real world audio performance, this is really bad. I thought we were done with running audio applications as root for a good 10 years, no? Regarding the CPU difference: it's a notebook processor from 2012 with turbo boost disabled and hyperthreading enabled, set to performance mode. I wouldn't expect it to be fast by today's standards, or to be able to compete core per core with a desktop class cpu of the same era: https://ark.intel.com/products/65707/Intel-Core-i5-3317U-Processor-3M-Cache-... https://ark.intel.com/products/80800/Intel-Celeron-Processor-G1840-2M-Cache-... The single thread performance between those two is also really different, so I wouldn't draw any conclusion regarding latency: https://www.cpubenchmark.net/compare.php?cmp[]=816&cmp[]=2268 BR, LX
PS: What does it all mean? A cheap Intel(R) Celeron(R) CPU G1840 @ 2.80GHz has got less latency, than a much more expensive Intel(R) Core(TM) i5-3317U CPU @ 1.70GHz? How does it affect audio work? What is the relevance of cyclictest? Is the result somehow related to audio latency and/or MIDI jitter?
On Sat, 23 Dec 2017 23:28:29 +0100 LX <gimmeapill@gmail.com> wrote:
[root@pill-mobile4 gimmeapill]# cyclictest -S -m -p98 # /dev/cpu_dma_latency set to 0us policy: fifo: loadavg: 0.35 0.49 0.22 1/407 1053
T: 0 ( 1050) P:98 I:1000 C: 12415 Min: 2 Act: 4 Avg: 3 Max: 13 T: 1 ( 1051) P:98 I:1500 C: 8272 Min: 2 Act: 4 Avg: 3 Max: 12 T: 2 ( 1052) P:98 I:2000 C: 6201 Min: 3 Act: 4 Avg: 3 Max: 13 T: 3 ( 1053) P:98 I:2500 C: 4958 Min: 3 Act: 4 Avg: 4 Max: 11
That difference when running as root is nevertheless puzzling, if these results ever translate to real world audio performance, this is really bad. I thought we were done with running audio applications as root for a good 10 years, no?
This has a quite simple answer, note the line that says: # /dev/cpu_dma_latency set to 0us This is a device that a normal user doesn't have access to, but opening it and writing 0 to it and keeping it open tells the pstate driver that you want the absolutely fastest response, so it effectively prevents the CPU from entering anything else then C0 and C1 states, which explains the lower results. AFAIK it's available on most modern Intel CPUs. You can verify it by running i7z in another terminal. -- Joakim
participants (3)
-
Joakim Hernberg
-
LX
-
Ralf Mardorf