[pulseaudio-discuss] PulseAudio Painfully Slow
Benny de von Ausfern
benny4556 at gmail.com
Mon Jul 14 09:11:02 PDT 2014
>Here are the instructions:
>1. Place a pulseaudio-9999 ebuild into your local overlay:
>mkdir -p /usr/local/portage/media-sound/pulseaudio
>2. Enable your local overlay by adding this line to the end of
>3. Build pulseaudio-9999 with debug symbols.
>FEATURES=splitdebug CFLAGS="-O2 -pipe -g3 -ggdb" ACCEPT_KEYWORDS="**"
emerge -av =media-sound/pulseaudio-9999
>Just in case, rebuild some libraries with debug symbols, too:
>FEATURES=splitdebug CFLAGS="-O2 -pipe -g3 -ggdb" emerge -1 alsa-lib speex
>4. Build perf:
>5. Restart pulseaudio as a user:
>pulseaudio -k ; pulseaudio --start
>6. Profile PulseAudio:
># as root:
>perf record -p `pidof pulseaudio`
># while it is recording, play FEZ as a user
>... and while the game is playing something, place a test audio-only call
with skype. Wait for it to hang up.
># Then stop perf-recording with Ctrl+C
>7. Make a readable profile report:
>perf report > report.txt
>My report (from FEZ + skype test call + pavucontrol) is attached. I had to
truncate it so that it fits the mailing list size limit (100 KB).
PulseAudio is from today's git. Please don't be alarmed by the top line
that says 13.99%: this is 13.99% of all non-idle CPU cycles.
>Here is the top of the "top" output:
>26778 aep 20 0 1572544 541308 54048 R 25,3 3,3 1:14.73
>26807 aep 20 0 571612 150612 70128 S 9,3 0,9 0:20.21 skype
> 607 root 20 0 204388 47360 28568 S 8,0 0,3 2:43.67 X
>26767 aep 9 -11 821636 18488 15180 S 6,6 0,1 0:17.97
>19913 aep 20 0 947044 70872 31932 S 6,3 0,4 0:58.03
Oh what a tedious task you gave me. I will do that when I come back from
work. Just to make sure, compiling libs (specially alsa-lib) with such
CFLAGS might break a lot of things, since I'd be disabling some of my
current flags, and that might catch other libs out of guard. This is my
I'll do that for science and for the sake of testing though. Also,
comparing with FEZ is not really fair. The game barely has any graphics
demand and was already the least problematic to start with (check the
original post). I'll check FEZ out and some of the others too.
On 14 July 2014 09:09, Jan Alexander Steffens <jan.steffens at gmail.com>
> Am 14.07.2014 17:59 schrieb "Laurențiu Nicola" <lnicola at dend.ro>:
> > While I agree, I think it's only fair to say that both Windows and
> > PulseAudio avoid the resampling if the source sample rate is the same as
> > the configured one. In my distribution (Arch), /etc/pulse/daemon.conf
> > has
> > ; default-sample-rate = 44100
> > which means it's the default. Many audio sources are 44.1 kHz, so they
> > don't need resampling. It might be interesting to see what sample rate
> > your the slow apps use and whether Pulse isn't configured to use 48000
> > or something else.
> > Using pure ALSA I've had some issues with ALSA preferring to open the
> > device and 48000, but I'm not sure whether this applies to PulseAudio or
> > not.
> If the device does not support 44.1kHz but only 48kHz (and many cheap
> integrated ones don't) then PA will still have to resample.
> pulseaudio-discuss mailing list
> pulseaudio-discuss at lists.freedesktop.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the pulseaudio-discuss