CPU Usage excessive. TSDemux->MPEG2->resize->mpeg4->tsmux->send

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

CPU Usage excessive. TSDemux->MPEG2->resize->mpeg4->tsmux->send

Richard
Hi All,

I am running a DVB->Transcode->MPEG4->stream solution and I am getting
really bad CPU usage.

 3659 root      20   0  386m  37m 9220 S  134  1.4   0:27.47 DVBStream
According to top, its using 134% !... when no transcode is taking
place (DVB->IP SEND) top reports 5% CPU usage.

Is there a way to profile what is sucking the life out of the CPU ?
(The machine is a Dual Core Athlon X2 when using VLC I can
trancode/stream using 20% CPU)


How can I profile the pipeline?
Richard
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: CPU Usage excessive. TSDemux->MPEG2->resize->mpeg4->tsmux->send

Nicolas Dufresne
Le vendredi 04 mai 2012 à 14:10 +0100, Richard a écrit :
> Hi All,
Hi,
>
> I am running a DVB->Transcode->MPEG4->stream solution and I am getting
> really bad CPU usage.
>
>  3659 root      20   0  386m  37m 9220 S  134  1.4   0:27.47 DVBStream
> According to top, its using 134% !... when no transcode is taking
> place (DVB->IP SEND) top reports 5% CPU usage.

From my observation, this is the mpegvideoparse element that is using
too much CPU for what it is doing. You can help us by confirming this
observation. I came to that conclusion by running oprofile over my
pipeline. The symbole that was using all the CPU was
scan_for_start_code() within the mpegvideo parser.

Let me know if that is the same issue, that would greatly help. Please
report any useful information on the bug report,
https://bugzilla.gnome.org/show_bug.cgi?id=672701

cheers,
Nicolas

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: CPU Usage excessive. TSDemux->MPEG2->resize->mpeg4->tsmux->send

Andreas Tunek-2


On May 4, 2012 5:24 PM, "Nicolas Dufresne" <[hidden email]> wrote:
>
> Le vendredi 04 mai 2012 à 14:10 +0100, Richard a écrit :
> > Hi All,
> Hi,
> >
> > I am running a DVB->Transcode->MPEG4->stream solution and I am getting
> > really bad CPU usage.
> >
> >  3659 root      20   0  386m  37m 9220 S  134  1.4   0:27.47 DVBStream
> > According to top, its using 134% !... when no transcode is taking
> > place (DVB->IP SEND) top reports 5% CPU usage.
>
> From my observation, this is the mpegvideoparse element that is using
> too much CPU for what it is doing. You can help us by confirming this
> observation. I came to that conclusion by running oprofile over my
> pipeline. The symbole that was using all the CPU was
> scan_for_start_code() within the mpegvideo parser.
>
> Let me know if that is the same issue, that would greatly help. Please
> report any useful information on the bug report,
> https://bugzilla.gnome.org/show_bug.cgi?id=672701
>
> cheers,
> Nicolas
>
>

Is it deinterlacing? That takes quite a bit of cpu.....

_______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: CPU Usage excessive. TSDemux->MPEG2->resize->mpeg4->tsmux->send

Nicolas Dufresne
Le vendredi 04 mai 2012 à 17:30 +0200, Andreas Tunek a écrit :
>
> Is it deinterlacing? That takes quite a bit of cpu.....

From the profile I have here, the parser is way ahead of the rest, there
is clearly a bug.

Nicolas

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: CPU Usage excessive. TSDemux->MPEG2->resize->mpeg4->tsmux->send

Richard
In reply to this post by Andreas Tunek-2
Hi All,

thanks... I attached the oprofile output in pastebin.. (unfortunately
not using DEBUG ffmpeg libraries).. I am on that task now and praying
I dont hit the link time reference problems with mismatching
libraries.

http://pastebin.com/9BYG48ia

As to the deinterlace, I have tried with and without :P .. didnt make
much difference.

Richard

On 4 May 2012 16:30, Andreas Tunek <[hidden email]> wrote:

>
> On May 4, 2012 5:24 PM, "Nicolas Dufresne"
> <[hidden email]> wrote:
>>
>> Le vendredi 04 mai 2012 à 14:10 +0100, Richard a écrit :
>> > Hi All,
>> Hi,
>> >
>> > I am running a DVB->Transcode->MPEG4->stream solution and I am getting
>> > really bad CPU usage.
>> >
>> >  3659 root      20   0  386m  37m 9220 S  134  1.4   0:27.47 DVBStream
>> > According to top, its using 134% !... when no transcode is taking
>> > place (DVB->IP SEND) top reports 5% CPU usage.
>>
>> From my observation, this is the mpegvideoparse element that is using
>> too much CPU for what it is doing. You can help us by confirming this
>> observation. I came to that conclusion by running oprofile over my
>> pipeline. The symbole that was using all the CPU was
>> scan_for_start_code() within the mpegvideo parser.
>>
>> Let me know if that is the same issue, that would greatly help. Please
>> report any useful information on the bug report,
>> https://bugzilla.gnome.org/show_bug.cgi?id=672701
>>
>> cheers,
>> Nicolas
>>
>>
>
> Is it deinterlacing? That takes quite a bit of cpu.....
>
> _______________________________________________
>> gstreamer-devel mailing list
>> [hidden email]
>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: CPU Usage excessive. TSDemux->MPEG2->resize->mpeg4->tsmux->send

Richard
Hi there,

http://pastebin.com/ZXEGFRes

Oprofile logs in pastebin. The ffmpeg AVCodec seems to be the thirsty
one. It features top of the list all of the time..  now I am trying to
see why the kernel is using 20%

Richard


On 4 May 2012 16:54, Richard <[hidden email]> wrote:

> Hi All,
>
> thanks... I attached the oprofile output in pastebin.. (unfortunately
> not using DEBUG ffmpeg libraries).. I am on that task now and praying
> I dont hit the link time reference problems with mismatching
> libraries.
>
> http://pastebin.com/9BYG48ia
>
> As to the deinterlace, I have tried with and without :P .. didnt make
> much difference.
>
> Richard
>
> On 4 May 2012 16:30, Andreas Tunek <[hidden email]> wrote:
>>
>> On May 4, 2012 5:24 PM, "Nicolas Dufresne"
>> <[hidden email]> wrote:
>>>
>>> Le vendredi 04 mai 2012 à 14:10 +0100, Richard a écrit :
>>> > Hi All,
>>> Hi,
>>> >
>>> > I am running a DVB->Transcode->MPEG4->stream solution and I am getting
>>> > really bad CPU usage.
>>> >
>>> >  3659 root      20   0  386m  37m 9220 S  134  1.4   0:27.47 DVBStream
>>> > According to top, its using 134% !... when no transcode is taking
>>> > place (DVB->IP SEND) top reports 5% CPU usage.
>>>
>>> From my observation, this is the mpegvideoparse element that is using
>>> too much CPU for what it is doing. You can help us by confirming this
>>> observation. I came to that conclusion by running oprofile over my
>>> pipeline. The symbole that was using all the CPU was
>>> scan_for_start_code() within the mpegvideo parser.
>>>
>>> Let me know if that is the same issue, that would greatly help. Please
>>> report any useful information on the bug report,
>>> https://bugzilla.gnome.org/show_bug.cgi?id=672701
>>>
>>> cheers,
>>> Nicolas
>>>
>>>
>>
>> Is it deinterlacing? That takes quite a bit of cpu.....
>>
>> _______________________________________________
>>> gstreamer-devel mailing list
>>> [hidden email]
>>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>
>>
>> _______________________________________________
>> gstreamer-devel mailing list
>> [hidden email]
>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: CPU Usage excessive. TSDemux->MPEG2->resize->mpeg4->tsmux->send

Richard
Looking at the logs it showed alot of MAD continuity errors. this
looks like it was dumping the queue for the video too for some reason.
 Since I really dont care if the audio is passed through in the MPEG
format I changed the pipeline.

I changed DVB->Decodebin->stuff      to
DVB->MpegDemux->......

In my new pipeline the audio is not decoded, it is just passed through
to the MpegTsMux, only video is re-encoded to MPEG4

Richard


On 4 May 2012 20:14, Richard <[hidden email]> wrote:

> Hi there,
>
> http://pastebin.com/ZXEGFRes
>
> Oprofile logs in pastebin. The ffmpeg AVCodec seems to be the thirsty
> one. It features top of the list all of the time..  now I am trying to
> see why the kernel is using 20%
>
> Richard
>
>
> On 4 May 2012 16:54, Richard <[hidden email]> wrote:
>> Hi All,
>>
>> thanks... I attached the oprofile output in pastebin.. (unfortunately
>> not using DEBUG ffmpeg libraries).. I am on that task now and praying
>> I dont hit the link time reference problems with mismatching
>> libraries.
>>
>> http://pastebin.com/9BYG48ia
>>
>> As to the deinterlace, I have tried with and without :P .. didnt make
>> much difference.
>>
>> Richard
>>
>> On 4 May 2012 16:30, Andreas Tunek <[hidden email]> wrote:
>>>
>>> On May 4, 2012 5:24 PM, "Nicolas Dufresne"
>>> <[hidden email]> wrote:
>>>>
>>>> Le vendredi 04 mai 2012 à 14:10 +0100, Richard a écrit :
>>>> > Hi All,
>>>> Hi,
>>>> >
>>>> > I am running a DVB->Transcode->MPEG4->stream solution and I am getting
>>>> > really bad CPU usage.
>>>> >
>>>> >  3659 root      20   0  386m  37m 9220 S  134  1.4   0:27.47 DVBStream
>>>> > According to top, its using 134% !... when no transcode is taking
>>>> > place (DVB->IP SEND) top reports 5% CPU usage.
>>>>
>>>> From my observation, this is the mpegvideoparse element that is using
>>>> too much CPU for what it is doing. You can help us by confirming this
>>>> observation. I came to that conclusion by running oprofile over my
>>>> pipeline. The symbole that was using all the CPU was
>>>> scan_for_start_code() within the mpegvideo parser.
>>>>
>>>> Let me know if that is the same issue, that would greatly help. Please
>>>> report any useful information on the bug report,
>>>> https://bugzilla.gnome.org/show_bug.cgi?id=672701
>>>>
>>>> cheers,
>>>> Nicolas
>>>>
>>>>
>>>
>>> Is it deinterlacing? That takes quite a bit of cpu.....
>>>
>>> _______________________________________________
>>>> gstreamer-devel mailing list
>>>> [hidden email]
>>>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>>
>>>
>>> _______________________________________________
>>> gstreamer-devel mailing list
>>> [hidden email]
>>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>>
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel