[pulseaudio-discuss] [PATCH 00/11] A new srchannel based protocol for PulseAudio

David Henningsson david.henningsson at canonical.com
Tue Apr 29 06:47:45 PDT 2014



On 2014-04-29 15:30, Peter Meerwald wrote:
> Hello,
>
>> Okay, so second iteration. The patch is no longer a draft, and numbers
>> look good; Peter Meerwald has confirmed my numbers of 15 - 25% less CPU in
>> low latency scenarios (right)?
>
> here are the benchmark results (have been in private email to David so far
> only):
>
> measured with 'htop -d 50', accuracy +/- 0.7 probably, on beaglebaord-xm
> (ARM Cortex-A8, TI OMAP3 @ 1GHz), gcc 4.8, kernel 3.14
>
>          srchannel               iochannel
> XXX     PA      ALSA    paplay  PA      ALSA    paplay
> 20      25.8    19.8    5.8     28.3    19.1    9.4

Total: 51.4 (srchannel) - 56.8 (iochannel) ~ 10% improvement

> 40      13.5    9.2     4.6     16.3    10.1    7.3

Total: 27.3 (srchannel) - 33.7 (iochannel) ~ 19% improvement

But as we can see, most of the improvement is actually on the client 
side. And almost as much in absolute terms on the PA main thread side.

> 60      11.8    7.3     3.8     12.7    7.6     6.2
> 80      6.4     4.1     3.0     7.4     4.4     4.2
> 100     5.3     3.2     2.7     5.8     3.3     3.9
> 150     3.2     1.8     2.1     3.7     1.9     3.0
> 200     3.0     1.7     2.0     3.5     1.8     2.8
>
> perf on ALSA thread with 20 msec (srchannel)

The ALSA thread logic should remain unchanged, regardless of protocol 
mechanism. So maybe this is mostly a measure of the general accuracy :-)

I guess a perf on the client would show bigger differences.

>       5.57%  pulseaudio  [kernel.kallsyms]      [k] snd_pcm_hwsync
>       2.25%  pulseaudio  [kernel.kallsyms]      [k] finish_task_switch.isra.93
>       2.18%  pulseaudio  [kernel.kallsyms]      [k] eventfd_write
>       1.71%  pulseaudio  libalsa-util.so        [.] thread_func
>       1.69%  pulseaudio  [kernel.kallsyms]      [k] __hrtimer_start_range_ns
>       1.56%  pulseaudio  [kernel.kallsyms]      [k] vector_swi
>       1.45%  pulseaudio  [kernel.kallsyms]      [k] do_sys_poll
>       1.42%  pulseaudio  [kernel.kallsyms]      [k] snd_pcm_status
>       1.20%  pulseaudio  libpulsecommon-5.0.so  [.] __udivsi3
>       1.10%  pulseaudio  [kernel.kallsyms]      [k] clocksource_mmio_readl_up
>       1.06%  pulseaudio  libpulsecommon-5.0.so  [.] stack_pop
>       0.99%  pulseaudio  [kernel.kallsyms]      [k] __fget
>       0.93%  pulseaudio  libpulsecommon-5.0.so  [.] stack_push
>       0.83%  pulseaudio  libpulsecommon-5.0.so  [.] pa_memblock_unref
>       0.80%  pulseaudio  libpulsecore-5.0.so    [.] pa_rtpoll_run
>       0.77%  pulseaudio  libc-2.18.so           [.] memcpy
>       0.76%  pulseaudio  [kernel.kallsyms]      [k] snd_pcm_sync_ptr
>       0.72%  pulseaudio  libpulsecore-5.0.so    [.] pa_sink_input_peek
>       0.69%  pulseaudio  [kernel.kallsyms]      [k] __copy_from_user
>       0.65%  pulseaudio  libpulsecommon-5.0.so  [.] __udivdi3
>       0.63%  pulseaudio  libpulsecommon-5.0.so  [.] do_write
>
> perf on ALSA thread with 20 msec (iochannel)
>       4.89%  pulseaudio  [kernel.kallsyms]      [k] snd_pcm_hwsync
>       2.43%  pulseaudio  [kernel.kallsyms]      [k] finish_task_switch.isra.93
>       1.67%  pulseaudio  [kernel.kallsyms]      [k] vector_swi
>       1.65%  pulseaudio  [kernel.kallsyms]      [k] clocksource_mmio_readl_up
>       1.55%  pulseaudio  libalsa-util.so        [.] thread_func
>       1.39%  pulseaudio  [kernel.kallsyms]      [k] eventfd_write
>       1.25%  pulseaudio  [kernel.kallsyms]      [k] do_sys_poll
>       1.25%  pulseaudio  libpulsecommon-5.0.so  [.] __udivsi3
>       1.20%  pulseaudio  [kernel.kallsyms]      [k] snd_pcm_status
>       1.19%  pulseaudio  [kernel.kallsyms]      [k] __wake_up_sync_key
>       1.13%  pulseaudio  [kernel.kallsyms]      [k] __hrtimer_start_range_ns
>       1.02%  pulseaudio  libpulsecommon-5.0.so  [.] stack_pop
>       0.99%  pulseaudio  libpulsecommon-5.0.so  [.] stack_push
>       0.97%  pulseaudio  libpulsecommon-5.0.so  [.] do_pstream_read_write
>       0.92%  pulseaudio  [kernel.kallsyms]      [k] __fget
>       0.77%  pulseaudio  libpulsecommon-5.0.so  [.] pa_memblock_unref
>       0.69%  pulseaudio  libpulsecore-5.0.so    [.] pa_rtpoll_run
>       0.68%  pulseaudio  [kernel.kallsyms]      [k] __copy_from_user
>       0.68%  pulseaudio  libc-2.18.so           [.] memcpy
>
> regards, p.
>

-- 
David Henningsson, Canonical Ltd.
https://launchpad.net/~diwic


More information about the pulseaudio-discuss mailing list