Photoshop memory usage

Share your quick and clever Photoshop, Elements, or Curvemeister techniques here!
-default
Posts: 1916
Joined: Thu Mar 26, 2015 1:53 am

Postby -default » Tue Oct 03, 2006 10:02 pm

(this is a reprint of an article I posted on another forum)

"maria" wrote in message news:luk5i2d65b9r9qmpv2adlmp4b364i3rn40@4ax.com...
> This has been puzzl;ing me for quite a long time.
> I am watching the RAM usage on my computer, especially
> when I load Photoshop. How come Photoshop does not release
> the RAM that the loaded images occupy as soon as they are closed?
> Isn't the memory required for them in RAM?

There are several reasons for this.  Although not related to your question, the biggest one is the number of history states.  Photoshop basically saves a complete copy of our image for each history state, and will fail with an out of memory condition if it is unable to do so.  You can control this by reducing the number of history states in your prefs.

Another is that Photoshop's tmp files are actually memory mapped and occupy address space, which is what you see when the Task Manager monitors RAM use.  There is a similar thing going on when Photoshop bumps its pool of internal memory - releasing the memory flags it as free but the size of Photoshop's memory pool remains at its maximum size.  Closing an image frees the memory up internal to Photoshop, but the address space is not released.  Oink oink, but the logic behind this is that you may be opening up a large image again, and this saves Photoshop the trouble of reallocating the scratch space. 

Another reason for inflated memory size is the loading of DLL's - these are chunks of code that get mapped to Photoshop's address space, and they can hang around for some time, 10 minutes by default, after they are no longer used.

Finally, yes, the naked truth is that, for a variety of reasons shared by all mature products, Photoshop is still haunted by the ghosts of its old implementation.  Before virtual memory, on the 68000 family of Macintosh, Photoshop had to simulate virtual memory management in software.  Apple implemented virtual memory using the MMU available on the newer 68K processors, but it was dog slow, and most people kept it turned off.  This went away in windows, and in OSX, but Photoshop still continues with it's own idea of what virtual memory should be: slow and prone to run out.  This is a constant headache to people like me who support plugins while the megapixel wars force memory requirements higher and higher.

So far, the best explanation I've found of how Photoshop handles its internal memory is in this Photoshopnews article:


For those of you with images that are much larger than 300 MB, Photoshop CS2 does allow you to add an extra gig of address space.  Microsoft discusses the /3mb option here:
http://www.microsoft.com/whdc/system/platform/server/PAE/PAEmem.mspx

> The entire RAM memory is released only when the program itself is
> closed.

LOL - be thankful for that.  Other programs, such as Acrobat Reader, use resources continuously, and run in the background to minimize startup time.  As time passes, Photoshop may do the same. 

BTW - if you want to see Photoshop start up very quickly.  One is to get hold of an older version - v2.5 starts in a matter of seconds on my Mac G4, not counting the time required to fire up classic. 

Another is to download the Photoshop Speedup program from acropdf.  This uses a rather Procrustean method of speeding up Photoshop, by chopping off fonts, presets, plugins, etc, but it is impressive to see just how fast Photoshop is capable of starting up.  It should also help in situations where you are running out of memory.
http://www.programurl.com/photoshop-speedup.htm

The www.acropdf.com seems to be off the air at the moment, so this interesting little product may not be available much longer.
--

Mike Russell
I've included a copy of this, and other postings at:
www.curvemeister.com/forum/

Return to “Tips and Tricks”

Who is online

Users browsing this forum: No registered users and 2 guests