LiViD   Diff for "PerformanceHowTo" UserPreferences
 
Help Search Diffs Info Edit Print View
 MoinMoin Wiki   LividWiki   RecentChanges   TitleIndex   WordIndex   Help 

Differences between version dated 2001-01-08 12:04:47 and 2001-06-01 15:24:01 (spanning 31 versions)
Deletions are marked like this.
Additions are marked like this.

 
Yes, throwing money at the problem will help.
 
== Accelerated Hardware ==  
Memory is important. So go get phosphore. I just upgraded my machine from 64Meg to 96 Meg, and the (Mpeg2Dec) framerate jumped from 17 to 25 fps. Sure, my machine is slow (P2/233), and I'm really waiting for an accelerated mpeg driver for my Rage128 (see GatosProject), but if you have only 64 Meg, add some more memory... JeremyErwin  
  
== XVideo ==  
 
Use XVideo if possible. This is supported in XFree86 4.0.x or greater for some video cards. See HardwareCompatibility.
 
Setup mtrrs. See MtrrHowTo.  
Run {{{xdpyinfo}}} and look for {{{XVideo}}} extension.  
  
Run {{{xvinfo}}} to see supported modes.  
  
== MTRR Setup ==  
  
For details on how to do this, check the LAMP FAQ located at http://pauillac.inria.fr/lamp/faq.html  
  
This could dramatically boost your mpeg decoding performance:  
  
Configure the MTRR registers (/proc/mtrr) so that your frame buffer is accessible in write-combining mode. If you have XFree 4.x, this is done automatically, but with XFree 3.x you have to do it yourself. Once your MTRR registers are properly configured you should see something like this :  
  
{{{  
# cat /proc/mtrr  
reg00: base=0x00000000 ( 0MB), size= 256MB: write-back, count=1  
reg01: base=0xe2000000 (3616MB), size= 32MB: write-combining, count=2  
reg07: base=0xe4000000 (3648MB), size= 64MB: write-combining, count=1  
}}}  
  
== DMA Disk Access ==  
  
If you use IDE disks, make sure they are accessed in DMA mode, not PIO. PIO is still the default, but it is a very large performance hit, because it does not let your system work on mpeg decoding and read from the disk in parallel. Make sure you run a command similar to hdparm -d1 /dev/hda. You will probably need additional arguments, and please read the man page first because you can break your filesystem if you abuse this command.  
  
== AUDIO Performance ==  
  
If you have certain audio cards (I have a ESS 1938 PCI card) using  
the ALSA drivers seems to help quite a bit. The kernel module for audio  
made listening to the soundtrack painfully full of pops and clicks.  
Loading the ALSA driver for reduced my audio noise to ZERO.  
  
ISA sound cards also can have impact on the performance, because ISA  
DMA seems to need some processing power. Upgrading to a cheap PCI sound  
card can give you a few fps and is cheaper than a new video card.  
See [http://www.alsa-project.org/~goemon/] for a list of ALSA-supported  
cards.  
 
= Software =
 
== Find the Problem ==  
  
One way to determine if your processor is fast enough to decode video is to run Mpeg2Dec (or maybe OpenMediaSystem) with no video output. If the frame rate is ''much'' higher than with video enabled then your problem is the video driver or video hardware.  
  
Something like this: {{{mpeg2dec -o null foo.mpg}}}. Compare framerate with {{{mpeg2dec -o xvshm foo.mpg}}} (or whatever driver you want).  
  
Also see PerformanceResults.  
  
== Compiling ==
 
 * Compile with optimizations such as {{{-O3}}}.
   (usually all livid packages will be compiled optimized, as long as you don't try to  
    port to another platform - most likely you'll have to add cpu specific flags)  
 * Don't compile with debug flags (--enable-devel) that spew lots of output to the console.

PythonPowered ShowText of this page
EditText of this page
FindPage by browsing, searching, or an index
Or try one of these actions: LikePages, SpellCheck

MoinMoin 1.108, Copyright © 2000-2001 by Jürgen Hermann

config = 0.000
total = 1.070
imports = 0.650