If you're using After Effects CS6 or later, see Memory and Storage | CC, CS6.
- Memory (RAM) usage in 64-bit After Effects
- Advantages of a 64-bit application and 64-bit address space
- Memory & Multiprocessing preferences
- Memory pool shared between After Effects, Premiere Pro, Encore, and Adobe Media Encoder
- Memory & Multiprocessing Details dialog box
- Memory (RAM) requirements for rendering
- Purging memory (RAM)
- Show All
Memory (RAM) usage in 64-bit After Effects
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 reduce the frequency with which frames and components of frames are re-rendered.
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.
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.
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 earlier 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.
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—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.
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 multi-threaded 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.
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 Using 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:
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.
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.
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.
The Memory & Multiprocessing Details dialog box contains additional information about installed RAM and current and allowed RAM usage. It also includes a multicolumn 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 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.
For tips on decreasing memory requirements and increasing performance, see Improve performance by simplifying your project.
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.
The maximum amount of memory that one frame can occupy is 2 GB.
The maximum size for any single memory allocation is 2 GB.
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.
Storage requirements for output files
Use the following formula to determine the number of megabytes required to store one uncompressed frame at full resolution:
(height in pixels) x (width in pixels) x (number of bits per channel) / 2,097,152
The value 2,097,152 is a conversion factor that accounts for the number of bytes per megabyte (220), the number of bits per byte (8), and the number of channels per pixel (4).
DV NTSC (720x480) frame in an 8-bpc project: 1.3 MB
D1/DV PAL (720x576) frame in an 8-bpc project: 1.6 MB
HDTV (1920x1080) frame in a 16-bpc project: 16 MB
4K digital cinema (4096x2304) frame in a 32-bpc project: 144 MB
Because video is typically compressed during encoding when you render to final output, you can’t just multiply the amount of memory required for a single frame by the frame rate and composition duration to determine the amount of disk space required to store your final output movie. However, such a calculation can give you a rough idea of the maximum storage space you may need. For example, one second (approximately 30 frames) of uncompressed standard-definition 8-bpc video requires approximately 40 MB. A feature-length movie at that data rate would require more than 200 GB to store. Even with DV compression, which reduces file size to 3.6 MB per second of video, this storage requirement translates to more than 20 GB for a typical feature-length movie.
It is not unusual for a feature-film project—with its higher color bit depth, greater frame size, and much lower compression ratios—to require terabytes of storage for footage and rendered output movies.
Caches: RAM cache, disk cache, and media cache
As you work on a composition, After Effects temporarily stores some rendered frames and source images in RAM, so that previewing and editing can occur more quickly. After Effects does not cache frames that require little time to render. Frames remain uncompressed in the image cache.
After Effects also caches at the footage and layer levels for faster previews; layers that have been modified are rendered during the preview, and unmodified layers are composited from the cache.
When the RAM cache is full, any new frame added to the RAM cache replaces a frame cached earlier. When After Effects renders frames for RAM previews, it stops adding frames to the image cache when the cache is full and begins playing only the frames that could fit in the RAM cache.
Green bars in the time ruler of the Timeline, Layer and Footage panels mark frames that are cached to RAM. Blue bars in the Timeline panel mark frames that are cached to disk.
Layer Cache Indicators (CS5.5 and later)
Layer cache indicators allow you to visualize cached frames on a per-layer basis. This is helpful when trying to determine which layers are cached in a composition.
Enable the Layer Cache Indicators option by selecting it in the Timeline panel menu. The Show Cache Indicators option must be enabled in the menu to see the indicators.
Once Layer cache indicators are enabled they will be visible underneath each layer in the composition. Each layer becomes slightly narrower to allow for the indicators. Like Timeline, Layer, and Footage panels, cache indicators may appear as one of the following colors:
Showing the cache indicators decreases performance slightly.
After Effects can store rendered items to your hard disk when the RAM cache is full during standard previews. Blue bars in the time ruler of the Timeline, Layer and Footage panels mark frames that are cached to disk.
The disk cache is not used for RAM previews. It is only used for standard previews. (See Use standard preview to play video.)
In After Effects CS5.5 and later, Disk Cache is enabled by default.
For disk cache preferences, and to enable, or disable disk caching:
Even when disk caching is enabled, each frame must be able to fit into a contiguous block of RAM. Enabling the disk cache doesn’t help with limitations regarding inadequate RAM to hold or render a single frame of your composition.
For the best performance with disk caching, select a folder that’s on a different physical hard disk than your source footage. If possible, the folder should be on a hard disk that uses a different drive controller than the disk that contains your source footage. A fast hard drive or SSD with as much space allocated as possible is recommended for the disk cache folder. The disk cache folder can’t be the root folder of the hard disk.
As with the RAM cache, After Effects only uses the disk cache to store a frame if it’s faster to retrieve a frame from the cache than to rerender the frame.
The Maximum Disk Cache Size setting specifies the number of gigabytes of hard disk space to use. In After Effects CS6, the default disk cache size is set to 10% of the volume's total size, up to 100 GB. In After Effects CS5.5, this amount is 20 GB, by default. Because of this, many more frames are eligible for disk caching than in previous versions.
In After Effects CS5.5, the application checks to make sure that you have 10 GB free above what is set in Preferences > Media & Disk Cache. After Effects warns you if there is not enough room for the disk cache.
Roto Brush frames are not persistently cached.
When After Effects imports video and audio in some formats, it processes and caches versions of these items that it can readily access when generating previews. Imported audio files are each conformed to a new .cfa file, and MPEG files are indexed to a new .mpgindex file. The media cache greatly improves performance for previews, because the video and audio items are not reprocessed for each preview.
When you first import a file, you may experience a delay while the media is being processed and cached.
A database retains links to each of the cached media files. This media cache database is shared with Adobe Media Encoder, Premiere Pro, Encore, Soundbooth, so each of these applications can each read from and write to the same set of cached media files (Note: Adobe Audition CS5.5 does not share the media cache database). If you change the location of the database from within any of these applications, the location is updated for the other applications, too. Each application can use its own cache folder, but the same database keeps track of them all.
Choose Edit > Preferences > Media & Disk Cache (Windows) or After Effects > Preferences > Media & Disk Cache (Mac OS), and do one of the following:
- Click one of the Choose Folder buttons to change the location of the media cache database or the media cache itself.
- Click Clean Database & Cache to remove conformed and indexed files from the cache and to remove their entries from the database. This command only removes files associated with footage items for which the source file is no longer available.
Before clicking the Clean Database & Cache button, make sure that any storage devices that contain your currently used source media are connected to your computer. If footage is determined to be missing because the storage device on which it is located is not connected, the associated files in the media cache will be removed. This removal results in the need to reconform or re-index the footage when you attempt to use the footage later.
Cleaning the database and cache with the Clean Database & Cache button does not remove files that are associated with footage items for which the source files are still available. To manually remove conformed files and index files, navigate to the media cache folder and delete the files. The location of the media cache folder is shown in the Conformed Media Cache preferences. If the path is truncated, click the Choose Folder button to show the path.