Photoshop: Is there a way to free up memory used by Photoshop?

  • 16
  • Question
  • Updated 2 years ago
  • Answered
  • (Edited)
When Im working with large files photoshop eats up my memory and even if I clear the history and close the file I do not get my memory back, I have to quit photoshop and restart it?

Im using Mac snow leopard with latest updates.
Photo of Jesper Hammarbäck

Jesper Hammarbäck

  • 10 Posts
  • 2 Reply Likes

Posted 9 years ago

  • 16
Photo of Jeffrey Tranberry

Jeffrey Tranberry, Sr. Product Manager, Digital Imaging

  • 17097 Posts
  • 2915 Reply Likes
Official Response
In the current version of Photoshop - If you hold the Option (macOS) or Alt (Windows) key while selecting About Photoshop the application will flush (release) all RAM and scratch disc in use by Photoshop.
(Edited)
Photo of Anson Moran

Anson Moran

  • 2 Posts
  • 0 Reply Likes
Assuming that this is a problem with some non-photoshop software, it is still a problem that many of us are having. Is there a workaround that anyone has found? I've tried changing startup to "diagnostic" in msconfig and other similar moves and find nothing that works.
Photo of Bruce Girrell

Bruce Girrell

  • 9 Posts
  • 0 Reply Likes
I have the most difficulty when using Adobe Camera Raw (Windows 7, 64-bit). ACR counts as third-party software as far as Photoshop goes, so this is one of the reasons that PS is seen as not being at fault.

The out-of-memory problem seems to be exacerbated if I use the Luminance noise reduction when opening a file in ACR. If I toggle the preview back and forth a bunch, I can almost guarantee an out-of-memory error at some point.

Essentially, the best thing that I have found to do is open my image in ACR, do what I need to there and save it. I then close and reopen Photoshop and things will be OK.

Despite this being an issue with "third-party software", I still cannot believe that PS is managing its own memory stack properly If I open an image, and work on it, I can see PS allocating memory, much as would be expected. What is not expected is that when I close that image and open another image, PS allocates more memory for itself as though the first image is still open, rather than using the memory that it already has gotten from the system. Not releasing the memory back to the system when an image is closed doesn't bother me, but not freeing up the memory internally is a problem
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 862 Reply Likes
ACR is not third party, and we haven't seen it keep much memory after it is closed (it keeps a small amount due to the binary size and some OS buffers).

And Photoshop is working properly, as has been explained already.
Photoshop does reuse the memory it has allocated.
Photo of Peter C

Peter C

  • 1 Post
  • 0 Reply Likes
An important thing to note in PS CC 2015:

If you're using an external scratch disk - make sure it's connected BEFORE you start photoshop.

If photoshop is running and you connect the drive - even if you make sure the external disk is the only scratch disk checked (in preferences) - it will still draw from your HD.
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 862 Reply Likes
That is because the scratch volumes are setup when Photoshop launches.
Photo of boo radley

boo radley

  • 2 Posts
  • 0 Reply Likes
Lots of confusion on this issue. I think what the original poster is saying that when you load up Photoshop, your task manager will say that "Photoshop.exe" is using, say, 1GB of RAM. Now, when you load in 5 documents into Photoshop, task manager says that "Photoshop.exe" is using 9GB of RAM (just as an example). Next, let's say you close 3 of those documents. Task manager *should* be saying that "Photoshop.exe" is now using only 4GB of RAM, because you closed those 3 documents. But it doesn't, it still says it's using 9GB.

Why isn't Photoshop returning that RAM to the system when you close documents?
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 862 Reply Likes
Again, Photoshop is reusing the RAM that it allocated, and closing documents will not decrease the application's RAM usage. That is perfectly normal.
Photo of boo radley

boo radley

  • 2 Posts
  • 0 Reply Likes
The answer is basically, no, you cannot return RAM to the system when Photoshop is running. If you allocate 75% of your system memory to PS, then that 75% is reserved as soon as you start it up. Basically that leaves you with 25% of RAM available to do anything else outside of Photoshop while it's running. Opening/closing image documents will not matter; once that memory is reserved it can't be used for anything else. The only way to return it to the system is to close Photoshop.
Photo of Adam Jerugim

Adam Jerugim, Employee

  • 226 Posts
  • 121 Reply Likes
The answer is basically yes...

New in Photoshop CC (2015) - If you hold the Option (Mac)/Alt (Windows) key while selecting About Photoshop, or hold the Option (Mac)/Alt (Windows) key and select Edit>Purge>All – we flush (release) all RAM and scratch disc in use by Photoshop
Photo of Carrotcake

Carrotcake

  • 1 Post
  • 0 Reply Likes
Well, yes, there is a "Purge"-button, but nothing happens with the RAM when I click it.
Photo of Jeffrey Tranberry

Jeffrey Tranberry, Sr. Product Manager, Digital Imaging

  • 17097 Posts
  • 2914 Reply Likes
Are you holding down Alt/Opt when you select Purge All?
Photo of Mike Bruce

Mike Bruce

  • 13 Posts
  • 13 Reply Likes
I confirm that this problem still exists on the latest version of Photoshop CC 2015.1.2

As you open more images, photoshop uses more ram. Fair Enough. When you close those images PS hangs onto the ram, OK fair enough as explained above.

But as you add more images PS doesn't reuse the old ram, it just keeps taking more, until my system is unstable and slow, and PS becomes sluggish. This is for small digital images of say 4000 x 3000. Basically something is not right and PS does not effectively recycle memory.

It means I have to exit the application after editing four or five images. I'm amazed at Chris Cox's arrogance in this thread by denying the problem when it so clearly exists.
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 862 Reply Likes
That is not a problem. Yes, Photoshop does reuse the allocated memory. But as you require more, it will allocate more up to the limit you set in Photoshop's preferences. If you set the limit too high (over 80%), yes other applications may suffer as the OS has to page virtual memory in and out.

The only memory leaks we have seen causing problems have been in third party plugins and drivers (mostly video, but some scanner and printer drivers).
Photo of Anson Moran

Anson Moran

  • 2 Posts
  • 0 Reply Likes
This problem plagued me for years and I was frustrated by the seeming indifference by Adobe and lack of work arounds.
When it came time to replace my aging computer I bought a custom built PC with 16 GB Ram, a fast 64 bit processor, a fast and big video card, and several solid state drives.  It wasn't expensive and it screams.  No more memory problems, probably because it has lots to work with.
Photo of Ayli  Zyor

Ayli Zyor

  • 1 Post
  • 0 Reply Likes
This reply was created from a merged topic originally titled Memmory.

When you will *teach* Photoshop to clear memory? I closed big file, created new small, with one layer and it still takes 10 GB of RAM. And It was always as I remember Photoshop 
Photo of Celso Bressan

Celso Bressan

  • 2 Posts
  • 1 Reply Like
Chris or whoever is around from Adobe:

Let's stop with this bullying saying that there are memory leaks from third party, or the computer is wrong or the OS is wrong. PS opens a file, allocates memory and does not release it anymore even if the file is closed. The more you open files (and just close them immediately) the memory goes higher and higher until the computer slows down and I have to close PS.

Hey, Adobe, RELEASE THAT DAMNED MEMORY, will you? Stop with this failed argument that it reuses memory and that it's faster to reuse it than releasing and reallocating again. Computers are faster now, much faster, did you see that one?

Also, while the computer becomes slower and slower, is much slower to work with a slow computer than to reallocate memory.

It no longer makes sense this argument of yours!

Thanks.
Photo of whousseaux

whousseaux

  • 4 Posts
  • 0 Reply Likes
This reply was created from a merged topic originally titled Purge ALL doesn't purge at all.

145GB of hard disk space, large PSD file opened with multiples layers, tried to open another one for reference and I got the "Hard Disk Full message"!!!!! I tried to EDIT > PURGE > ALL and it didn't help. I had to QUIT Photoshop and then, all caches were purged... Latest version of Photoshop, on MAC OS High Sierra... 
Photo of Celso Bressan

Celso Bressan

  • 2 Posts
  • 1 Reply Like
OK, Chris, I have a situation for you that requires an answer. Please, be patient with me while I explained it:

1) I set PS to have 50% of my 16 GB memory on a MacMini with High Sierra 10.13.6;

2) I closed everything;

3) I opened Bridge CC 9.0.0.204 and PS CC 20.0.0;

4) I opened and closed several times exactly the same RAW image in Bridge and then in PS with no processing at all;

5) The memory used by PS grew to approximately 2 GB and then more or less stabilized; 

6) At this stage, I left PS unattended with no image loaded and the situation was: 2 GB of memory used and 0 (zero) Mb Compressed Memory;

7) For about one hour, I played with other things like Chrome, games and Skype, making sure all these pieces were closed;

8) I went back to PS and the new situation was: 2 GB of memory used (as before) and around 1.8 GB Compressed Memory. This means that the OS needed memory and compressed almost all memory used by PS. Not a problem, this is expected (it avoids sending this memory to disk);

9) I opened and closed several times the same image as before and - surprise, surprise - the memory used jumped to 3 GB and the compressed memory decreased to 1.4 GB, no matter how many times I opened and closed the same image.

10) Just for fun, I then opened a 300 Mb TIFF file and - surprise, surprise - the memory used jumped to 3.6 GB and the compressed decreased to 1 GB.

In conclusion:

1) Either PS has big memory leaks because the compressed memory didn't return to use (that is, it was not needed), or

2) PS does not know how to handle its own memory, or

3) Both above.

Either way, I propose you the following:

1) Stop with the stubbornness blaming other pieces of software for bad memory management (I am sure there are some but its impact is not as relevant as suggested);

2) Stop with the stubbornness saying that PS reuses memory in an efficient way;

3) Stop with the stubbornness saying not releasing memory is faster than releasing and then reacquiring it again; with today's machines, this is no longer a problem. Plus, this will only take 1 or 2 seconds more and we process things manually thus not being a problem;

4) Produce a test version with full memory release and let some users test it. I am proposing myself to help the tests. 

I hope I provided some additional information on the issue.

Thanks.