[gst-devel] How to decrease CPU consumation for audio recording?
Gruenke, Matt
mgruenke at Tycoint.com
Thu Oct 7 02:56:18 CEST 2010
If pthread_mutex_lock() is an expensive call on your system, then try
building glib with the configure option --enable-debug=no. When you
build gstreamer & plugins, define G_DISABLE_CAST_CHECKS.
Otherwise, you're locking mutexes every time you cast (look at
g_type_check_instance_cast() in gobject/gtype.c). Once you have enough
threads doing enough of those checked casts, you should actually start
to see lock contention and performance will degrade nonlinearly.
You can also disable logging, by configuring gstreamer with the
--disable-gst-debug option. I'm not sure how many mutexes it involves,
but we've found that higher logging levels can add significant overhead.
BTW, it would be more instructive to plot CPU time in terms of # buffers
(or just raw buffer throughput with a fakesrc). Look for this to be
linear in terms of the number of buffers, queues, and elements. If it's
not, then there's something interesting going on. Otherwise, your task
is simply to look for ways to reduce the overhead of each chain().
Matt
-----Original Message-----
From: Felipe Contreras [mailto:felipe.contreras at gmail.com]
Sent: Wednesday, October 06, 2010 20:08
To: Wim Taymans
Cc: gstreamer-devel at lists.sourceforge.net
Subject: Re: [gst-devel] How to decrease CPU consumation for audio
recording?
On Tue, Jan 5, 2010 at 12:40 PM, Felipe Contreras
<felipe.contreras at gmail.com> wrote:
> On Thu, Dec 24, 2009 at 7:52 PM, Wim Taymans <wim.taymans at gmail.com>
wrote:
>> On Thu, 2009-12-24 at 19:13 +0200, Felipe Contreras wrote:
>>>
>>> GStreamer is not good at handling very small buffers.
>>
>> What do you mean with this?
>
> I mean what I said: the smaller the buffers, the worst GStreamer
> handles them. My gut feeling is that performance would deteriorate in
> exponential manner, and would be more noticeable in embedded
> platforms, and specially with a single core.
>
>> What do you define as a small buffer? How is
>> it not good?
>
> Huh? I would need to write a test application that measures
> performance passing buffers of different sizes along multiple thread
> contexts and plot the result in order to define that.
There you go:
http://felipec.wordpress.com/2010/10/07/gstreamer-embedded-and-low-laten
cy-are-a-bad-combination/
Is it clear now that GStreamer is bad at handling very small buffers?
--
Felipe Contreras
------------------------------------------------------------------------
------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
gstreamer-devel mailing list
gstreamer-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
More information about the gstreamer-devel
mailing list