3

Here is my system info:

Performance tab

I built a DIY system with the expectation that there wouldn't be any need for a swap file, yet there it is, 3340MB.

Can anyone explain this? Is it really anything I should be concerned about?

In case this matters: Processes tab

p.campbell
  • 4,397
  • 6
  • 40
  • 51

4 Answers4

10

Windows memory management relies heavily on the paging file(s) for many reasons, not only for "swapping out" in low memory conditions; this has been the subject of endless debates, but the bottom line is: Windows actually works a lot better when there's a page file, even if plenty of RAM is available.

You should leave it on, unless you're severely limited on disk space.

Massimo
  • 68,714
  • 56
  • 196
  • 319
  • 5
    Among other things, Windows pre-swaps lots of stuff when the disk and RAM is idle anyway. When/if it needs extra memory, it already has a on-disk copy - if it doesn't need to, no harm is done. – Morten Siebuhr Aug 30 '09 at 17:42
  • @Massimi and @Morten: Your answers combined were great. Thanks. –  Aug 30 '09 at 22:08
  • see http://serverfault.com/questions/74822/how-do-i-tell-if-my-windows-server-is-swapping/75027#75027 for links on how windows uses the page file – Jim B Mar 05 '10 at 22:05
2

One of the advantages of having a swap file is that whenever an application crashes you can still retrieve the crash dump and maybe analyse why that application crashed.

ZippyV
  • 213
  • 1
  • 6
1

I would not be worried about the swapfile. As mentioned above, this is a source of endless debate. OS authors are smart people who put a lot of thought into what they do. There is a good reason for the swapfile, and it may be more than for paging stuff out of RAM as needed. Things that might also go in a swapfile are files the computer expects to need soon (perhaps already in a format that loads them into memory faster).

There are people who have deliberatly set their swapfile/pagefile size to zero (because they had a lot of RAM). Eventually things don't work the way they should (slower, among other possibilities).

Trust the OS writers. They are probably smarter than you and they know more about what your OS is doing underthe hood than you do.

Will
  • 159
  • 1
  • 2
  • 6
  • It's not a lack of trust at all. It's a lack of understanding and surprise. I was expecting one thing and got another. –  Aug 30 '09 at 22:08
0

You don't have a 3GB swap file, you have an 8GB swap file. Let me explain. Task manager on Vista and Win 7 shows total memory with the label swap file. So it is telling you that out of 16GB available memory, (8GB RAM which you told us about, and simple maths gives us another 8GB swap) you are using about 3GB. It doesn't tell you if that 3GB is in RAM or swap. It is probably mostly in RAM.

There have already been many others saying to trust the OS. I would agree, although I would probably reduce the minimum swap file size to something a little more realistic. Like 1GB. No point wasting drive space, and having too large a swap file (more for the OS to keep track of) can also hurt system performance.

pipTheGeek
  • 1,152
  • 5
  • 7
  • Not quite- see http://serverfault.com/questions/74822/how-do-i-tell-if-my-windows-server-is-swapping/75027#75027 for detail on how windows manages and uses memory – Jim B Mar 05 '10 at 22:04