[pulseaudio-discuss] pulsesrc consumes much more CPU than alsasrc
gmane at colin.guthr.ie
Mon Mar 15 04:12:47 PDT 2010
'Twas brillig, and Bin Gao at 15/03/10 10:28 did gyre and gimble:
> (resend as plain text)
> It seems both pulseaudio alsa PCM plugin (source) and gstreamer
> pulsesrc consume much more CPU resource than alsa when working on the
> same sample (rate, channel and format). I had a rough look at the source
> code and found they both use the threaded mainloop model. Can we have
> any chance to optimize for this?
> $ gst-launch alsasrc device="hw:0,0" ! queue ! audioconvert ! wavenc !
> filesink location=test.wav CPU% = 2~3%
Trying here I get between 1 and 2% CPU.
> $ gst-launch pulsesrc ! queue ! audioconvert ! wavenc ! filesink
> location=test.wav CPU% = 12~14%
Here I get about 4% CPU (one process hovered between 1 and 2%, with a
second process hovering between 0 and 1% with a third most at 0 and very
occasionally at 1% and a fourth always at 0%)
So definitely less than optimal but not as striking as your example.
(what was interesting to me was that running the first example via
pasuspender caused the sinks/source to not unsuspend themselfs when I
hit control + C... need to investigate that one).
Tribalogic Limited [http://www.tribalogic.net/]
Mandriva Linux Contributor [http://www.mandriva.com/]
PulseAudio Hacker [http://www.pulseaudio.org/]
Trac Hacker [http://trac.edgewall.org/]
More information about the pulseaudio-discuss