For starters, you need to say that when you download any document in the program, Photoshop automatically determines how much he needs free RAM (the volatile part of system memory, which temporarily stores data and commands necessary for the processor to perform operations). In order to manually configure this feature, go to the menu Edit-Preferences-Performance.
After that, go to settings, system performance.
Here you can set the following parameters:
History & Cache.
Let’s look at each item in more detail.
In the first column, you can set the total available RAM, which will be referenced by the program, either in numeric format or in a % ratio to the entire memory.
Other settings are history and cache system. Here it is necessary to set the level of history steps (quantity), level of cache and its size.
Scratch disks can be both systemic and secondary. I recommend to put the disk with more free space.
And finally, you can put a check in the GPU Settings. So we turn on the hardware acceleration of your graphics processor.
If you are still Adobe Photoshop is not working as you expected, you can try to clean the memory from unnecessary components.
To do this, go to menu Edit-Purge.
Here you will see 4 options, such as previous actions, clipboard, history, all of the action.