Some text in the Modal..

Ant Smith
Creativity is an action not an attribute... Photographic Skill: The Book - now available CLICK HERE


Specifying a PC for Image Processing

Monday 3rd December 2018 23:12pm

The Historical Context

I'm thinking about buying my next computer as HAL (my current PC's System Name) has a pair of 2-core 'Nocona' Xeons from circa 2005 which really aren't as impressive as they used to be - this dual CPU arrangement benchmarks at 930 versus 15,959 for the i7-8700k (according to CPU BenchMark). I know, that's a bit techy/geeky - suffice it to say that what was once a blisteringly fast server-class PC now limps along in comparison to the rest of the world.

My current PC then is running with a pretty dicky ticker - but it's 'probably' not possible to do a heart transplant by upgrading just the CPUs as I've installed the best that HP says the machine will support; annoying since the CPU Socket (604 mPGA) will take Xeon x7450 quad-core processors that benchmark at 8,721 (in a dual processor configuration) which would probably be good enough for me. There are tales of the HP motherboard immolating 'unsupported' processors though so I'm not going to try...

It's not THAT annoying though as the machine is stunted by more than just it's CPU. The RAM technology is the well out of date DDR2 whilst we now have DDR4 on the market which is two generations ahead and so much faster.

Because HAL has SATA III controllers I've been able to install an SSD for the system disk (which really gets him out of bed early in the day - booting in a minute or so versus the 10 minutes it used to take) - but the very best SSD speeds come from the NVMe technology not SATA and although I could fit a PCIe NVMe drive I couldn't use it as a system disk because the BIOS won't boot it!

Finally, HAL is a little slow when it comes to talking to other things. All of my connected devices (especially external backup disks) have to connect through USB2.0 because there are no USB3.0 ports on the motherboard. I could solve that by buying him a 2-port USB3.0 controller on a PCIe-4x card BUT I've already used up my only PCIe-4x expansion slot on my secondary SATA III controller so I could squeeze 3.5TB of storage into the machine... The USB2.0 ports means that making a backup of my internal 2TB data disk onto a portable 2TB USB disk takes about 24 hours.

Putting all of that together means that, unfortunately, HAL is pretty much the very definition of 'legacy'. The table below summarises all of these constraints:

(click or tap any table row to enlarge)

TypeCurrent PCPotentialImpact
ProcessorDual Nocona XeonsCoffee Lake I7-8700k16x
MemoryDual Channel DDR2@200MHz (2GB/s)DDR4-2666 (21.3GB/s)10x
Boot DiskSATA III SSD (600 MB/s)NVMe (3500MB/s)7x
Connected DevicesUSB2.0 (60MB/s)USB3.0 (640MB/s)10x

So I need a new PC, and it's pretty clear what kind of specification will serve me well for the next few years (near latest generation technologies with spare disk capacity to support 250Gb/year consumption rate - given that the last 10 years currently all sit on 2.5TB of disk storage). My only real uncertainty is, how much RAM will I need?

The RAM Requirement Explored

Modern desktop PCs are generally limited to supporting 32GB of RAM and whilst that's 4x what I have today, will it actually be enough for the next 5 years or so? Do I need to buy a server class PC again so I can populate it with, say, 256GB of RAM - or is that just insane?

I mostly use the PC for writing and image editing, dabbling occasionally in video and 3D-modelling. Writing is utterly trivial (no, I mean from a PC performance perspective) and whilst video editing and 3D-modelling are extremely intensive, I don't do enough of either to warrant spending a lot of money on a machine to do those jobs (I'm quite happy to leave my PC rendering a 3D model overnight, especially in the winter when the heat generated by the maxed-out CPUs helps to keep the flat toasty warm).

So my outstanding question is, how much RAM really makes a difference in image editing?

First of all we need to consider headroom. I have Photoshop configured to use no more than 75% of my available physical RAM, so the operating system any other bits and pieces have room to breathe. Ideally I'd like Photoshop to use no more than 50% of the physical RAM.

But however much RAM I give Photoshop, I'd like it to have twice as much as it really needs to futureproof my workflow; bear in mind I've just upgraded my Nikon D700 (12MP) camera to the D750 (24MP), and it's quite possible that within a few years I'll be working with 48MP raw files.

And also, sometimes I need to work on 2 images at once, or sometimes I will be creating 'tessellations' (see Ant Smith Reflections) which double (or even quadruple, or more!) the size of image I'm working on; so I want to double (again) the amount of RAM I can commit to photoshop.

Put all that together and I ideally need 8x more RAM than is optimal for Photoshop to work on a single image from my current camera - so you can see why 8GB is looking a little limiting right now and why I am (was) drawn to a 256GB RAM machine...

Figure 1: Showing how RAM requirements multiply

So I need to understand the RAM Photoshop needs when I am working on a typical image, since my total system RAM requirement will be 8x that value.

Understanding the image processing RAM cost

1. Base Cost

My D750 delivers raw files that are 4016px X 6016px and I work in 8bits/channel with, of course, 3 channels (Red, Green and Blue). So a single image layer 'should' cost something like

((4016pxx6016px)x(8b/channelx3channels))/(8b/byte) bytes ~= 69MB

2. Layer Stack Cost

My editing workflow looks something like:

  • Open the image onto a base (raster) layer, which I keep unmolested for reference

  • Create a new raster layer from the base layer with noise reductions and perspective adjustments applied

  • Create a new raster layer for alpha adjustments incorporating global and local contrast, brightness and 'structure' adjustments.

  • Create a new raster layer incorporating chromatic (vibrance/saturation) adjustments

  • Create a new raster layer incorporating 'atmospherics' (glows/diffusions etc...)

  • Create a final raster layer incorporating 'finishing' concerns (borders, text overlays etc...

Which gives rise to a plethora of various adjustment layers incrementally composited into (at least) the above identified 6 full-raster layers. Which means my Photoshop layer stack actually requires 6 * 69MB of RAM space: ~= 0.4GB

But I always maintain a '100% headroom' rule - because quite often things can get, more involved. So I want Photoshop to have access to enough RAM to allow for not 6, but rather 12 full raster layers when working on an image; so that 0.4GB requirement becomes 0.8GB.

3. History Cost

As well as the Layer stack (fully under my control and dictated by my workflow) Photoshop maintains a History Stack - every time an adjustment is made to a layer, Photoshop saves a snapshot of what the Layer was like beforehand, so that operations can be readily undone (or selectively applied from the history stack using the history brush tool). You can see the history stack by selecting the Window->history view which pops up the history pane. Obviously a history state (may) be a full raster copy of the layer being snapshot pre-modification; i.e. is just as costly in RAM terms as each raster layer, or the original image itself.

From the Edit->Preferences->Performance... menu dialogue you can select between 1 and 1000 history states - I'm typically using 48 history states, which typically provides me with 8 levels of undo for each of my 6 major raster layer steps in my workflow (bear in mind that the, pretty essential, Nik FX filters each generate 8 history states)

4. Total RAM cost

48 History states, each of which could cost a full raster copy of the image will require 48 * 69MB of RAM: ~= 3.2GB on top of the layer stack cost of 0.8GB. which becomes a total RAM cost of 4GB per image.

These numbers of course are stuffed full of uncertainty. Not every layer I create in Photoshop requires a full raster representation, and nor does every history state - but they COULD! Photoshop will have its own overheads too, and in fact looking again at Edit->Preferences->Performance... I can see the reported 'ideal' range of memory available to Photoshop is 3.8-5GB.

So let's say we need 5GB of RAM available to Photoshop to work with a single image.

Because sometimes I work with two images, or I use tessellation techniques and work with larger images, I really want to be able to give Photoshop 10GB of RAM.

But maybe I will upgrade my camera again and suddenly my images are twice the size, so to future proof my machine I really want to be able to give Photoshop access to 20GB of RAM.

And I've said earlier, that whilst working with Photoshop I'd like my system to only have to commit half of its RAM to Photoshop - which means really I want a PC with 40GB of RAM. 32GB (the typical upper limit of desktop class machines) will probably be fine, given that I have factored in 100% overhead for future proofing.

Specification Summary

All the above concludes that my 2018 Image Processing PC Specification looks something like:

  • I7-8700k CPU

  • 32GB DDR4-2666MHz RAM

  • 0.5TB NVMe SSD system disk

  • 4x1TB SATA III SSD RAID 0 Internal storage

  • 2xUSB3.0 connected (backup) storage

...that is, in an ideal world!

Then of course, we need to ensure Photoshop is properly tuned to make best use of the machine. When looking at the Edit->Preferences->Performance... menu dialogue I chose to work with 48 out of a possible 1000 history states, and I didn't even consider the Cache Levels and Cache Tile Size performance parameters... oh, but actually I did; and there's a whole other discussion about those to be had. Please see, my very next article on Performance Tuning Photoshop. (did I ever write that one..?)