31

I'm working in Photoshop CS6 and multiple browsers a lot. I'm not using them all at once, so sometimes some applications are minimized to taskbar for hours or days.

The problem is, when I try to maximize them from the taskbar - it sometimes takes longer than starting them! Especially Photoshop feels really weird for many seconds after finally showing up, it's slow, unresponsive and even sometimes totally freezes for minute or two.

It's not a hardware problem as it's been like that since always on all on my PCs.

Would I also notice it after upgrading my HDD to SDD and adding RAM (my main PC holds 4 GB currently)? Could guys with powerful pcs / macs tell me - does it also happen to you?

I guess OSes somehow "focus" on active software and move all the resources away from the ones that run, but are not used. Is it possible to somehow set RAM / CPU / HDD priorities or something, for let's say, Photoshop, so it won't slow down after long period of inactivity?

6 Answers 6

43

Summary

The immediate problem is that the programs that you have minimized are being paged out to the "page file" on your hard disk. This symptom can be improved by installing a Solid State Disk (SSD), adding more RAM to your system, reducing the number of programs you have open, or upgrading to a newer system architecture (for instance, Ivy Bridge or Haswell). Out of these options, adding more RAM is generally the most effective solution.

Explanation

The default behavior of Windows is to give active applications priority over inactive applications for having a spot in RAM. When there's significant memory pressure (meaning the system doesn't have a lot of free RAM if it were to let every program have all the RAM it wants), it starts putting minimized programs into the page file, which means it writes out their contents from RAM to disk, and then makes that area of RAM free. That free RAM helps programs you're actively using -- say, your web browser -- run faster, because if they need to claim a new segment of RAM (like when you open a new tab), they can do so.

This "free" RAM is also used as page cache, which means that when active programs attempt to read data on your hard disk, that data might be cached in RAM, which prevents your hard disk from being accessed to get that data. By using the majority of your RAM for page cache, and swapping out unused programs to disk, Windows is trying to improve responsiveness of the program(s) you are actively using, by making RAM available to them, and caching the files they access in RAM instead of the hard disk.

The downside of this behavior is that minimized programs can take a while to have their contents copied from the page file, on disk, back into RAM. The time increases the larger the program's footprint in memory. This is why you experience that delay when maximizing Photoshop.

RAM is many times faster than a hard disk (depending on the specific hardware, it can be up to several orders of magnitude). An SSD is considerably faster than a hard disk, but it is still slower than RAM by orders of magnitude. Having your page file on an SSD will help, but it will also wear out the SSD more quickly than usual if your page file is heavily utilized due to RAM pressure.

Remedies

Here is an explanation of the available remedies, and their general effectiveness:

  • Installing more RAM: This is the recommended path. If your system does not support more RAM than you already have installed, you will need to upgrade more of your system: possibly your motherboard, CPU, chassis, power supply, etc. depending on how old it is. If it's a laptop, chances are you'll have to buy an entire new laptop that supports more installed RAM. When you install more RAM, you reduce memory pressure, which reduces use of the page file, which is a good thing all around. You also make available more RAM for page cache, which will make all programs that access the hard disk run faster. As of Q4 2013, my personal recommendation is that you have at least 8 GB of RAM for a desktop or laptop whose purpose is anything more complex than web browsing and email. That means photo editing, video editing/viewing, playing computer games, audio editing or recording, programming / development, etc. all should have at least 8 GB of RAM, if not more.

  • Run fewer programs at a time: This will only work if the programs you are running do not use a lot of memory on their own. Unfortunately, Adobe Creative Suite products such as Photoshop CS6 are known for using an enormous amount of memory. This also limits your multitasking ability. It's a temporary, free remedy, but it can be an inconvenience to close down your web browser or Word every time you start Photoshop, for instance. This also wouldn't stop Photoshop from being swapped when minimizing it, so it really isn't a very effective solution. It only helps in some specific situations.

  • Install an SSD: If your page file is on an SSD, the SSD's improved speed compared to a hard disk will result in generally improved performance when the page file has to be read from or written to. Be aware that SSDs are not designed to withstand a very frequent and constant random stream of writes; they can only be written over a limited number of times before they start to break down. Heavy use of a page file is not a particularly good workload for an SSD. You should install an SSD in combination with a large amount of RAM if you want maximum performance while preserving the longevity of the SSD.

  • Use a newer system architecture: Depending on the age of your system, you may be using an out of date system architecture. The "system architecture" is generally defined as the "generation" (think generations like children, parents, grandparents, etc.) of the motherboard and CPU. Newer generations generally support faster I/O (input/output), better memory bandwidth, lower latency, and less contention over shared resources, instead providing dedicated links between components. For example, starting with the "Nehalem" generation (around 2009), the Front-Side Bus (FSB) was eliminated, which removed a common bottleneck, because almost all system components had to share the same FSB for transmitting data. This was replaced with a "point to point" architecture, meaning that each component gets its own dedicated "lane" to the CPU, which continues to be improved every few years with new generations. You will generally see a more significant improvement in overall system performance depending on the "gap" between your computer's architecture and the latest one available. For example, a Pentium 4 architecture from 2004 is going to see a much more significant improvement upgrading to "Haswell" (the latest as of Q4 2013) than a "Sandy Bridge" architecture from ~2010.

Links

Related questions:

How to reduce disk thrashing (paging)?

Windows Swap (Page File): Enable or Disable?

Also, just in case you're considering it, you really shouldn't disable the page file, as this will only make matters worse; see here:

http://lifehacker.com/5426041/understanding-the-windows-pagefile-and-why-you-shouldnt-disable-it

0
4

Had the same problem on my old PC, Got a new one about a month ago (i7,17gb RAM,64bit OS) and all that "wake-up" time is gone.

In more detail : the low RAM (4GB) is probably the cause :

Windows will favor recent application/processes over "sleeping" ones- and so it will let them use the physical RAM and move the "sleeping" apps to the "page-file" (a simulated RAM actually residing on your hard drive) when out of RAM.

When you try to wake these apps, windows needs to move the some data from RAM to page file (to make room) and move the app data from page-file back to RAM.

Solution :

  1. Get some more RAM (Photoshop and Browsers simply love it...)
  2. Make sure you're using a 64-bit OS if you have more than 4GB of RAM.

Best of luck.

2
  • 4
    What combination did you use to get 17GB RAM?
    – Akash
    Oct 29, 2013 at 18:40
  • 1
    That's a typo ofcourse, but you can try Dippin your 2x8GB in RedBull - it'll boot up as 17GB ;-)
    – spelltox
    Oct 30, 2013 at 8:14
2

Roughly, operating systems use memory in two ways: to store program-related data (variables, arrays, machine instructions, etc.) and as a cache for files on disk. Somewhat confusingly, the performance monitors of most OS's consider memory devoted to file caching as "free." Only memory claimed by programs is considered "used."

The OS likes to reserve at least 25% of the memory as a file cache. Absent a cache all file accesses would go directly to the slow, spinning disk and the system would be maddeningly unresponsive.

Since file caching is so important, no matter how many programs you open, memory usage will plateau at about 75%. Consequently your operating system might be telling you that you have 25% "free" memory when the system is actually memory-poor and furiously swapping data out to the page file.

Adobe CS programs and multitudes of browser tabs can easily eat up 4GB of memory, so it sounds like you should buy more RAM.

2

There's one question no one has asked so far: what operating system are you on, Bart? Is it a 32-bit or 64-bit version?

If you're running a 32 bit OS and you're running out of RAM (not a surprise, based on what you're running), then you need to upgrade to a 64-bit OS... but you need to know whether you have a 32-bit or a 64-bit processor.

In today's environment, I would recommend at least 8 GB of RAM for a heavy-work machine, if not 16GB. But you can't support that much RAM without a 64-bit system, so check that first. (About Computer: Click Start, Right-Click on "My Computer", click Properties.)

1

Windows keeps track of how recently pages in physical memory have been referenced. Those that haven't been referenced for some time will be paged out. If there is a requirement for memory, the pages that have been paged out will be reused. Note this happens regardless of whether the application is minimised or not. It just depends on whether the memory is being actively used or not. If you have enough RAM the pages may stay in memory and can be reclaimed if they are needed again. If they are no longer in memory each page will need to be read from disk as it is required. This will cause the program to run slowly until everything it needs has been paged in. When starting a program Windows uses Superfetch to load the pages of the program it has 'learnt' are required pre-emptively instead of waiting for a page fault to speed up program starting.

Windows 8 introduced a swap file which is used to store the active pages of a suspended Store App in a block. This allows Store Apps to restart quickly.

1

when I try to maximize them from the taskbar - it sometimes takes longer than starting them

That's because both when you start it and when you maximize it from them taskbar you are reading the application from disk (as explained by all the others), but an application which ran for a while (opening files and doing stuff) might have taken more RAM space than a newly started one, and all that memory was swapped out to disk to make space for active applications (again, as explained by the others) so now that you are maximizing it, more data has to be read from disk than for a fresh start.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .