Computers:Optimization

From ProPHOTO WIKI

Jump to: navigation, search

Contents

Bottlenecks

The fundamental consideration that users must make when optimizing a photographic computer system is to work around the bottlenecks inherent in the system. A workflow only operates as fast as its slowest step, so the key to upgrading is to figure out what exactly it is that is slowing the current system down and address it. Buying the fastest processors on the market won't help if the hard drives can't keep them fed with data, just as buying the fastest hard drives won't help if the CPU can't crunch the numbers fast enough.

Unfortunately, everyone's workflow is unique to them so the significance of the various components will varry from person to person. Image processing encompasses a broad range of tasks that stress different portions of the computer - as such, there is no single configuration that will be best for all photographers. There are plenty of simple rules that one can follow, however to squeeze every possible bit of performance out of a system users must also understand the various exceptions to those rules.

Memory

Many types of image processing consume large quantities of system memory. Things like layers, history and HDR can quickly multiply the memory footprint of an image, and given the pixel counts users are often working with this can easilly exceed the ammount of memory available to the system.

Fig 1 - Basic illustration of the operation of a pagefile.  When the data in use consumes more space than is available in physical RAM, 'pages' of memory are temporarilly moved to the hard drive.  Unfortunately, as the hard drive is much slower than RAM this can cause significant performance degredation when used heavilly.
Fig 1 - Basic illustration of the operation of a pagefile. When the data in use consumes more space than is available in physical RAM, 'pages' of memory are temporarilly moved to the hard drive. Unfortunately, as the hard drive is much slower than RAM this can cause significant performance degredation when used heavilly.
Fig 2 - The Photoshop efficiency indicator provides information about how much it is using its scratch disks.  When it reads 100%, this tells the user that it is operating completely out of RAM.
Fig 2 - The Photoshop efficiency indicator provides information about how much it is using its scratch disks. When it reads 100%, this tells the user that it is operating completely out of RAM.

When that happens, the computer must shuffle data in and out of memory and onto the hard drive (ie pagefiles and scratch discs). The problem, however, is that even the fastest hard drive arrays are still orders of magnitude slower than modern RAM so this incurs a significant performance penalty. More RAM can reduce the need to perform this process, so it can have a significant effect on the overall performance of the system.

With that said, more memory doesn't always automatically translate into higher performance. If the images that users are working with are small enough to fit into memory, the system will not have to perform this paging process. As such, if a user doesn't use more than 1GB of memory on their images, for instance, then it won't run any faster on a machine with 2GB - the additional memory will simply remain idle, so money may be better spent in other areas.

The 'efficiency' indicator within Photoshop gives users a pretty good indication of this effect on their workflow. When this shows 100%, Photoshop is working completely out of memory and not touching the scratch disc. If this is consistantly the case, then adding more RAM to the machine is unlikely to make any difference whatsoever (at least within Photoshop). Ultimately, users want to add just enough memory to keep the efficiency reading at 100 - more memory won't hurt, however the money spent on it might be better allocated to other areas of the system.

Naturally, there are a number of limitations imposed at this stage by the fact that Photoshop is still a 32-bit program so effective use of more than 2GB of RAM becomes difficult. These are covered in the 64-bit article so they aren't duplicated here. When using a machine with 2GB of memory or less, however, these do not come into effect.

Hard Drives

Hard drives have a few different effects on the performance of the computer. The most obvious effect that they can have is on the pagefile/scratch discs. When the machine runs out of RAM and has to page data between the hard drive and memory, the speed of the disk in use becomes extremely significant. While no hard drive will be remotely as fast as conventional RAM, a faster drive will mitigate the impact on performance levels when it does happen.

The significance of this, however, depends on how reliant the user is on this facility. If a user is performing simple tasks on single-layer 4MP/8-bit JPEG files using a machine equipped with 2GB of RAM, for instance, it's likely that they'll have plenty of RAM to work with. As such, the scratch discs and pagefiles will not come into play here and the drive/array in question will have little to no effect on overall performance. In this scenario, spending money on fast drives and RAID arrays will generally not show any benefits.

If, however, users routinely work on massive 22MP HDR images with dozens of layers then even a machine packed with 4GB of memory will often not be enough. In this case, it will be common to run out of physical memory and the machine will be using those scratch disks pretty heavilly. In this case, the drives will often be the gating factor of the machine's overall performance so it makes sense to get the best system you can.

Naturally, the former scenario is generally where users want to be - even the fastest hard drives don't hold a candle to RAM in overall performance. Using faster drives will help to mitigate the impact that this has but it's always better to have enough memory to avoid using them in the first place. That is, of course, not always practical (and sometimes not possible given 32-bit limits) so where the threshold falls will depend on the specific circumstances.

In addition to the page/scratch performance, hard drives also determine how fast image files can be loaded/saved onto disc. When editing images on a one-by-one basis, this is generally not a huge factor - if a user spends 10 minutes working on an image, the difference between five and ten second load times likely isn't a big deal. When performing batch processing, however, this can easilly become a major limitation - that extra five seconds multiplied by thousands of images can add up very quickly.

Related to the above, hard drives also have a significant impact on the performance of things like thumbnail generation when browsing folders of your images. When looking at a folder of new images, the software has to move through the contents of a lot of files very quickly. The processing steps required to generate the thumbnails are often simple, but they need to read the contents of the images to perform that process. While this may seem like a relatively trivial thing, it can have a very significant impact on how fast the machine feels (which, in turn, can effect how effectively the operator works).

RAID Arrays

There are two major aspects of hard drive performance that are of concern here - bandwidth and latency. The former is relatively easy to understand, it is simply the speed at which the drive can move a contiguous block of data on and off the disc. The later is how fast the drive can move to a different area of the drive when a new piece of information is required.

For tasks like loading an image file, for instance, bandwidth is the most important factor - in this task, the computer will start at the begining of the file and read it from start to finish (much like reading a novel). While the latency will come into play (how fast it can get to the begining of the file), that time is generally insignificant when compared to the time taken to read in such a large block of data.

For tasks like scratch disks and pagefiles, however, the system will be grabing relatively small blocks of data that are scattered around the disc. As the blocks of data are much smaller, the ammount of time spent moving from block to block becomes much more significant. As such, the latency of the drive can easilly make a big difference in the performance of tasks such as these.

The reason that this is mentioned here is that, while some RAID modes can significantly improve bandwidth, they can't help with latency. As such, a set of drives in a RAID 0 stripeset can provide significant boosts to certain tasks, but their effects aren't always consistant across the board. For tasks such as batch processing, a good RAID setup can often provide noticable improvements - however for things like scratch disks, its effects aren't always as pronounced.

Naturally, that's not to say they will have no effect - a scratch disk running on a stripeset will certainly be faster than one running on a single drive (given the same type of HDDs). Given the current wide availability of RAID subsystems, it can often be something worth consideration. Users should just keep in mind that they're not going to be seeing anything near double the performance.

Scratch Disk Placement

In situations where the scratch disks are in use, the Windows pagefiles will often be heavilly used as well. As such, in a single drive computer the two tasks will often be competing for access to the hard disk. Asside from having to divide bandwidth between the two jobs, the drive heads must repeatedly move between different regions of the disk. This increases the overheads inherent in this process and can, in turn, significantly increasing the performance penalty incurred by the paging process.

Note that simply placing the pagefile and scratch disk in separate partitions on the same drive will not achieve this goal. In many cases doing this can actually further decrease performance as it may physically place the two files further appart than they would be on a single partition. As such, if a second physical disk is not available then it is best to simply place them on the same volume.

Processors

The most well known component of the computer, the CPU is a critical component to any machine as it performs the actual computations. Tasks like processing RAW files or sharpening are critically dependant on the speed of the processor(s), so they are often the primary focus of many photographers when buying a new computer.

Unfortunately, quantifying the relative performance of two different processors isn't a simple matter. Microprocessors are complicated devices are there are many different facets to their designs. As such, there is no single chip that is universally superior - like all things, the user must evaluate the various options against their own workflow and select the best match for themselves. The dedicated microprocessor article covers the details of these various considerations, so it is suggested that users read through it to get a handle of the various performance metrics.

It is important to recognise, however, that a faster processor won't necessarilly translate into a faster machine. Many tasks routinely performed in this industry require performing relatively simple computations on large blocks of data. In these scenarios, the rest of the system often has trouble feeding the data in and out of the processor fast enough to keep up with the processor. When this happens, the processor must sit idle while it waits for the system to catch up and the extra horsepower can easilly go to waste.

As such, while it is often tempting to drop a pile of money on the fastest processor on the market, doing that often takes resources away from other areas of the computer that may be more significant. In many cases, purchasing a slightly slower processor and spending the savings in other areas will often provide a better overall computer system. This is especially significant at the high end, as there is often a large price premium on the top-of-the-line processor models.

Multiple Processors

A conventional single-CPU computer can only perform one task at a given time. When multiple tasks are required, the computer rapidly switches between them to simulate the effect of handling them in parallel. Computers with multiple processor cores, however, are capable of handling two (or more) tasks at a time. This can provide immense benefits, however it depends on software being able to properly take advantage of this capability.

The main complexity involved in this process is that a multiple processor system will be no faster at completing a single task. It can, however, work on multiple tasks at the same time so if provided with a set of tasks it can complete them in a shorter period of time. As such, to take advantage of this software must be designed to break up the work that it is performing into discrete blocks (called threads) so that they may be executed in parallel.

As mainstream computers have primarilly been single processor systems in the past, however, not all software packages have been written in this way. While programs like Photoshop are relatively well threaded, this is not the case for everything that will be used in a photographic workflow. This will certainly be changing in the near future as multi-core processors are becomming commonplace, and the need for multi-threaded software will grow significantly as that happens.

Unfortunately, not all tasks lend themselves to this type of design. As some tasks may depend on the results of other ones, they will be forced to wait for that information to become available before proceeding. These dependancies can create significant overheads in the threading process and hurt the effectiveness of additional processing cores. Naturally, the influence of this factor depends a lot on the type of task being performed.

Naturally, when running multiple programs at the same time the advantage of additional processors becomes more pronounced. As each program is a discrete entity, they can run independantly of one another and can take advantage of additional cores regardless of how well threaded they are. This allows a multi-processor machine to convert RAW images in one program while processing the results in another more smoothly than a single-CPU system.

In addition, multiple processor systems often feel more responsive as they leave more resources available for the user interface. While this has no direct effect on system performance, it can allow the user to work more effectively. The importance of this factor naturally depends on the specific individual, however it is something for users to consider.

Multi-Core vs. Multi-Processor

With the availability of processors containing more than one die, another consideration that comes up is whether to go with a single dual-core processor or a pair of single-core processors. As a multi-core chip is basically just two processors packaged together, there is no fundamental advantage to either design. There are some differences in specific implementations which are covered in this article, but they depend on the underlying architecture. Regardless, both approaches attain the same basic goal, so they are quite similar to one another.

The decission as to which approach is best generally comes down to the other components in the system. Single socket designs tend to be the only choice when going for desktop components, whereas workstation components tend to come in multi-socket varieties. As such, the user should generally first select the type of machine they would like and work from there.

See Also

  • Computers Portal - General articles on various computer related topics.
  • Memory - Article covering the details of different forms of system memory.
  • Hard Drives - Details on evaluating hard drives and the meaning of the various component specifications.
  • Software Portal - General articles on computer software.
Personal tools