Memory (RAM) usage in 64-bit After Effects

Advantages of a 64-bit application and 64-bit address space

The maximum amount of RAM that a 32-bit application can use is 4 GB, which is much less than the amount of RAM that can be installed in modern computers and addressed by 64-bit operating systems. After Effects CS4 was a 32-bit application, and it was only able to use more than 4 GB of RAM by starting separate instances (processes) of the After Effects CS4 application to render multiple frames simultaneously. After Effects CS5 is a 64-bit application, so each process can use all of the RAM addressed by 64-bit Windows Vista, Windows 7, and Mac OS operating systems.

The ability of After Effects to use large amounts of RAM per process provides several advantages:

  • You can render much larger compositions—both for preview and for final output—with larger frame sizes and larger source files.

  • RAM previews can be much longer.

  • You can work with higher color bit depths without encountering memory limitations.

  • After Effects can cache more items, which reduces the frequency with which frames and components of frames are re-rendered.

Memory & Multiprocessing preferences

Set memory and multiprocessing preferences by choosing Edit > Preferences > Memory & Multiprocessing (Windows) or After Effects > Preferences > Memory & Multiprocessing (Mac OS).

As you modify settings in the Memory & Multiprocessing dialog box, After Effects dynamically updates helpful text in the dialog box that reports how it will allocate and use memory and CPUs.

The RAM Reserved For Other Applications preference is relevant whether or not Render Multiple Frames Simultaneously is selected. The settings in the After Effects Multiprocessing category are relevant only if Render Multiple Frames Simultaneously is selected.

Todd Kopriva provides information about optimum memory and processor settings on the Adobe website.

RAM Reserved For Other Applications
Increase this value to leave more RAM available for the operating system and for applications other than After Effects and the application with which it shares a memory pool. (See Memory pool shared between After Effects, Premiere Pro, Encore, and Adobe Media Encoder.) If you know that you will be using a specific application along with After Effects, check its system requirements and set this value to at least the minimum amount of RAM required for that application. Because performance is best when adequate memory is left for the operating system, you can’t set this value below a minimum baseline value.

Render multiple frames simultaneously

For a video tutorial about using Render Multiple Frames Simultaneously multiprocessing in After Effects, see the video2brain website.

After Effects can start additional processes of the After Effects application to run in the background to assist the main foreground application with the rendering of frames for RAM previews or final output. These background processes have the name AfterFX.exe (Windows) or aeselflink (Mac OS).

In this form of multiprocessing, each background process renders its own frame and runs on a separate processor core (CPU). The number of processes used to render multiple frames simultaneously is never more than the number of processors.
Note: On many computer systems, After Effects CS5 can use the virtual (logical) processor cores created by hyperthreading for various forms of multiprocessing, including Render Multiple Frames Simultaneously multiprocessing. After Effects CS4 and earleir could only use the physical cores for Render Multiple Frames Simultaneously multiprocessing.

The number of background processes that can run on your computer also depends on the total amount of installed system RAM and the amount of RAM that is assigned to the After Effects application.

The amount of RAM required for each background process varies depending on your system configuration and compositions.

Note: When the RAM cache (the RAM available for storing RAM preview frames) is nearly full, the background processes cease rendering and go into a low-memory-usage state, and the foreground process starts rendering—just as if Render Multiple Frames Simultaneously were off. This means that the rendering of a RAM preview will be fast at first, and then the speed will step down as rendering switches to only one processor core.

Using the Render Multiple Frames Simultaneously multiprocessing feature does not speed up the rendering of all compositions. The rendering of some compositions is memory-intensive, such as when you are working with very large background plates that are several thousands of pixels tall and wide. The rendering of some compositions is bandwidth-intensive (I/O-intensive), such as when you are working with many source files, especially if they are not served by a fast, local, dedicated disk drive. The Render Multiple Frames Simultaneously multiprocessing feature works best at improving performance when the resource that is most exercised by the composition is CPU processing power, such as when applying a processor-intensive effect like a glow or blur.

Because antivirus software operates by monitoring every read and write operation, such software can decrease rendering speed, especially with the Render Multiple Frames Simultaneously preference selected.

Note: After Effects can also use multiple threads to accelerate rendering of a single frame. This form of multiprocessing doesn’t depend on the Render Multiple Frames Simultaneously preference.
RAM Allocation Per Background CPU
Specifies the minimum amount of RAM that will be allocated to each background process, each of which runs on its own CPU (processor core). Setting this value lower can allow more CPUs to be used simultaneously with a limited amount of RAM. However, if you set this value too low for the kinds of frames that you are rendering, then the background processes will fail to render frames at all, and only the foreground process will be used to render frames. For example, you should not set this value to low value of 0.75 GB if you are rendering frames with the pixel dimensions of high-definition television or digital cinema.
The optimum amount of RAM to allocate for each of the background processes varies according to project settings (such as color bit depth), composition settings (such as pixel dimensions of the composition frame), and what effects are applied. For a typical standard-definition television project, at least 1 GB per background process is recommended. For a typical project with HDTV-sized compositions, at least 2 GB per background process is recommended for optimum performance. Start with these settings, but run some tests with your own computer systems and projects to determine the best settings for your specific needs. Digital cinema projects and projects with larger frame sizes require even more RAM per background process for optimum performance.

CPUs Reserved For Other Applications
Set this value to a number other than 0 to prevent After Effects from using all of the CPUs (processor cores) in your computer system. For example, if you have a computer with 8 CPUs, setting this value to 2 leaves 6 CPUs for After Effects.
In many cases, performance is improved by using fewer than the maximum number of processors for Render Multiple Frames Simultaneously multiprocessing, even when you have enough RAM for all of the processors. After Effects is a multithreaded application that can also use other forms of multiprocessing beyond just Render Multiple Frames Simultaneously multiprocessing, and it is possible for the processors to become “overscheduled” if these threads are competing for the same resources as the background processes used for rendering with Render Multiple Frames Simultaneously multiprocessing. Therefore, the best approach is to begin by using a small number of processors for Render Multiple Frames Simultaneously multiprocessing; and then increase the number of processors used until you find the optimum number for your computer system and compositions.

When After Effects temporarily disables multiprocessing with Render Multiple Frames Simultaneously

If After Effects can’t use background processes to render multiple frames simultaneously, a message appears in the Info panel, and After Effects uses only the main foreground process to render all frames. These messages include the following:

  • “Insufficient RAM. Multiprocessing is off.”

  • “Incompatible effect or expression. Multiprocessing is off.”

  • “Incompatible preview mode. Multiprocessing is off.”

  • “Incompatible composition. Multiprocessing is off.”

In general, the reasons for After Effects temporarily disabling Render Multiple Frames Simultaneously multiprocessing fall into these categories:

  • The rendering of a single frame requires more RAM than is available to the individual background processes.

  • The project uses OpenGL for rendering of previews or final output. The Render Multiple Frames Simultaneously multiprocessing feature works by using background processes on multiple CPU processor cores to render frames, whereas rendering with OpenGL works by moving processing to the GPU. (See Render with OpenGL.)

  • The composition uses an effect that relies on GPU processing. These effects are generally effects implemented with Pixel Bender.

  • The composition contains a live Photoshop 3D layer. (See 3D object layers from Photoshop.)

  • The composition uses an effect with a temporal component that renders much more quickly when the rendering process has access to a cache of previous frames. These effects include some effects with a Temporal Smoothing option.

  • The composition uses an effect with a temporal component that requires frames to be rendered in strictly sequential order.

If a composition uses any of the following effects, the composition will not be rendered with the Render Multiple Frames Simultaneously multiprocessing feature:

  • Auto Color

  • Auto Contrast

  • Auto Levels

  • Cartoon

  • Lens Blur

  • Particle Playground

  • Shadow/Highlight

Note: Some third-party effects—such as CC Time Blend and RE:Vision Effects Video Gogh—are also incompatible with the Render Multiple Frames Simultaneously multiprocessing feature.

Memory pool shared between After Effects, Premiere Pro, Encore, and Adobe Media Encoder

After Effects shares a memory pool with Adobe Media Encoder, Premiere Pro, and Encore. This is indicated in the Memory & Multiprocessing preferences panel by the icons for each of these applications at the top of the panel. The icons are dimmed for the applications that are not running.

A memory balancer prevents swapping of RAM to disk by dynamically managing the memory allocated to each of the applications. Each application registers with the memory balancer with some basic information: minimum memory requirements, maximum memory able to be used, current memory in use, and a priority. The priority has three settings: low, normal, and highest. Highest is currently reserved for After Effects and Premiere Pro, when it is the active application. Normal is for After Effects in the background or Adobe Media Encoder in the foreground. Low is for background servers of Premiere Pro or Adobe Media Encoder in the background.

Note: An example of a practical result of the shared memory pool is that starting Premiere Pro will decrease the amount of RAM available to After Effects for RAM previews; quitting Premiere Pro will immediately free RAM for After Effects and extend the possible duration of RAM previews.

Memory & Multiprocessing Details dialog box

The Memory & Multiprocessing Details dialog box contains additional information about installed RAM and current and allowed RAM usage. It also includes a multi-column table listing processes related to Adobe Media Encoder, After Effects, Premiere Pro, and Encore. The table includes information about each process, such as ID, Application Name, Minimum Needed Memory, Maximum Usable Memory, Maximum Allowed Memory, Current Memory, and Current Priority.

To open the dialog box, choose Edit > Preferences > Memory & Multiprocessing (Windows) or After Effects > Preferences > Memory & Multiprocessing (Mac OS), and click the Details button at the bottom of the preferences dialog box.

You can copy the information to the clipboard with the Copy button.

Memory (RAM) requirements for rendering

Memory requirements for rendering of a frame (either for previews or for final output) increase with the memory requirement of the most memory-intensive layer in the composition.

After Effects renders each frame of a composition one layer at a time. For this reason, the memory requirement of each individual layer is more relevant than the duration of the composition or the number of layers in the composition when determining whether a given frame can be rendered with the available memory. The memory requirement for a composition is equivalent to the memory requirement for the most memory-intensive single layer in the composition.

The memory requirements of a layer increase under several circumstances, including the following:

  • Increasing the project’s color bit depth

  • Increasing the composition resolution

  • Using a larger source image

  • Enabling color management

  • Adding a mask

  • Adding per-character 3D properties

  • Precomposing without collapsing transformations

  • Using certain blending modes, layer styles, or effects, especially those involving multiple layers

  • Applying certain output options, such as 3:2 pulldown, cropping, and resizing

  • Adding shadows or depth-of-field effects when using 3D layers

After Effects requires a contiguous block of memory to store each frame; it cannot store a frame in pieces in fragmented memory. For information about how much RAM is required to store an uncompressed frame, see Storage requirements for output files.

Note: For tips on decreasing memory requirements and increasing performance, see Improve performance by simplifying your project.

Purging memory (RAM)

Occasionally, After Effects may display an alert message indicating that it requires more memory to display or render a composition. If you receive an out-of-memory alert, free memory or reduce the memory requirements of the most memory-intensive layers, and then try again.

Free memory immediately with one or more of the commands in the Edit > Purge menu.

Troubleshooting memory issues

Error: “Unable to allocate enough memory to render the current frame....”

Either decrease the memory requirements for the rendering of this frame, or install more RAM.

Error: “Unable to allocate [n] MB of memory....”

Either decrease the memory requirements for the rendering of this frame, or install more RAM.

Error: “Image buffers of size [width]x[height] @ [depth] bpc ([n] GB) exceed internal limits...”

Decrease the memory requirements for the rendering of this frame.

Note: The maximum amount of memory that one frame can occupy is 2 GB.

Error: “Memory allocation of [n] GB exceeds internal limits...”

Decrease the memory requirements for the rendering of this frame.

Note: The maximum size for any single memory allocation is 2 GB.

Online resources about memory and multiprocessing

For a video that demonstrates some of the advantages of a 64-bit After Effects application and how to allocate memory to After Effects and other applications, see the Adobe website.