LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Linux Performance on embedded devices (https://www.linuxquestions.org/questions/linux-general-1/linux-performance-on-embedded-devices-523273/)

Thread7 01-27-2007 12:18 PM

Linux Performance on embedded devices
 
I've been messing around with the Linux based MythTV for a few months now and something has always bothered me. Why does it take a 2.0Ghz+ CPU with decent RAM and a nice TV tuner card in order to get acceptable performance?
These Linux devices all perform well with much less: A Series 1 Tivo has a 54Mhz PowerPC CPU and I'm not sure how much RAM. But I know it must not have even 512MB. I have a Linksys WRT54G Wireless router with a 200Mhz CPU and 16MB RAM. I also have this neat new device called Neuros OSD (Open Source Device). It has a 200Mhz ARM CPU and can record video to storage memory cards. None of these products have any performance issues.
So what is it about a non proprietary set up such as MythTV that makes it such a performance hog? Here are my suspicions:
1. The Linux kernel is compiled specifically for the proprietary device.
2. Since each proprietary device only needs specific hardware, a lot of overhead and CPU cycles are saved.
3. The makers of these devices have just tested them like crazy to fine tune performance.
4. They don't use X Windows which is a performance hog? (I know the Linksys does not but unsure of the other two)
5. They were all programmed in a low level language. (But Myth is mainly in C I thought)

Any ideas? This problem really perplexes me.

macemoneta 01-27-2007 05:05 PM

Does your "nice TV tuner card" have an on-board hardware encoder (like the one in the Tivo)? I suspect not, or you aren't using it, or it's not very good. It's very similar to software 3D vs hardware 3D using your video card's GPU. Normally, CPU usage should be very light if all the processing (other than disk I/O) is being performed by the tuner card.

Thread7 01-28-2007 12:10 AM

Actually the TV Tuner does have an onboard MPEG encoder. It is the Hauppauge WinTV-PVR-150. But I have tried various tuner cards and only have acceptable performance when coupled with a 2 Ghz CPU or higher. This post was more broad based though than just a discussion of one of my systems. I just don't understand how Tivo can get by with 54Mhz while Myth Tv needs a 2Ghz system to do pretty much the same thing.

macemoneta 01-28-2007 10:41 PM

It sounds like you are using software encoding, instead of hardware encoding - you are not using the hardware encoder on your capture card.

From the MythTV documentation CPU Type and Speed:

Quote:

MythTV has two modes of operation. First, it can function as a software video encoder, which means that it uses a fairly generic "dumb" video capture card to get frames of video, encodes them using the CPU on your motherboard and writes them to disk. High-end video capture cards and devices like the TiVo and ReplayTV have dedicated encoder chips which use specialized hardware to convert the video stream to the MPEG-2 format without using the motherboard CPU. The main CPU has the responsibility of running the Operating System and reading and writing the encoded frames to the disk. These tasks have fairly low CPU requirements compared to encoding video, which is why a device like a Series 1 TiVo can run with only 16MB of RAM and a 54MHz CPU.
From the Hardware MPEG-2 encoders section:

Quote:

Here are some data points for encoding:

* A Celeron 450 uses 2% CPU for encoding a 480x480 16Mbps MPEG-2 stream.
Clearly, if you are monopolizing a 2GHz CPU, you are not using hardware encoding.


All times are GMT -5. The time now is 07:11 PM.