PulseAudio Painfully Slow

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>Here are the instructions:
>
>1. Place a pulseaudio-9999 ebuild into your local overlay:
>
>mkdir -p /usr/local/portage/media-sound/pulseaudio
>cd /usr/local/portage/media-sound/pulseaudio
>wget
http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/media-sound/pulseaudio/pulseaudio-9999.ebuild
>repoman manifest
>
>2. Enable your local overlay by adding this line to the end of
/etc/portage/make.conf:
>
>PORTDIR_OVERLAY="$PORTDIR_OVERLAY /usr/local/portage"
>
>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:
>
>emerge 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
>./FEZ
>... 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
FEZ.bin.x86_64
>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
pulseaudio
>19913 aep       20   0  947044  70872  31932 S   6,3  0,4   0:58.03
pavucontrol
>
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
current CFLAGS

CFLAGS="-march=core2"
CFLAGS="${CFLAGS} -msse4"
CFLAGS="${CFLAGS} -mcx16"
CFLAGS="${CFLAGS} -msahf"
CFLAGS="${CFLAGS} -O2"
CFLAGS="${CFLAGS} -pipe"

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>
wrote:

>
> 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
> http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20140714/8ff5ffb3/attachment-0001.html>


[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux