[mythtv-users] How to minimize CPU usage

Dan Seddon dan.seddon at framestore-cfc.com
Mon Jan 30 10:59:30 UTC 2006


Jerry Rubinow wrote:

>On 1/28/06, Kevin Kuphal <kuphal at dls.net> wrote:
>  
>
>>Jerry Rubinow wrote:
>>    
>>
>>>On 1/28/06, Kevin Kuphal <kuphal at dls.net> wrote:
>>>
>>>      
>>>
>>>>Jerry Rubinow wrote:
>>>>
>>>>        
>>>>
>>>>>I'm running myth with separate front/back end computers.  The frontend
>>>>>is a 2.8GHz P4 with 512MB ram, trying to display 720p HD, but I'm
>>>>>maxing out the CPU - myth ~65+%, X around 30+%.  The video is at times
>>>>>choppy when there's a lot of stuff changing in the frame.  What can I
>>>>>do to reduce CPU usage?
>>>>>
>>>>>Here's what I've done so far:
>>>>>-compiled myth with --enable-proc-opt (using SVN from less than a week ago)
>>>>>-using ratpoison for window manager
>>>>>-not using any deinterlacing
>>>>>
>>>>>Note: XvMC is not an option.
>>>>>
>>>>>I'm running FC4.
>>>>>
>>>>>mythfrontend -v playback reports that it's using Xvideo, format I420,
>>>>>using realtime priority, video timing method: RTC (glx vsync not
>>>>>supported in my driver).  Then I get a lot of video ahead of audio
>>>>>dropping frames messages, and then a lot of audio ahead of video
>>>>>messages.
>>>>>
>>>>>/proc/meminfo says there's 100MB free while running myth, so I guess
>>>>>it's not swapping.
>>>>>
>>>>>What might be causing the high CPU?  I've read about people with
>>>>>2.4Ghz P4s not having a problem with HD, so it seems like there should
>>>>>be something I can do.  Would compiling my own kernel help?  With what
>>>>>options?  Anything else I can try first?
>>>>>
>>>>>
>>>>>          
>>>>>
>>>>Try using libmpeg2 for your playback.  I'd suggest looking into
>>>>hyperthreading support in your kernel to see if it is enabled.  I
>>>>believe this means using an SMP kernel.  I'm not sure if that will make
>>>>a difference but it might.  And lastly, your video card and drivers do
>>>>help alot.  I've struggled with my choice of ATI on one of my frontends
>>>>and as I'm moving to HD, I'm biting the bullet and spending the $40 on
>>>>an Nvidia FX card and it will be one of the best $40 I've spent on my
>>>>system as it means HD playback on my 2.4ghz Celeron with XvMC.
>>>>
>>>>Kevin
>>>>
>>>>        
>>>>
>>>Sorry, I left out that I'm using libmpeg2.  Hyperthreading - hmm,
>>>unfortunately I just checked and my CPU doesn't support hyperthreading
>>>(it's a 533MHz bus 2.8GHz P4).  I tried going the FX 5200 route, only
>>>to discover that I I can't achieve the transfer speeds I need over PCI
>>>(my motherboard only has two slots, both PCI).  1280x720x(24 or 32)
>>>bits, 30 frames a second (or 60, even worse) - PCI's max throughput is
>>>600 to 700 Mbits/sec.  I tried XvMC on the 5200 but it was always a
>>>bit glitchy.  The onboard graphics is AGP, but now instead of being
>>>limited by bus speed, it's by CPU speed.  Very frustrating, since it's
>>>soooo close to working properly.
>>>
>>>
>>>      
>>>
>>Hmm.  I'm about to buy an FX5500 PCI for use in my frontend.  Are you
>>saying that you can't drive HD content to the PCI card because it is
>>PCI, not AGP?  I'm using XvMC on my MX440 AGP and it works great with
>>Myth and the 7676 Nvidia drivers on the SVN.  You might want to give
>>XvMC with that driver version another shot when 0.19 is released on your
>>FX5200.  I've found it to be very solid.
>>
>>Kevin
>>    
>>
>
>When I was trying to do HD over the PCI FX5200, I consistently had
>slowness/skipped frames/stuttering.  I eventually did some
>calculations, and 720p at 24bits and 30 frames per second is 632
>Mbits/sec.  I saw in the list archives that PCI's maximum transfer
>speed ranges between 600-700 Mbits/sec.  However, I think 24 bit video
>is actually using 32 bips per pixels (alpha), and isn't HD refreshing
>at 60 frames/sec?  So I must not be figuring something right, or else
>
>  
>
Hi Jerry

Video comes to about 30 Mbytes per second  - which would be about 240 
Mbits per second, as you're almost a multiple of 3 bigger I'm guessing 
you assumed 24bits per colour channel? Where it is actually 8bits per 
colour channel (PAL is 3*720*576*25 bytes). This ought to be well inside 
the speed of PCI - if you think about it, uncompressed PVRs have existed 
for some years now and the harddrives on these use the PCI bus. So, it's 
unlikely you've exceeded the bandwidth. 60 frame/sec is interlaced NTSC 
(720p is progressive) - I wouldn't think this would increase the 
bandwidth unless you were doing something like bob deinterlace on your 
CPU (I'm guessing here), as each frame should have half the number of 
lines. I don't know about XvMC - I don't know how compressed the data is 
by the time it gets to the card - you'd hope it was a little compressed 
though!

Ta

Dan



More information about the mythtv-users mailing list