5 Replies Latest reply: Jan 21, 2010 2:37 PM by Chris Cox RSS

    What about Scratch Disk fragmentation?

    RichPate Community Member

      I edit TIFF image files with lots of layers that range in size from 50MB to 90MB. With only 4GB of RAM, my system relies heavily on scratch disk performance for these large files. I have a non-system internal SATA HDD with an 80GB volume dedicated as a scratch disk.

       

      I have read that it's important the scratch disk be a defragmented volume. I have also heard that Macs defragment files smaller than 20MB automatically, which I don't think helps me much.

       

      My questions are, does Photoshop CS4 delete/remove files on the scratch disk after an edit session ends and PS is closed, and then starts with a "clean slate" when re-opened? Or do all the scratch disk files just pile up in pieces over time that tend to fragment the scratch disk? If so, does the scratch disk need to be re-formatted (erased) regularly? Thanks.

        • 1. Re: What about Scratch Disk fragmentation?
          c.pfaffenbichler Community Member

          As far as I can tell, Photoshop does indeed delete the Scratch Files on quitting (just watch the free space index of the Scratch Volume while You work in Photoshop and after You’ve quit Photoshop), but that does not mean the disc-space does not get fragmented.

           

          Also see the relevant paragraphs in

          http://kb2.adobe.com/cps/404/kb404440.html

          • 2. Re: What about Scratch Disk fragmentation?
            Chris Cox Adobe Employee

            Fragmentation doesn't matter much on a dedicated volume.

            Scratch disks tend to get fragmented if they're shared with other files (the OS, data files, etc.).

             

            But scratch access is pretty random, so defragmenting doesn't make a big difference.

            And if the files are deleted, the disk doesn't have any fragmentation to speak of anyway.

             

            Yes, scratch files are deleted when the app exits, or even when it crashes.  Absolute worst case is that the OS will clean up the files when the system reboots.

             

            So, if you have a dedicated scratch disk: don't worry about it.

            If your scratch disk is shared with the OS and other bits:  well, if you're concerned about performance, you might want to defrag it once in a while, or buy a dedicated disk....

            • 3. Re: What about Scratch Disk fragmentation?
              Community Member

              Rich_Pate wrote:

               

              I have a non-system internal SATA HDD with an 80GB volume dedicated as a scratch disk.

              If there is nothing on that 80GB volume (when Photoshop is closed) then there is nothing to worry about. Fragmentation is only an issue if the drive has files on it.

              • 4. Re: What about Scratch Disk fragmentation?
                RichPate Community Member

                Marian Driscoll wrote:

                If there is nothing on that 80GB volume (when Photoshop is closed) then there is nothing to worry about. Fragmentation is only an issue if the drive has files on it.

                 

                Thanks Chris and Marian.

                 

                I have been monitoring my scratch disk in Disk Utility and have noticed that after closing PS, the amount of disk space indicated as being used drops from about 1GB to around 60MB, with the number of files indicated on the disk dropping to around 40. When I erase the volume using D.U., then there are 32 files indicated as being on the volume.

                 

                So apparently, there are files being created by both the OS (around 32 files) and also PS (around 8) that remain on the scratch disk after PS is closed. Maybe these PS files are just "place-holder" files, because the amount of space used by these PS files appears to be less than 1MB. Relative to an 80GB volume, this seems rather insignificant.

                 

                Nevertheless, I'm now thinking that it may be a good maintenance practice to erase (re-format) my scratch disk once a month or so just to help optimize it. It's easy to do in Disk Utility.  

                • 5. Re: What about Scratch Disk fragmentation?
                  Chris Cox Adobe Employee

                  PS doesn't leave any "placeholders" or anything else around.

                  But the OS does create a number of invisible cache files.