96

When programs are minimized in Windows 7, do they use less memory and CPU than leaving them maximized?

0

7 Answers 7

68

Yes. According to MS Support, the working set for a minimised application is trimmed. You can check this yourself with Process Explorer.

Here's a test of a single instance of Firefox 5.0 in Windows 7 x64 with a single tab of the ESPN.com website loaded. Values were read using Task Manager.

type                 not minimised  minimised     diff
------------------------------------------------------
working set               165,752k   163,768k  -1,984k
peak working set          169,624k   169,624k      N/A
mem (private working set) 121,600k   119,576k  -2,024k
commit size               135,576k   133,504k     -72k
paged pool                    396k       397k      +1k
np pool                        82k        81k      -1k
handles                        504        483      -21
threads                         34         31       -3
user objects                    40         44       +4
GDI objects                     71         75       +4

Here's a test of a single instance of Paint.NET in Windows 7 x64 with a few small images open. This app was written in Microsoft .NET unlike Firefox which is almost certainly C/C++.

type                 not minimised  minimised     diff
------------------------------------------------------
working set               125,904k   125,256k    -684k
peak working set          217,836k   217,836k      N/A
mem (private working set)  61,844k    61,844k       0k
commit size               102,388k   102,384k      -4k
paged pool                    542k       541k      -1k
np pool                        59k        59k       0k
handles                        741        741        0
threads                         19         19        0
user objects                   276        273       -3
GDI objects                    489        491       +2
20
  • 9
    Wow, this is interesting and you have a KB to back it up. +1 Dec 5, 2011 at 21:19
  • 59
    This doesn't apply to modern versions of Windows (7, Vista). On a modern OS, if the memory is needed for something, the operating system will trim the resident working sets of all processes, minimized or not (based on how recently they've accessed the memory pages). And if the memory is not needed for any reason, it would be foolish to trim it -- why gratuitously drop the performance of an application when memory is plentiful? Dec 5, 2011 at 23:12
  • 8
    Wow so people don't like an answer... Does anyone have any proof of the opposite? The way I see it Kinokijuf actually has some proof, you guys say it doesn't apply to windows 7 and vista but offer no source... You guys don't even test it :\ working set and allocated memory are two different things. Process explorer is the only way to test this. Dec 6, 2011 at 13:46
  • 6
    It seems worth noting that the reduction in the use of system resources is trivial: in the example given, by minimizing the application, the working set is only reduced by about 1.2%.
    – bgvaughan
    Dec 7, 2011 at 17:21
  • 6
    Notice the lack of Win32 devs in this comment thread. There are a number of Win32 events that skip over minimized applications. Even if there is not a noticable memory savings, there sure is a CPU usage savings.
    – surfasb
    Dec 17, 2011 at 10:15
29

Yes and no. They will use less resources on your GPU - less need for screen refreshes - but not on your main system memory or CPU.

The working set size shown in the task manager is not the actual amount of memory consumed by an application. It is more of a ceiling of how much it could use at a given point in time.

If another app requests memory allocated to one process's working set that is not in active use this number can be driven down without changing the amount of memory the app is actually using.

7
  • 1
    I really hate down voting answers but this is just wrong... If you asked me 10 minutes ago I would have thought you were right. Dec 5, 2011 at 21:23
  • 4
    @Lieven the offending line, for me at least, and why the downvote stands: "They will use less resources on your GPU - less need for screen refreshes - but not on your main system memory or CPU." The question explicitly states: "do they use less memory and CPU than leaving them maximized" which the answer is, according to MS at least (And I'll trust MS here since they did write it), yes it uses less resources. He doesn't ask anything about the preformance of the application while minimized, just if it will use less resources. Dec 5, 2011 at 22:18
  • 15
    @Kyle That KB article is 5 years old. It doesn't apply to modern memory management schemes. (And if you see my comment to kinokijuf's answer, you'll see why it was a bad idea in the first place -- except on operating systems that can't track recency of page usage.) Dec 5, 2011 at 23:21
  • 2
    The footnotes state that it apples for NT4, 2000 and XP. I doubt anything has changed since then.
    – kinokijuf
    Dec 6, 2011 at 11:02
  • 5
    And I can confirm on my Vista machine (with Process Explorer) that the working set still does drop.
    – kinokijuf
    Dec 6, 2011 at 11:04
12

"Working Set" is NOT the same as "Memory Usage"

If a program needs a chunk of memory, it will always need it. If it doesn't, then it doesn't. Minimizing the program doesn't suddenly make the program 'not require' the memory. "Trimming" the working set is simply paging out the memory from physical memory onto the disk, or simply removing the page if it is available elsewhere on the disk. (In the latter case, the OS does it anyway if there is shortage of memory, so it's just a caching issue, not a 'usage' issue.) In either case, it does not reduce what the program uses; it merely relocates the data elsewhere.

That said, regarding CPU usage: there is something called a priority boost given by the OS in certain conditions, which can indeed cause a foreground application to use more CPU. See here for details.

5

It really depends on the application that you're talking about and the way that the application is coded; however for comparison sake lets say that the program is coded in a way that it will run the same functions when maximized and minimized.

We would therefore expect the program to use the same amount of CPU when minimized if the same underlying functions are being called by the application.

However, your system processes will certainly use less CPU when the programs are minimized as there will be less graphics to be rendered for the application viewing, probably now just a system tray icon.

That is unless upon minimizing the application you cause a more graphical application to be brought into view and therefore rendered instead, now the CPU load could increase due to the extra graphics work load.

All in all the changes we are talking about here are probably going to be negligible unless your on a very low spec machine.

3
  • 1
    -1, for irrelevancies. For any comparisons you always had to assume Ceteris paribus
    – Lie Ryan
    Dec 6, 2011 at 22:17
  • 3
    Didn't realise assuming was a bad thing when made clear and covering both possibilities.
    – iTom
    Dec 7, 2011 at 7:50
  • 1
    certain assumptions are irrelevant, therefore useless, even if made clear. If the program are written in such a way that minimization would terminate the program, that would obviously make the computer uses much fewer resources; that assumption is totally useless for the discussion.
    – Lie Ryan
    Dec 11, 2011 at 3:50
2

Rarely. For an interactive program that recognizes when it's minimized, yes it will use less CPU power. For programs like Microsoft Word, there won't be a decrease in CPU ussage.

For graphics intensive applications (ex. World of Warcraft or Call of Duty 3) there would be a significant decrease in GPU (Graphics Processing Unit) usage.

2
  • 1
    An interactive program doesn't have to "recognize when it's minimized" to be using less CPU due to simply not having any keyboard/mouse window messages to respond to.
    – Random832
    Dec 5, 2011 at 23:37
  • 1
    @Random832 I'm not sure what you mean entirely, however I meant to convey the type of program (like a game) that pauses when it looses focus. These games generally use less CPU power when minimized.
    – wizlog
    Dec 6, 2011 at 0:36
2

I'd say it does use less resources because it does not update its window.

http://msdn.microsoft.com/en-us/library/dd145193(v=VS.85).aspx

1

While it is not available in windows 7 to the best of my knowledge, in Windows 8, programs that are minimized are suspended.

4
  • 1
    Is that for classic programmes as well? Its necessary for metro since you cannot actually close software
    – Journeyman Geek
    Dec 8, 2011 at 6:41
  • 1
    Yes, at least that is what I have seen in the beta. (example used was internet explorer, the non-metro version)
    – soandos
    Dec 8, 2011 at 6:44
  • 1
    best to wait until Win8 is released rather than speculating on what may or may not carry forward from very early betas. Dec 9, 2011 at 0:31
  • 1
    Well the suspension part for the metro apps cannot go away, so I would be relatively confident in the rest of the suspension system staying in place. It is also part of current win7 system, though it is not automatic.
    – soandos
    Dec 9, 2011 at 0:34

You must log in to answer this question.

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