Click for Data Doubler kits!
Click for Data Doubler kits!


One Click on the Banner shows support to my Sponsors


Accelerate Your Mac!  - the source for performance news and reviews
The Source for Mac Performance News and Reviews
Don't forget to check out all the other site features!

Photoshop/Finder Memory Allocation Bug?
Last Updated: 10/16/98

[See Adobe's Reply stating this behavior is normal]



At least two readers reported they saw very odd memory usage with Photoshop 4 and 5 when Photoshop is allocated 100MB or more of RAM. I have confirmed their findings in OS 8.x with both Photoshop 4.01 and 5.

Here's how to see the problem (see images below for illustrations):

  • With 108,000KB or less of RAM allocated to Photoshop, launch the program.
  • Go the the finder and check 'About This Computer' under the Apple menu (note RAM used)
  • Exit Photoshop
  • Allocate 109,000KB or more of RAM to Photoshop.
  • Launch the application.
  • Go back to the finder and check 'About This Computer' and check the memory used.

You'll see that a very large portion of the Photoshop allocated RAM is shown as used - even with no image loaded (compare that to the same graph with just 1MB less RAM allocated to see the dramatic change). The reader swap file test update indicates this is apparently a bug in the finder reported memory usage.

Here are two screenshots illustrating the effect in both Photoshop 4.0 (150MB allocated) and Photoshop 5.0 (120MB allocated). No image was loaded in either case.

Below are two screenshots of the finder's memory usage taken at 108,000K and 109,000K RAM allocations - notice the dramatic difference in RAM usage by Photoshop (both cases are with no image loaded in Photoshop).

PS allocated 108,000K
Photoshop with 108,000KB RAM allocated

PS allocated 109,000K
Photoshop with 109,000KB RAM allocated

Allocations above 109,000KB continute to show the same odd behavior. I did not test all the combinations between 108,000KB and 109,000KB to see where the exact breakpoint is. Photoshop 4.01 also behaves the same way (see below):

Photoshop 4 exhibits the same behavior Photoshop 4 proof

Possibly there is some simple explanation for this but the report of Photoshop using the scratch disk (swap file) with a 3MB image in a 615MB allocation is troubling. Here is a copy of the reader post in my Message Boards:

" Ram and Photoshop
I have 615MB of RAM allocated to Photoshop. When I open a document that is 3MB, it taps into the scratch disk. Am I running Photoshop correctly? Running a 9600/200/672MB/4GB, Mac OS 8.0, Photoshop 4.0. "

Update: Reader tests for swap file activity:

" OK some preliminary results: (All tested under 8.5 release)

I set Photoshop 5.0 RAM to 250MB
Of course, when i opened the app, 90% of the ram was taken as reported by about this computer. I set Photoshop up to use an external swap disk so i could watch to see if the R/W lights would blink.

The disk had 2,937Mbytes free before i opened up the Photoshop application (as reported by the get info dialog box of that HD).

So once Photoshop opens the space reported used by the HD goes up to 2,938MB used.

I then open up a 40MB TIFF and the space used on the HD goes up to 2,999MB.

I then choose but NOT YET apply the lens flare filter and the space used on the HD goes up to 3,059MB. During the cpu processing of that filter, the HD light does not blink, but immediately after i apply the filter there is definitely HD activity for a good 10-15 seconds (this is a non-raid drive, External ultrascsi3 narrow Quantum stratus 6.4gig hooked up to an Adaptec 2930b UltraSCSI card). Writing history info to disk???

The amount of disk space used is still at 3,059MB I then hit undo/redo a couple of times and no disk activity....

I then from the original image (Still open just back to original state from final undo) select lens flare again. HD space still remains at 3,059MB used. The filter processes, no disk activity, but again after completing the filter, there is disk activity for a couple of seconds.....

I then set PS5's RAM to 108MB.
Open up PS, again, from 2,937MB used to 2,938
I then open up the same 40MB TIFF and disk space used again climbs to 2,999MB. I select the lens flare without applying it, HD space goes up to 3,059MB again I apply lens flare, and it processes w/o any disk activity but thereafter writes to the disk for several seconds as before....

I hit undo/redo a couple of times and no disk activity. I select lens flare again, HD space used is still at 3,059MB and process the filter. NO disk activity as before until after finished processing when again there are several seconds of disk activity.

Last Test
PS5 RAM set to 60MB
I open up same 40MB Image
RIGHT AWAY while drawing the image there is definite disk activity (as before HD space used goes from 2,938MB to 2,939MB once PS5 opens, then once I open the file it goes to 2,999MB). I select Lens Flare filter again and immediately, unlike before, there IS disk activity. HD size goes up to 3,059MB as before but now all functions require disk activity...

My initial conclusions.... A stupid bug that incorrectly reports memory usage in the about this computer window with PS5/PS4 Mac OS 8.x??? "

J. Douaze sent a screenshot that shows the same thing happens with Photoshop 3.0.5.



Adobe Replies: Here is a response I received from the senior Photoshop programmer on the odd memory usage behavior in the finder:

" Mike,
I'm writing this note in response to the odd memory behavior reported at http://www.xlr8yourmac.com/tips/psmemory.html. The behaviors observed are as designed. The Macintosh Memory Manager requires more time to make allocations as the available memory increases. To avoid slowing down, Photoshop takes over some memory to manage after a threshold is crossed. This is why you see the sudden apparent jump in memory usage, Photoshop is simply taking over the memory to manage. The memory is not lost or wasted.

Photoshop will also write data out to the scratch disk at idle time regardless of how much RAM is available. This is done so that when the RAM is needed time isn't wasted making room. The writes are done "asyncronously" if the hardware supports it - meaning that the processor is available while the write is occurring, so neither Photoshop, nor other applications should be heavily effected by the writes. You will always see disk activity with Photoshop even if you give it a gigabyte or more of memory.

Photoshop is designed for performance even when dealing with very large amounts of image data. In all cases noted on the web page Photoshop is behaving correctly and as expected.
Sean Parent
Photoshop Senior Software Engineer "

So the mystery is solved...


Back to XLR8YOURMAC.COM
Your Source for the best in CPU/SCSI/VIDEO card reviews, daily news, and more!

Copyright © Mike, 1998.
No part of this site's content is to be reproduced in any form without permission.
All brand or product names mentioned here are properties of their respective companies.
Disclaimer: Users must read and are bound by the Site Terms & Conditions of Use.