Join Todd Kopriva for an in-depth discussion in this video Overview of data flow and common bottlenecks, part of Optimizing Performance with After Effects and Premiere Pro.
When talking about performance, we often talk about bottlenecks. The metaphor used is of data passing through a long thick pipe and, at some points along this pipe, there may be narrowings and, just like the neck at the end of a bottle, it's a narrowing that keeps the fluid from all pouring out quickly, the bottleneck, the narrowing in this pipeline of data is what slows the flow of data down for the entire pipe. So the data flow, very roughly, and very generally for video, is something like this.
Data is read from a hard disk, data is decoded. Decoding includes decompression from compressed formats. Then images are rendered from various inputs inclding from the image data that was just decoded and such things as key frames and effects and other things that you've done within the application. Then those resulting images are encoded. Encoding often includes compression down to compressed formats. And then that encoded data is written back out to the disc. So, what can be some of the bottlenecks here? Getting data from hard disk is largely about the speed of the discs as well as the speed of the bus. The bus being the connection between the disc and the computer. So for a disc, we're talking about such buses as USB, universal serial bus, or SATA, or eSATA, or Firewire.
We'll talk more about these in detail later. For decoding data, the processing is done on a CPU, and I specify here that it's not on the GPU, because that's often a common point of confusion. And sometimes you can have an additional device installed that will do some of the decoding work for you, taking a lot of the burden off the CPU and really speeding things up. The rendering of images takes place on the CPU or the GPU or both. But the CPU and the GPU have RAM, or memory associated with them. On the GPU it's referred to as VRAM, or video RAM. Even if you have a fast processor or many fast processors they may not be able to process very quickly if they don't have enough RAM to work with. If you only have enough RAM for one of your CPUs to work then it doesn't really matter that you have 12 CPUs or 24 CPUs in your computer. Your bottleneck in that case, is your RAM.
Encoding of data, similar to decoding of data, is done on the CPU, not on the GPU, and can often be accelerated by a third party IO device. Then writing data to the hard disk, similar to reading data from the hard disk, depends on the speed of the disk and the speed of the connection between the computer and the disk. We'll talk about the details of each of these pieces throughout this video training series. But the concept that needs to be stressed here is that if any one of these links in your chain is weak, the whole chain is weak.
Or to use the metaphor of flow if any one of these creates a bottleneck in your pipe flow through the entire pipe will be slow. Troubleshooting and optimizing performance, very often depends on identifying, where the bottlenecks are.
- Planning your work, updating, and auto-saving
- Learning and customizing keyboard shortcuts
- Optimizing hard disks and CPUs
- GPU: CUDA and OpenGL
- Using "Render Multiple Frames Simultaneously" multiprocessing
- Pre-rendering and proxies in After Effects
- Lowering resolution for previews