Okay, I bought a dual processor system about two years ago when I started to do video processing. I was always a bit disappointed in the 'bang for the buck' with regard to encoding, but I LOVED it as a workstation. Never slowed down. Well, recently I got a wild hair and began testing, tweaking and learning. Here's what I have learned.
SMP systems are better at handling BROAD loads than DEEP loads. They may not run a single process that fast, but they can run several heavy processes without missing a hitch. I can run multiple instances of process-intensive programs without getting bogged down. A problem with video, however, is that CCE will crash if you open multiple instances and try to encode.
I'm getting ahead of myself. I'm going to organize this into two parts: Multi-Instance Encoding and Optimized Affinity Encoding:
Multi-Instance
As I said, CCE wrecks if you open two copies and try to encode two streams simultaneously. There is a sort of hack around that, but it's a bit of a pain: Terminal Services. I have found that while you can't run multiple instances of CCE within your windows account, you CAN run CCE and simultaneously log into your box with Terminal Services and open another instance. The result: Encode two streams in about 115% of the time it would take you to to encode a single stream with a single instance. For those who aren't getting this, it's awesome. If it takes you two hours to encode a two pass on a movie, you can encode TWO movies at two pass in two hours and eighteen minutes. I will not get into how to use/install/configure terminal services here; just know that it works.
Processor Affinity
Okay, CCE is SMP capable but AVISynth is not. This means that while CCE COULD use tons of sys resources to take advantage of a dual box, most frameservers are single processor configured, so your bottleneck is in the stream of frames that CCE receives from the frameserver.
Solution: AFFINITY!
Affinity describes the ability to schedule a process to run on one or the other processor instead of letting your operating system balance the load equally. In this case, EQUAL SUCKS. The problem has been that you cannot set affinity for many core processes or for your hardware from within windows. WELL, THIS IS WRONG.
If you have Win2K or XP, download two programs:
Get the Interrupt Affinity Filter from Microsoft's website (free) and get SMP Seesaw (also free) from the web (google search it).
The affinity filter allows you to set the affinity for interrupt requests coming from devices on your PC. This means that we can load up one of the processors with ALL hardware/virtual device requests and leave the other processor wide open. With me so far?
There's only ONE thing that you need to leave on the OTHER processor:
Video Codecs (avisynth will basically get its own processor)
Now reboot. Open SMPSeesaw. This will allow you to shift the remaining system processes (not device specific) to the processor that we've been loading up, paving the way for smooth sailing with AVISynth.
Open CCE. CCE will automatically be run to process on BOTH processors simultaneously. THIS IS WHAT YOU WANT. Basically, you end up with this:
All hardware / systems processes run on CPU0
Video Codecs run on CPU1
CCE runs on BOTH
Now, encode away. The performance increase that I have noticed is around 30-40% increase over 'stock' configuration. Not bad. AND, I use Win Server 2K3 which has far better SMP threading capability than 2000, so a 2000 box would see a greater relative increase. Performance is as follows (my setup is in my sig):
'Rig'
CCE w/ 2-Pass VBR Encode, Prog Frms, DVD Compliant, no audio, 3/4 frame order, 15% quality, no filter, 16x9 source
Source:
Andretti IMAX Flick, two minute clip.
Results w/ single instance default confit:
2.13x Realtime, Steady State.
Results w/ dual instance terminal services:
1.92x Realtime on Instance 1, Steady State
1.81x Realtime on Instance 2, Steady State
Results w/ Optimized Affinity:
2.91x Realtime, Steady State
Now, the better P4's still smoke my rig with single processors, BUT, i can encode ALMOST as fast (like I am now) with TWO video streams (like I am now) while writing mini-guides, reading email, and running AutoCAD (like I am now) with no noticable drop in performance. Now that's a beast.
I'm not going to take the time to compile a giant guide on exactly how to do this; I wish I had the time. This shoudl be enough to get anyone with a little knowhow and the all-knowing Google well on their way. I will pop in to time to time if anyone has simpler questions; feel free to ask. Hope this was helpful.
************EDIT************
jumped the gun a tad. pulling up a better process viewer shows me that avisynth.dll is still running as a child process under cce. no worries; there is a file called ImageCFG available online that will modify an executable to start with a particular affinity. i have NOT tried this yet on a .dll, but i will tomorrow. i'll post results at that time.
~~~~~~~~~~~~~~~~~
Insite
This message has been edited since posting. Last time this message was edited on 23. March 2004 @ 15:41
|