Sign in with
Sign up | Sign in

64-Bit: Swap File

Memory Upgrade: Is It Time To Add More RAM?
By

The swap file: relic or necessary evil?

We first had to go through some application parcours to resolve this fundamental question. We used 8, 12, and 16 gigabytes of RAM in our test system. We also installed and ran a variety of applications, many of them in parallel. 

We know that virtual and system memories are two different things. When calculating the memory requirements of different applications, you might assume that 8 GB of RAM or more would be enough to deactivate the swap file. But there's a catch: unfortunately, some programs specifically want to allocate the virtual memory. In these cases, a missing swap file causes an error or the system memory completely fills with garbage data.

You have to carefully test whether the installed application can operate without a swap file. If it can, disabling the swap file is a practical way to avoid slow hard drive access. If not, then you'll just have to live with it. The speed increase is noticeable, but not exactly a killer feature.

To produce a reasonably fair comparison, we started six parallel rendering tasks, each with 2 GB of maximum RAM usage. We ran this test with and without a swap file under the different RAM configurations.

With the swap file deactivated, we ran into problems using 8 GB of RAM (as expected) when Windows ran out of memory. The red values document the state at the time of the crash. If you have 8 GB of RAM installed, you should carefully consider whether it's worth the risk of a possible crash before deactivating the swap file. The performance increase from disabling the swap file is measurable, but still rather modest. At least 12 GB of RAM is needed before you can consider disabling the swap file in a consumer-type environment without worrying--unless you use software that requires a swap file, of course.

Conclusion

We would advise against disabling the swap file if you have less than 12 GB of RAM, at least without thoroughly testing all of your programs first. There is a performance increase when you disable it, but you have to factor in the risk of possible data loss.

Ask a Category Expert

Create a new thread in the Reviews comments forum about this subject

Example: Notebook, Android, SSD hard drive

Display all 153 comments.
This thread is closed for comments
Top Comments
  • 33 Hide
    holygigi , November 23, 2010 4:12 AM
    Finally a good read on Tom's, not a news about a rumor that a fruit company might provide a tease about something shiny.
    I use 8GB for about 2 years now, the best thing about it (and I didnt find this covered in the article) is that alt+tab-ing out from a game to windows and back to the game is almost instant. Even the hungriest game uses about 3-3.5 GB. Windows again about 2.5. So you always have 2GB free. Even though I dont have a SSD yet, after the initial slower start of an app (browser, anything), going back to it is instant. For me this is the real benefit of having more ram. The marginal (if any) FPS increase is not the main selling point. Multi-tasking is.
Other Comments
  • 4 Hide
    doyletdude , November 23, 2010 4:03 AM
    Hmmm... i'm concerned because i use triple channel so i'm currently at 6gb, which is under recommendation however to upgrade to 12gb might be to much, especially since i've heard that using more RAM slots negativley affects overclocking stability.
  • 8 Hide
    Lutfij , November 23, 2010 4:03 AM
    awesome read for the masses, thanks Tom!
  • 33 Hide
    holygigi , November 23, 2010 4:12 AM
    Finally a good read on Tom's, not a news about a rumor that a fruit company might provide a tease about something shiny.
    I use 8GB for about 2 years now, the best thing about it (and I didnt find this covered in the article) is that alt+tab-ing out from a game to windows and back to the game is almost instant. Even the hungriest game uses about 3-3.5 GB. Windows again about 2.5. So you always have 2GB free. Even though I dont have a SSD yet, after the initial slower start of an app (browser, anything), going back to it is instant. For me this is the real benefit of having more ram. The marginal (if any) FPS increase is not the main selling point. Multi-tasking is.
  • 3 Hide
    takeapieandrun , November 23, 2010 4:14 AM
    Personally, I would say 6GB is nice balance between capacity and cost. 4GB of RAM can become limited at times, but IMO 8GB is a little too much.
  • 2 Hide
    dogman_1234 , November 23, 2010 4:24 AM
    Nice article. I finally learned something i can be able to use later in my computing life.

    My questions are as followed:

    1) I am aware SSD's are a applied RAM set. So how can one use your system RAM to store files after shutdown as well.

    2) How can one add more memory to the GPU? I can see a noticeable jump in GPU RAM, or GMP as they put it.
  • 0 Hide
    coffee_man , November 23, 2010 5:08 AM
    i use triple channel but i only got 3 gb of ram, is better to add more ram or buy an ssd ?
  • 8 Hide
    Niva , November 23, 2010 5:18 AM
    Come on guys, the article and recommendation are pretty straight forward. They're recommending a minimum of 8 Gb and if you have less you might want to consider upgrading.

    That being said, if all you do is interwebs and some gaming you should be careful where you spend your money. Big ram is for programs that use a lot of ram, if you're doing heavy 3d modeling/animation, large photoshop files now that CS5 actually has 64 bit products it's justified. For games it's a crapshoot.

    I say stay with 6 Gb unless you see your ram usage over 50% regualrly.
  • -9 Hide
    quizzical , November 23, 2010 5:18 AM
    So basically, the conclusion is that slow hard drives are slow, which really doesn't say anything about system memory. What happens if you try running the programs off of a good SSD? Having an SSD in your system, but not putting any programs or even the swap file on it seems like a rather strange configuration.
  • 9 Hide
    iam2thecrowe , November 23, 2010 5:31 AM
    This is the best article you have ever written toms. Clears up everything I wanted to know and achieve with memory above 4gb. I always wondered if the ram disk thing would actually work with 4gb+ in 32 bit OS's. Now I know. Thanks!
  • 3 Hide
    arkadi , November 23, 2010 5:52 AM
    Grate article guys! That what Toms is all about! That kind of articles is exactly what i liked about toms in first place.
    As for this article....i tried to play with Ram drives few years back on my first x58 platform.....finally some on put it on paper.
  • 9 Hide
    musicaldevil , November 23, 2010 6:13 AM
    What's with the German text in the images on the page "64-Bit: Memory-Hungry Graphics Cards"?
  • 7 Hide
    cjmu , November 23, 2010 7:09 AM
    So if you put 12 or 16gb in a 64 bit system, you are better off using the top 4 - 8 gb as a ram disk (just as in the 32 bit system) and putting a swap file and temp files there. That leaves you with 8gb of usable system memory and nice fast temp/swap. At least until more apps move to 64bit. fair?
  • 4 Hide
    iam2thecrowe , November 23, 2010 7:31 AM
    As some people dont seem to understand what the article is about, ill try explain some key points i liked - 1. a 32 bit OS CAN use more than 3.25gb ram if the extra ram is made into a ramdisk and used for the swap file, which will speed up loading times, and save your hard disk for other things. 2. Using the same allocating ram to ramdisk for swap file technique can also help in 64 bit systems with 8gb or more ram, speeding up loading times. 3. Some games do make use of more ram, not as in framerate, but loading times and also corrupt textures can be caused by not enough video ram &/or system ram (this was surprising to me and may help others diagnose what they think is a video card issue, may be a RAM issue)
  • 4 Hide
    blibba , November 23, 2010 7:33 AM
    Lutfijawesome read for the masses, thanks Tom!


    Sarcasm?

    dogman_1234Nice article. I finally learned something i can be able to use later in my computing life.My questions are as followed:1) I am aware SSD's are a applied RAM set. So how can one use your system RAM to store files after shutdown as well.2) How can one add more memory to the GPU? I can see a noticeable jump in GPU RAM, or GMP as they put it.


    No, RAM forgets everything when it looses power, so you can't use it to store data after shutdown.

    Secondly, you can't add more memory to the GPU. Increasing your system memory makes more memory available to the GPU, but it's not the same as adding more to the GPU, and the memory on your graphics card is far faster than elsewhere in your system.
  • 4 Hide
    infodan , November 23, 2010 8:45 AM
    cjmuSo if you put 12 or 16gb in a 64 bit system, you are better off using the top 4 - 8 gb as a ram disk (just as in the 32 bit system) and putting a swap file and temp files there.


    to me is shows that in you have 12-16gb ram then you can disable the page/swap file altogether, although some programs may have problems.
  • -3 Hide
    pandemonium_ctp , November 23, 2010 8:48 AM
    Thanks for touching on the subject of the paging file. Though, I'm not sure I agree with the crashing instances. I would think that's due to having cheap ram or running your ram at latencies that it can't handle.

    I've had 8GB DC since my install of Windows 7 64 bit and disabling the page file was one of the first 'tweaks' I did. My primary HDD is a WD Velociraptor and I prefer to keep it running for a long time, so I like to keep HDD access to a minimum.

    After hours of computer use (gaming, codec rendering, watching HD content) my ram will be 0 free and 5500MB+ available (meaning the system is retaining old or garbage information), but I really don't care. It takes 5ms to dump the information and free up whatever necessary space for anything my CPU is sending over. I see no performance degradation or crashes at all regarding my memory doing the work it should be doing. Swap file still equals lose in my book.
  • 1 Hide
    dacian_herbei , November 23, 2010 9:35 AM
    I think this article is great.
    I did not know you can create a RAM disk so easy.
    What I'm missing in the tests above and which would improve massively is the the compilation time of different programs.
    If all the intermediary files are in the ram disk the whole process should be extremely fast.
    what is also not measured is the improvement in boot time.
    This should improve a bit too.
    It would be great if you guys could add this tests.
Display more comments