By Ctein
My previous column "Speeding Up Photoshop" described how I cut my times for memory-intensive Photoshop operations, like panorama building, by 25–30%. The key was putting the fastest hard drive I could find (the Hitachi 320 GB 7200 RPM drive) in my Macbook Pro and using the very fast Other World Computing (OWC) Mercury Elite-AL Pro 750 GB eSATA drive for scratch.
Recently, OWC released a 4 GB memory module that let me kick my RAM up to 6 GB. The memory module is state-of-the-art and so costs $200. It's worth it!
Coincidently, our friend Lloyd Chambers launched a new website loaded with useful tips for improving Photoshop performance. Our results were largely consistent, although he is running Photoshop CS4 under Mac OSX 10.5 and I'm still running Photoshop CS3 under MacOS X 10.4. Whatever you're running, you should benefit from upgrades like these.
Photoshop CS3 (Win/Mac) and CS4 (Mac) can use three quarters of a gigabyte of RAM between 3 GB and 4 GB as additional working space for plug-ins and any free RAM above 3 GB as scratch space in preference to the scratch hard drive. Lloyd's "Medium" benchmark generates a 16 GB scratch file and my panorama test generates a 23 GB file. An extra 2 GB of RAM doesn't seem like much compared to that, but as we will see, 2 GB makes a huge difference.
Maximum performance requires three Adobe Photoshop plug-ins: "DisableScratchCompress," "Bigger Tiles," and "ForceVMBuffering." DisableScratchCompress may not make much of a difference if you have a fast hard drive, but it won't hurt. Bigger Tiles instructs Photoshop to process data in larger chunks. On my system, Lloyd's medium benchmark clocked in with an abysmal 900 seconds without that plug-in. Adding a plug-in cut the time to a little over 400 seconds, putting it in the middle of Lloyd's test group.
I shouldn't have needed ForceVMBuffering, according to the technical notes. Photoshop CS3 and MacOS 10.4.11 should be using the RAM as scratch space when it's available. My initial test results, though, showed no performance gains with 6 GB of RAM. Lloyd suggested this plug-in might solve the problem, and it did. I recommend installing it unless you're positive that Photoshop is making use of all your RAM. The only disadvantage of running it is that other applications will become sluggish, because the OS will have to swap code blocks when other apps need memory space.
Even with 4 GB of RAM, ForceVMBuffering made a difference: Lloyd's benchmark time dropped to 275 seconds. With 6 GB of RAM, it was an astonishing 220 seconds. That's better than any configuration that Lloyd tested, and almost twice as fast as the no-VM-buffering time.
Panoramas like these eat up a lot of time. They are not only computationally intensive, but Photoshop generates a scratch file approximately equal to the final size of the panorama multiplied by the number of photographs you're merging.
How could my system, with a slightly slower computer, slightly less efficient OS and application, and a much slower scratch drive perform better than Lloyd's? Part of the answer lies in the effect of RAM buffering. Without it, Photoshop was doing a high level of scratch drive reads and writes. With it, Photoshop still wrote a 16 GB scratch file, but reads dropped to zero. All the data that Photoshop actually needed to run Lloyd's benchmark was being held in RAM! That's why performance jumped so amazingly; it made scratch drive performance much less important.
The unanswerable part has to do with the fact that data flow in computers is not simply the sum of the components. It is a complex choreograph of competing data resources and demands, and much of it is beyond your obvious control. Apparently my laptop's configuration is very well balanced. Lucky me! Your mileage may differ, mine certainly will on my next machine.
Things as simple as rearranging partitions and workspaces on multi-drive systems can make a profound difference. I tripled DVD burner speeds on my four-drive Windows box merely by optimizing which drives held the system, system cache, applications, data files, and application scratch space.
How did panoramas fare? On the 4 GB system, without RAM buffering, my test took 550 seconds to run, and disk reads were persistent and intensive. Installing ForceVMBuffering dropped the time to 510 seconds. 6 GB of RAM got me a 430-second time. That's a reduction in time of 20%, on top of the improvements my previous upgrades gave me.
Scratch reads dropped to a moderate level. With more RAM to buffer the data, they would have probably dropped to essentially zero, as with Lloyd's benchmark. That might yield as much as another 20% improvement. Lloyd notes that it appears that Photoshop can make use of RAM above 8 GB for buffering, at least with CS4 and Mac OSX 10.5.
My system upgrades, collectively costing approximately $500, have roughly doubled my speed on the most time-intensive Photoshop operations. My machine outruns any stock Macbook Pro, no matter how expensive or recent.
Ctein, thanks for the inspiration to look into tweaking my MBP. I notice that memory prices keep dropping and the OWB 4 GB module is now down to $197 -- is this a great deal or do you need to buy two of these modules get the full effect?
Posted by: Douglas Urner | Saturday, 24 January 2009 at 12:44 PM
FWIW that 4GB OCW module is down to $197.99 as of 1/24/09 Wow!
Posted by: Jammy | Saturday, 24 January 2009 at 12:50 PM
Love your site! Long-time viewer, first time commenter.
I'm looking forward to applying some of these techniques to improve the performance of my system when running Photoshop; great stuff!
But I've got to tell you, in the nicest way, please keep your blinking hands off of my browser.
I have it sized the way I want and really don't appreciate your website mucking w/those settings.
Thanks for your consideration on this, and thanks again for your very useful and informative site.
Posted by: mike | Saturday, 24 January 2009 at 01:06 PM
Not to start a mac vs Windows argument, but this is one reason I've always preferred windows. You can get a full size desktop without paying the price for the gloriously-awesome-yet-way-too-expensive mac pro. With a full size case you get three or four hard drive bays to fit 3.5 inch drives, not 2.5 (which can incidentally be bought in 10k or even 15k speeds), four ram slots and more. Just a thought, although you do have to buy the windows 64 bit OS. Although that's a change that I think will become standard within the next couple years. Just my two cents, and happy photoshopping
Posted by: Jeremy | Saturday, 24 January 2009 at 01:50 PM
http://www.barefeats.com/three08.html
Posted by: Stephen Best | Saturday, 24 January 2009 at 02:06 PM
the single most effective speedup for huge file operations - 150 megapixel 16bit psd with 30+ adjustment layers including masks anyone? - is to set the history cache-level of photoshop to "1". you only get ctrl/cmd-Z with that and no extra steps, but your processing time will thank you.
Posted by: grubernd | Saturday, 24 January 2009 at 02:17 PM
Looks like some great info, even though I use a PC. For PC users, I'd suggest trying more RAM and a 64-bit OS. I noticed a bigger difference between 2 and 4GB, than between 4GB and 8GB. On the other hand, I'm hardly a sophisticated Photoshop user. RAM prices are cheap, so I'd suggest just maxing out your motherboard. I'm using 8GB. Using Vista64 also made a difference, as did upgrading to CS4.
Posted by: Eric | Saturday, 24 January 2009 at 02:20 PM
Are there any tricks like this I can use to improve Lightroom performance?
Posted by: Robin Dreyer | Saturday, 24 January 2009 at 02:41 PM
Dear Douglas,
You can only use one of these modules. OWC Has found that the 'Books are not stable running 8 GB of RAM. At this point it's not known whether this is a hardware, firmware, or OS issue. Be that as it may, 6 GB is the most you can install.
If you're already running 4 GB of RAM, that means replacing one of the 2 GB modules with the 4 GB module. If you have a "stock" machine with 2 GB of RAM, it means replacing both of the 1 GB modules with 2 and 4 GB modules. OWC sells a 6 GB combination package as well as the 4 GB modules singly.
~ pax \ Ctein
[ Please excuse any word-salad. MacSpeech in training! ]
======================================
-- Ctein's Online Gallery http://ctein.com
-- Digital Restorations http://photo-repair.com
====================================== of
Posted by: ctein | Saturday, 24 January 2009 at 02:56 PM
Dear Douglas,
You can only use one 4 GB module. OWC has found that the 'Books are not stable with 8 GB of RAM. It is not known whether this is a hardware, firmware, or OS problem. Regardless, the maximum allowable RAM is 6 GB.
If you already have 4 GB of RAM in your machine, that means swapping out one of the 2 GB modules for the 4 GB module. If you're running a "stock" Book with only 2 GB of RAM, you swap out both 1 GB modules for 2 and 4 GB modules.
~ pax \ Ctein
[ Please excuse any word-salad. MacSpeech in training! ]
======================================
-- Ctein's Online Gallery http://ctein.com
-- Digital Restorations http://photo-repair.com
======================================
Posted by: ctein | Saturday, 24 January 2009 at 03:02 PM
Dear Jeremy and Stephen,
What machine one should buy is outside the scope of this column. People have all sorts of reasons for choosing the platform they do, whether it's Mac or PC, laptop or desktop. I'm only addressing maximizing your performance for whatever platform you've chosen.
Summarized, my recommendations apply universally. In fact, they apply even more strongly to desktop 64 bit Windows machines running CS4 than they do to Mac laptops. Short form is this:
** Maximizing your hard drive speed and having your scratch files on a different hard drive/data bus than your other files gets you a big performance boost. Avoid USB like the plague.
** Maximizing your RAM gets you an even bigger performance boost for large file operations.
** Making sure that Photoshop is configured to process the data in large chunks and actually using of all that RAM gets you the biggest performance boost.
Doing all of these things can double your system performance for a lot less than the cost of a new machine.
~ pax \ Ctein
[ Please excuse any word-salad. MacSpeech in training! ]
======================================
-- Ctein's Online Gallery http://ctein.com
-- Digital Restorations http://photo-repair.com
======================================
Posted by: ctein | Saturday, 24 January 2009 at 03:10 PM
Dear Robin,
Not a clue. I have never used Lightroom nor Aperture. Perhaps other readers have knowledge about these.
~ pax \ Ctein
[ Please excuse any word-salad. MacSpeech in training! ]
======================================
-- Ctein's Online Gallery http://ctein.com
-- Digital Restorations http://photo-repair.com
======================================
Posted by: ctein | Saturday, 24 January 2009 at 03:12 PM
"The single most effective speedup for huge file operations is to set the history cache-level of photoshop to '1.'"
Is this true? If so, a very cool tip. Thanks, grubernd.
Posted by: Robert Noble | Saturday, 24 January 2009 at 04:50 PM
Very huge difference in speed both for Photoshop and Lightroom is using Quad core CPU.
For Windows users, the more RAM the better since Photoshop CS4 is 64bit on 64bit Windows. It can use all your RAM if you want to.
So if you have less than 8GB RAM and less than 4 cores you know what to upgrade - it is quite cheap nowadays.
Posted by: Boris | Saturday, 24 January 2009 at 07:21 PM
Can anyone comment on using a solid state/ram disk internal/external drive as a scratch disk in Windows. diglloyd dumps a big barrel of cold water on the concept for macs.
Posted by: Raymond St Arnaud | Saturday, 24 January 2009 at 08:23 PM
I have been using the most amazing computer for the last few months, one in the Gateway Phenom FX series (... super cheap, and 8GB RAM. I can run Photoshop and Lightroom at the same time with no lag (what a concept), and I do push these programs pretty hard. It works faster than any Mac I've been on, even with running Windows Vista :D
I'd recommend this to everyone! (Gateway should be paying me for this!)
Posted by: Tanya Plonka | Saturday, 24 January 2009 at 08:34 PM
Dear Ctein,
"** Maximizing your hard drive speed and having your scratch files on a different hard drive/data bus than your other files gets you a big performance boost. Avoid USB like the plague."
How does one do this? I have 2 external drives hooked to my (Dell Win XP) laptop dock: one for photos; another for music. So far as I know the only way to connect them is via USB.
Thanks!
Adam
Posted by: Adam Isler | Saturday, 24 January 2009 at 08:51 PM
Wondering why you would want to process images on a laptop?
On the road, I use the laptop to view images and maybe make some Web JPEGs. Then, at home, I use a big desktop system, with more RAM and disk space than any laptop can dream of...and three 24" calibrated CRTs.
Even though the latter system is several years older, it still does the job better.
Right tool for the job and all that.
As for speed, well, I observed a long time ago that my computer spends nearly all of its time waiting for me.
Cheers.
Posted by: Tyler Monson | Saturday, 24 January 2009 at 09:15 PM
Dear Boris,
Improvements from multiple cores depend on what you're doing. A great deal of Photoshop (and third-party plug-in) code doesn't take advantage of multiple cores. All the heavy lifting ends up being done by one core. The other cores can handle ancillary tasks, so they provide some modest performance improvement, but that's about it.
Unfortunately for me, the operations that end up having me tapping my foot and waiting the most are primarily of that nature. Panoramas, for example. Lots of bit-fiddling with the history brush or a masked layer, for another.
~ pax \ Ctein
[ Please excuse any word-salad. MacSpeech in training! ]
======================================
-- Ctein's Online Gallery http://ctein.com
-- Digital Restorations http://photo-repair.com
======================================
Posted by: ctein | Saturday, 24 January 2009 at 09:37 PM
Dear Raymond,
I would trust Lloyd in such matters. He is almost always right.
Unless you have an incredibly powerful system, Photoshop can't feed data to/from the scratch drive faster than a speedy hard drive can handle. The fact that my best benchmark is as good or better than he is, even though I'm running an external drive that pumps "only" about 90 MB per second, strongly supports this.
~ pax \ Ctein
[ Please excuse any word-salad. MacSpeech in training! ]
======================================
-- Ctein's Online Gallery http://ctein.com
-- Digital Restorations http://photo-repair.com
======================================
Posted by: ctein | Saturday, 24 January 2009 at 09:41 PM
Dear Adam,
If your laptop only has USB external support, then you're screwed. If it has any kind of a "PC" or "express" card slot, you can buy cards inexpensively that will support eSATA. See my previous column, linked at the beginning of this article, for an example of such a card and a description of what happens to performance when you try to use USB as your scratch drive.
You will probably be much, much better off putting the scratch file on your machine's internal drive if you're stuck with only USB external drives.
~ pax \ Ctein
[ Please excuse any word-salad. MacSpeech in training! ]
======================================
-- Ctein's Online Gallery http://ctein.com
-- Digital Restorations http://photo-repair.com
======================================
Posted by: ctein | Saturday, 24 January 2009 at 09:46 PM
Dear Tyler,
At home my MacBook Pro gets hooked up to my calibrated 23" Apple Cinema display. I use the laptop's screen for the palettes and tool windows, and the Cinema display for the image window(s).
With the kind of work I do in Photoshop, I spend way too much time waiting for the machine unless it's a VERY fast machine. I don't care about the times when the machine waits for me. It doesn't get bored. I do.
This is the right tool for the job for me. Your mileage may differ. I am not prescribing to people what kind of machine they should get; everyone's needs are different. Neither should you.
(By the way, I, too have a several-year-old desktop PC that, when I got it, was a high-end performer. My currently-configured MacBook Pro runs rings around it.)
~ pax \ Ctein
[ Please excuse any word-salad. MacSpeech in training! ]
======================================
-- Ctein's Online Gallery http://ctein.com
-- Digital Restorations http://photo-repair.com
======================================
Posted by: ctein | Saturday, 24 January 2009 at 09:54 PM
Ctein,
I was surprised that a man with so much fancy hardware doesn't run his Mac using the most up-to-date OS.
Time Machine is wonderful. Cover Flow is a great help to find scans fast and easy.
Chris
Posted by: Christer Almqvist | Sunday, 25 January 2009 at 05:37 AM
Ctein,
Have you considered updating your book on restoration to a newer commands for the newer photoshops?
Posted by: Peter MacColeman | Sunday, 25 January 2009 at 01:33 PM
Dear Chris,
My MacBook came with 10.4. I simply haven't needed 10.5 yet. OS upgrades always take time, especially the time reconfiguring software, getting patches, discovering what's now broken and fixable... or not.
My Windows machine is still running Win2K, for the same reason.
I've had copies of Vista and 10.5 for a year. I'll be setting up boxes running 10.5 (or 6) and Vista sometime in the next 6 months. Haven't needed them before, waste of time upgrading before I did.
(I don't particularly care about TM or CF and won't be using them, except in the most minimal ways, even after I install 10.5/6 -- my current backup and browsing utilities suit me better.)
As with hardware, per my previous column, procrastination *IS* a virtue.
(I've never installed an OS before the second major patch kit came out. Prudence is another virtue. Let the pioneers collect the arrows)
pax / Ctein
Posted by: ctein | Sunday, 25 January 2009 at 01:43 PM
P.S. to Chris
If I've given the impression I have lots of fancy (translation:expensive) hardware, that's my mistake. I don't. I have two computers-- a desktop PC that's 7 years old and has been upgraded so many times that only the case is original, and the MacBook Pro. I bought the cheapest MacBook Pro I could and bought both the MBP and the Cinema display "used" thru the Apple Store-- the amount I saved on the combo almost equals the cost of all the upgrades I've made in the past 15 months.
That's not a lot of core hardware for someone whose professional and personal life requires a close association with computers 75% of the time.
pax / Ctein
Posted by: ctein | Sunday, 25 January 2009 at 02:37 PM
Dear Peter,
That's precisely what I'm starting on as soon as I finish all the dye transfer prints! The text for the second edition of DIGITAL RESTORATION is due in mid-year; the book will come out some time next year.
There will be quite a few technique changes, what with a major redesign of Photoshop since CS2, plus three years worth of hardware progress. Fortunately, the publisher agrees with me that any material I excise from the first edition I can post on my web site. That allows me to slash old content with a free conscience. In the bad old days of book revisions, figuring out what could be safely cut from a dense book like this was a nightmare.
pax / Ctein
Posted by: ctein | Sunday, 25 January 2009 at 04:39 PM
Hi all,
My 2 cents are that maximizing system performance is all about making sure that:
1. CPU
2. Memory
3. All I/O
is not constrained at any time. In order to tune your system, you have to measure these three items and compare changes to them (at an operating system level).
In Windows, you should use the Performance MMC snapin (pre-Vista/2008 server), the Resource Manager (Vista / 2008 server), or the new Performance Management Center (Windows 7). You select the right metrics to gauge, normally CPU utilization, memory free, disk throughput, disk queue lengths, and interrupts are good starting points. This will give you overall system metrics. To get process specific metrics, I would recommend downloading Process Explorer (http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx).
In UNIX or OS X, the best tool is probably not Activity Monitor, but iostat and top in Terminal. I've just bought my first Mac after Christmas, and have previously used Gentoo Linux, so the terminal is the for me the most familiar tool. Start up a terminal and type in:
top (and hit enter -- no joke; the tool is called top)
iostat -w 1 (and hit enter -- in another terminal window) or
iostat -Iw 1 (to check the cumulative totals of your running processes)
For process specific metrics you will need Shark which is bundled with XCode (http://developer.apple.com/tools/performance/optimizingwithsystemtrace.html). Given that OS X now uses dtrace; this tool allows you to look at every library call every process makes -- so you can start it to measure exactly what photoshop is doing at any particular moment.
A simple interpretation of the above is:
1. If your CPU(s) are at 100% and mostly assigned to the photoshop process, then your computer is CPU bound, and upgrading your processor is likely to help.
2. If your disk queue is long or staying at a level that is close to the maximum throughput of your drive, then upgrading your storage solution or tuning your disk cache
3. If you are having page faults, then you need more RAM.
ctein et al.; if you run the above as you enable your plugins or other hardware changes you should be able to measure the differences at an operating system level which should be more accurate. An operating system is always going to be running other processes in the background; so making stop watch measurement will only be subjective -- but not truly comparable.
If possible, finding the right tool within the operating system to measure performance should lead you to making better informed tuning decisions.
Posted by: pakmingw | Monday, 26 January 2009 at 05:15 AM
Ctein,
That is wonderful to hear. I taught myself photoshop from using your book for the most part so I am curious to see what techniques you are updating.
Have you thought about updating any of the OS X based information?
I would be curious to see how your workflow changed over the last three years.
Posted by: Peter MacColeman | Tuesday, 27 January 2009 at 10:15 AM
Hello,
I dabble a bit into digital photography, and love making pano's and hdr (mostly because it's seriously fun to stitch together the photos).
If you're into panos, I seriously reccommend using a program called Autopano Pro. It's seriously good, and it's available for windows, mac, and linux. No, I'm not related to the company, I'm just a fan of that program. Try it, I'd love to see your review of that product.
Cheers!
Posted by: GVdP | Wednesday, 28 January 2009 at 04:54 AM