Finally managed to peg my CPU

…and this is what it took. Since Adobe removed multi-processing from After Effects I’ve been using the shell to run multiple instances of the aerender application. This can lead to massive performance gains – the screenshot below shows a 4,000% improvement in speed.

For projects such as this one, which wasn’t heavy on memory, I wanted to make the most of the 40 physical cores on this machine (it’s a dual Xeon E5-2690 with 20 cores on each CPU). As a single instance aerender was doing one frame every 3 seconds, and hardly using any resources. Adding another 39 instances hardly changed the per-frame render time for each instance, meaning that it was roughly 40 times as fast.

2016-11-02-11_25_29

For powershell users the Start-Process command comes in handy here:

for ($i = 0 ; $i -lt 40; $i++ ){
 Start-Process 'C:\Program Files\Adobe\Adobe After Effects <<version>>\Support Files\aerender.exe' -ArgumentList '-project', '"c:\path\to\project.aep"'
sleep 5;
}

This will start 40 instances of aerender.exe, and have them render the file project.aep. Obviously you have to supply the correct path to the aerender executable, the easiest way is to drag it into the console window; ditto for the path to the project. Note the single quotes surrounding the double quotes – you need to ‘tarp up double’ for it to work.

If you don’t want all the console windows littering your screen you can add the -nonewwindow option at the end of the command. This will send all the output from all the aerender instances to the console that you’re currently in. This can lead to garbled messages, and it’s hard to see exactly what’s going on, but you won’t have lots of windows to tab through when you’re switching apps, and if something goes wrong the message won’t disappear when the window closes.

You also have to make sure you’re using the multi-machine render settings and an image sequence output module. This is the downside of doing it this way: you’ll need to use ffmpeg or media encoder to turn the sequence into a movie at the end. The up-side is that you can stop and start the render, or even add and delete instances when you need more or less resources – for example if you want to keep working and have it render in the background.

2 comments

  1. Hi!
    Can you share A little bit about your comp setup?
    Ssd for main comp and another for cache? How much ram?

    Im not getting nice results with my dual xeon 64 ram , ssd 48 threads.
    AeCc2017
    Thanks you

    Reply

  2. My setup is similar dual Xeon E5-2960 w 64Gb RAM, Windows 10. It’s a beast for multiprocessing, great for having renders going in the background while still working.

    The process outlined above works whenever the comp is not too memory intensive. If you use up all your memory and it starts thrashing the page-faults it’s going to slow down like it’s full of molasses. So don’t use it for any comp that needs a lot of RAM. Same might apply for GPU if you’re using lots of GPU-rendered effects, but I haven’t seen that happen yet. Basically, you have to keep an eye on the system resources using the task monitor or similar.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *