Why is Photoshop using so much scratch space when I have lots of RAM?

  • 2
  • Problem
  • Updated 2 months ago
I have 32gb of ram but and use my d drive as my scratch disk.  I keep getting large amounts of temp files in it.  My wife has a similar machine and doesn't have the same problem.
Photo of Paul Franklin

Paul Franklin

  • 3 Posts
  • 0 Reply Likes

Posted 2 months ago

  • 2
Photo of Cristen Gillespie

Cristen Gillespie

  • 2054 Posts
  • 719 Reply Likes
Photoshop doesn't use RAM until it runs out and then use scratch disk space. It starts using it from the beginning and it attempts to speed up your workflow by anticipating your needs and allocating the resources to it. If you're working with large files and your wife isn't, for instance, it will try to allocate enough scratch to easily accommodate those large files.

This should tell you more about scratch disks, how and why PS uses them. If all you're getting are some temp files that go away when you quit Photoshop, then you probably have nothing to worry about.

https://helpx.adobe.com/photoshop/using/scratch-disks-preferences.html

Photo of Paul Franklin

Paul Franklin

  • 3 Posts
  • 0 Reply Likes
They don't go away, they just build up in the D Drive. Yesterday I cleared mb of DAT files from my D drive.
Photo of Cristen Gillespie

Cristen Gillespie

  • 2054 Posts
  • 719 Reply Likes
> I think that "scratch disk" is actually used when installed RAM is low, not the way you wrote. I checked the Adobe site and that seems to confirm.

What I was saying, obviously poorly, is that Adobe starts claiming scratch disk as soon as you open files and it thinks you might need more than you've got. From what I've been told (and of course I could have misunderstood), it's anticipating your needs, so starts putting bits and pieces onto the scratch disk early, rather than letting you use up all your RAM, then run out of that and the program has to start reading from the hard drive. How far ahead of running out of RAM I have no idea. That's why they say to allocate X times the scratch disk space as the size file you expect you'll be working with. Lots of us also don't work just with a typical size file—we work with multiple files loaded, and that should be calculated—but if you're trying to cut it to the bone, you'll probably get in trouble sooner rather than later.

PS doesn't take more than is required to start with, but my understanding is it doesn't necessarily give it back immediately, either. You close a big file, the application might assume you intend to open a big one again, so that scratch disk is held onto. And you can push up against RAM limits, particularly with several files open or very large files, rather quickly. That's how I've always heard scratch disk talked about. It seems so very old-fashioned, but our Photoshop may be running better on our computers — the real ones, not the ones we dream of having — because we've given it plenty of space.

But I agree—if you have a lot more RAM than you need to keep history, clipboard, and your images fully within it, it won't actively use the scratch disk instead of the faster RAM. Today, having enough RAM can be more possible than it used to be. OTOH, today's files are often much, much larger than they used to be, especially when you throw in a lot of embedded Smart Objects.

— But he's saying that it's leaving files behind, not that he's running out of RAM or scratch disk. He's not even complaining of slowing down. He may just not be saying fully what has caused him to be concerned in the first place.

> Perhaps malware is at play;

I considered viruses/trojan horses that use the .dat extension to sneak in, but I figured, perhaps incorrectly, anyone saavy enough to be looking on their drive for temp files is probably using decent antivirus software. If he was saying "why is my scratch disk full?" that might indicate he wasn't aware of the temp files or of the need to use reputable antivirus software.

Another possible reason for temporary files to get left behind:

"If you have the habit of force-closing Photoshop without giving it enough time to properly close down projects, it will leave a large chunk of temporary files behind. If you do this enough times, your temp folder will become full of Photoshop related files."

I suppose some people are terribly impatient, but I don't know that force-quitting PS is necessarily a "habit." It can be unfortunately the only way to get out of there.  '-}   I don't experience it often, but if you have another problem, perhaps with corrupt Settings, I suppose it's possible you may be force-quitting enough to find these files.


Photo of Dave Grainger

Dave Grainger

  • 435 Posts
  • 81 Reply Likes
Aha! That makes sense.... In that line of thinking it is making a reservation for space if I understand what you explained. That would not leave visible detritus, would it? My understanding of virtual memory is that the space is set aside to which the computer can R/W but the user does not see the space as a file.  I also think that you have hit on the real answer for this fellow in that he literally "pulls the plug" before Photoshop is ready to finish....  Forced shut down also has another serious effect: it shuts the PC down before the final write to the Windows Registry gets finished.

Temp files:  not all software is constructed to clean off temp files very well. I don't know whether Photoshop does... Temp files are not virtual memory anyway, unless Adobe is using temp files for their implementation of "scratch space..." Any thoughts?

"If computers made any sense, then I would not have anything to do!"   I am spending time during this restrictive period adding to my web site birdsbydave.com...
(Edited)
Photo of Paul Franklin

Paul Franklin

  • 3 Posts
  • 0 Reply Likes
Thanks for the suggestions but they haven't fixed my problem.  As previously mentioned my wife and I have very similar pc's with mine, the only real fifference being that I have 32gb of RAM whilst hers has 16GB. We both work on RAW files using Photoshop and the same plug ins.  We also use the same cameras and do comparable work on our images.  We both have 3 internal drives, C drive being a 250gb ssd for the programs and D & E being 1 tb hard drives.  The scratch disks are set in Photoshop to use the D and E drives the C .  The dat files are building up on the D drive.  This is not happening on my wife's machine. We use the paid version of McAfee and also check using for Malware using Malwarebytes.  I have run Window RAM Checker and the results showed no problems.  I always let Photoshop close normally.  It seems that there is a dat file is created for every image I process. I am at a loss as to why this is happening,  It only started about 12 months ago, prior to that I never had this problem.  At first I thought it may have been due to a Photoshop update and would be rectified in a later one but as this has not happened, hence my question now.
Photo of Cristen Gillespie

Cristen Gillespie

  • 2054 Posts
  • 719 Reply Likes
Thanks for the more complete description. It's certainly odd. The temp files simply shouldn't be getting stuck. I fear it's going to take a guru or Adobe staff (same thing) to help here. What you've said now should help them think of where to start troubleshooting.
Photo of Cristen Gillespie

Cristen Gillespie

  • 2054 Posts
  • 719 Reply Likes
> not all software is constructed to clean off temp files very well. I don't know whether Photoshop does...

I'm pretty sure it's supposed to. . .  whether it does is another question.

> "If computers made any sense, then I would not have anything to do!">

ROFL.

I don't know how to fix my car, but somehow I'm expected to know how to fix my computer.  '-}