Scratch Space

What is Scratch Space?

Scratch space refers to the dedicated area on the hard drive used as a temporary storage by graphic design programs such as Adobe Photoshop and scientific computing workstations.

Technically, scratch space is a specific volume that can be set occasionally when needed and is used commonly as an overflow when there is insufficient Random Access Memory (RAM) on the computer.

Understanding Scratch Space

What is Scratch Space

Many a time, while performing any computing task, a large number of temporary files may be generated while running a specific program than what is assigned in the research group storage or home directory quota.

These files and data are however not required in the long run and therefore are not necessary to retain them. These files can be deleted after the job is completed.

The scratch space is therefore created to hold these files temporarily while the program is running and then to delete them once it is done.

Scratch space is certainly not ‘scratched’ in the true sense and does not signify a bad sector on the hard disk either.

On the contrary to the term ‘scratch,’ in general, a scratch space signifies the temporary space in the computer memory that can be used to store data and information.


The scratch space is best located on the drive rather than on the main drive of the computer. There are two specific reasons to say so, which are:

However, on several systems, the scratch space may be located on the same hard drive as the other programs and the operating system by default.

This may create some significant issues when you need to download additional software programs and files for the operating system such as:

Therefore, it is best to have the scratch space on a different drive or on a specific area on the disk that is specifically partitioned for creating a scratch space.

It is good to have more than one dedicated drive for use as scratch space. This will be much more efficient than having a single drive dedicated for this purpose.

However, if you have only one drive on your computer, you may increase its efficiency by creating a separate partition on it that will not be used for or by anything else.

This will ensure that there is some space always available to be used as scratch space.


Ideally, this specific space is created and used under specific conditions, such as:

With reference to the hard disk, a scratch space is the same thing and is created and used for the same purpose of storing data temporarily when the RAM is full. Such situations may arise when you use highly intensive computational applications such as:

The required data for such operations will be stored in the scratch space.

Minimum Requirement

Ideally, for programs like Photoshop, the minimum free scratch space required is 6 GB. However, the available free scratch space considered by the program is the remaining current free space on the hard disk.

This means that, if the free space on the scratch disk is 10 GB, Photoshop will consider the available space to be 10 – 6 = 4 GB. This may or may not be enough for the current operation being executed.

Therefore, even if you make some minute changes, you will need at least 10 GB of free space for Photoshop along with its defaults, such as

On the other hand, you will need much more than that, in fact, as many times the size of the actual file as the history states, if you make significant changes to the dense pixel layers such as:

Therefore, it is recommended that you have at least 20 GB of free space on your hard drive with the operating system when you work with Adobe Photoshop.

Yes, you may also need much more than that at times, but that will typically depend on the particular type of file you are working with.


There are few specific protocols or etiquettes for a scratch space such as:

Reading and Writing

Using ScratchVar is the best possible way to read from and write to a scratch space. For this, you will need to create a ScratchVar object first and then enter the values that you want to be stored there.

However, you will need to keep a couple of things in mind, such as:

Read Also:  What is Seek Time? Example, Formula & More

How to Check the Scratch Space?

You can check the scratch space on the disk on your computer by using different command lines based on the operating system and the settings and by accessing the directory or the File Manager, as the case may be.

On a local machine, you can access the scratch space by changing the directory to /local/scratch/public and by making a directory for yourself.

As the directory name, you may use your login name, as most people do, and check the scratch space from there.

You can also access and check the scratch space over the network in two specific ways, such as:

If you are using XUbuntu, you can check the scratch space by:

In some cases, you may even check the scratch space volume storage quota and its usage by using the $ gpfs_quota scratch command.

How to Fix a Scratch Space?

In order to fix scratch space and prevent it from becoming full often, do not wait till you get the error message.

Instead, free up the space by deleting unnecessary files or by moving the files from there to another storage location. You can clean it dynamically or periodically.

There are several ways in which you can do it manually. Choose one or more of the following options.

Clear Photoshop cache

This is the easiest way to fix scratch space and make it work properly. Here’s how:

Clear temporary files

Here’s how you can remove the temp files in Photoshop:

On Mac computers, you can use Spotlight to look for temporary files and delete them.

Change scratch disk on startup

If there are multiple scratch disks, switch between them on startup. Here’s how to do it:

Change drives or partitions

Photoshop, by default, uses the drive of the operating system only for scratch space. If you have multiple partitions or drives, let it use them. Here’s how:

Disable the auto recovery feature

Photoshop will save the files being worked on automatically for auto recovery. If that is not needed, you may disable it. Here’s how:

Use more RAM

You may let Photoshop use more RAM to reduce scratch disk issues. Here’s how:

Reset crop tool value

Crop large images to save space by following these steps:

Defrag the hard drive

You can defrag the hard drive of your computer in the following way:

Reset Photoshop preferences

If too many changes are made to Photoshop preferences, it may create some issues. Reset it in the following ways to fix it:

Is Scratch Space Same as RAM?

Yes, you can think of the scratch space as an extension of the Random Access Memory of your computer because both store the data of the programs that you are working on currently, and both offer temporary storage.

Though it does not work exactly like the RAM, it often offers similar benefits to the computer users.

However, the most significant difference between the two is that the data stored on the scratch space is usually chosen manually.

Typically, breaking down a considerable portion of the hard drive with the boot file and leaving that space empty warrants a more reliable scratch space.

Usually, partitioning a hard disk drive based on each gigabyte is cheaper than RAM.

And it also frees up the RAM to focus on other tasks while it will store the required data required for the current program.

However, it may perform at a much slower rate than RAM.

Normally, a scratch space may not match the speed of the RAM, but it can be improved a bit by assigning a separate physical drive from the primary software and operating system.


A scratch space, as you know now, is a specific location on the hard drive disk where you can store program files and projects temporarily while using programs like Photoshop and access them while it is running.

It is easy to check whether or not it is full and also clean up often to prevent issues and make it work properly.