Windows Virtual Memory

The magic smoke.

Moderators: phlip, Moderators General, Prelates

User avatar
bocochoco
Posts: 317
Joined: Thu Aug 06, 2009 8:22 pm UTC

Windows Virtual Memory

Postby bocochoco » Wed Feb 16, 2011 6:50 pm UTC

How much memory should my computer have for me to disable the pagefile without suffering from crashes? I've got 8GB at the moment, and I've thought about adding another 8gb for $100 to use this stupid Amex gift card without leaving inaccessible amounts of change left over on it, never to be seen again. Is 8gb enough or would I have problems because of this?
Image

User avatar
Kromix
Posts: 288
Joined: Thu Mar 25, 2010 7:26 pm UTC
Location: DFW, Great State of Texas

Re: Windows Virtual Memory

Postby Kromix » Wed Feb 16, 2011 7:53 pm UTC

i have done it with 4gb, and only ran defrag before reenabling it, but 8 should be ok. although i would not recomend it.


Edit: now about readyboost, it is moot and unecessary most of the time, if you disable pagefile, and in USB3, you might be ably to balance issues of stability with readyboost... i tink i might try that at home with usb2.0... disable pagefile and work off ram and readyboost... i'll see how it goes lol. bypass harddrive writes lmao
Image
Click Me! <---- Click There! :)
Spoiler:
Image

User avatar
bocochoco
Posts: 317
Joined: Thu Aug 06, 2009 8:22 pm UTC

Re: Windows Virtual Memory

Postby bocochoco » Wed Feb 16, 2011 8:16 pm UTC

Thats the idea, bypass the hard disk for memory operations. I dont have any usb3 keys or I'd try setting up readyboost using one of my usb3 ports.
Image

Polah
Posts: 40
Joined: Tue May 25, 2010 3:17 pm UTC

Re: Windows Virtual Memory

Postby Polah » Wed Feb 16, 2011 10:48 pm UTC

Depending on what you're doing, 8GB should be more than enough. If you're doing high resolution video editing, perhaps not, but for anything else it's two times more than you'd normally need.

User avatar
cerbie
Posts: 934
Joined: Sat Jul 05, 2008 5:14 am UTC
Location: USA

Re: Windows Virtual Memory

Postby cerbie » Thu Feb 17, 2011 3:52 am UTC

Run task manager. Keep tabs on your memory use. There is no set amount.

Also, am I the only person who was expecting an OT OP, with virtual memory being in the title?
DSenette: (...) on the whole, even a trained killer cow is kind of stupid.

Carnildo
Posts: 2023
Joined: Fri Jul 18, 2008 8:43 am UTC

Re: Windows Virtual Memory

Postby Carnildo » Thu Feb 17, 2011 4:04 am UTC

Last I checked, Windows didn't appreciate having the pagefile disabled, even if you had enough physical RAM to do everything you want. 8GB should be enough to let you disable it, but be prepared to re-enable it if you get severe unexplained slowdowns.

User avatar
Meteorswarm
Posts: 979
Joined: Sun Dec 27, 2009 12:28 am UTC
Location: Ithaca, NY

Re: Windows Virtual Memory

Postby Meteorswarm » Thu Feb 17, 2011 5:50 am UTC

Carnildo wrote:Last I checked, Windows didn't appreciate having the pagefile disabled, even if you had enough physical RAM to do everything you want. 8GB should be enough to let you disable it, but be prepared to re-enable it if you get severe unexplained slowdowns.


Why wouldn't the expected symptom be programs closing due to out of memory errors?
The same as the old Meteorswarm, now with fewer posts!

User avatar
bocochoco
Posts: 317
Joined: Thu Aug 06, 2009 8:22 pm UTC

Re: Windows Virtual Memory

Postby bocochoco » Thu Feb 17, 2011 2:13 pm UTC

Well, I turned it off. No problems of yet, but I haven't noticed an obvious performance gain either. With memory being much faster than a hard disk, I figured it would make things work faster.
Image

Game_boy
Posts: 1314
Joined: Tue Mar 04, 2008 7:33 pm UTC

Re: Windows Virtual Memory

Postby Game_boy » Thu Feb 17, 2011 4:13 pm UTC

If you want your computer to feel faster you need to upgrade the CPU, GPU (for games) or the most effective, buy an SSD. $200 or so would be enough to upgrade one of those three.

I imagine it wasn't using the pagefile. Under normal use I doubt it's even using 4GB of your 8GB.
The Reaper wrote:Evolution is a really really really long run-on sentence.

User avatar
bocochoco
Posts: 317
Joined: Thu Aug 06, 2009 8:22 pm UTC

Re: Windows Virtual Memory

Postby bocochoco » Thu Feb 17, 2011 7:00 pm UTC

Game_boy wrote:If you want your computer to feel faster you need to upgrade the CPU, GPU (for games) or the most effective, buy an SSD. $200 or so would be enough to upgrade one of those three.

I imagine it wasn't using the pagefile. Under normal use I doubt it's even using 4GB of your 8GB.


I've got a phenom II X6, radeon hd 6870, and windows is running off an ssd already... It feels fast, but faster is better right?
Image

User avatar
Meteorswarm
Posts: 979
Joined: Sun Dec 27, 2009 12:28 am UTC
Location: Ithaca, NY

Re: Windows Virtual Memory

Postby Meteorswarm » Thu Feb 17, 2011 8:17 pm UTC

bocochoco wrote:I've got a phenom II X6, radeon hd 6870, and windows is running off an ssd already... It feels fast, but faster is better right?


There are lots of factors that influence perceived computer speed. Unless windows pages to disk very aggressively (and I don't think it does, but I am not an expert), your page file should not even be in use unless you're running out of memory.

Again, unless you're paging aggressively, disabling paging only provides a speed up if you would be otherwise paging, which means you're out of memory, which means that programs are being denied memory allocation requests and probably crashing.
The same as the old Meteorswarm, now with fewer posts!

User avatar
Endless Mike
Posts: 3204
Joined: Thu Dec 06, 2007 3:04 pm UTC

Re: Windows Virtual Memory

Postby Endless Mike » Thu Feb 17, 2011 8:42 pm UTC

I kind of feel like you're not going to eke a noticeable difference at this point.

User avatar
bocochoco
Posts: 317
Joined: Thu Aug 06, 2009 8:22 pm UTC

Re: Windows Virtual Memory

Postby bocochoco » Thu Feb 17, 2011 8:47 pm UTC

Endless Mike wrote:I kind of feel like you're not going to eke a noticeable difference at this point.

:cry: One can hope. World needs more multithreaded applications.
Image

Game_boy
Posts: 1314
Joined: Tue Mar 04, 2008 7:33 pm UTC

Re: Windows Virtual Memory

Postby Game_boy » Thu Feb 17, 2011 10:18 pm UTC

bocochoco wrote:
Game_boy wrote:If you want your computer to feel faster you need to upgrade the CPU, GPU (for games) or the most effective, buy an SSD. $200 or so would be enough to upgrade one of those three.

I imagine it wasn't using the pagefile. Under normal use I doubt it's even using 4GB of your 8GB.


I've got a phenom II X6, radeon hd 6870, and windows is running off an ssd already... It feels fast, but faster is better right?


In that case, there is nothing you can do to make it feel faster.
The Reaper wrote:Evolution is a really really really long run-on sentence.

Carnildo
Posts: 2023
Joined: Fri Jul 18, 2008 8:43 am UTC

Re: Windows Virtual Memory

Postby Carnildo » Fri Feb 18, 2011 4:39 am UTC

Meteorswarm wrote:
Carnildo wrote:Last I checked, Windows didn't appreciate having the pagefile disabled, even if you had enough physical RAM to do everything you want. 8GB should be enough to let you disable it, but be prepared to re-enable it if you get severe unexplained slowdowns.


Why wouldn't the expected symptom be programs closing due to out of memory errors?

Because the problem is not that you're running out of memory. The problem is that certain parts of Windows expect a pagefile to exist, and misbehave by slowing down if it doesn't.

User avatar
Sc4Freak
Posts: 673
Joined: Thu Jul 12, 2007 4:50 am UTC
Location: Redmond, Washington

Re: Windows Virtual Memory

Postby Sc4Freak » Sat Feb 19, 2011 11:12 am UTC

Why in the world would you want to disable the page file? Disabling the page file is far more likely to decrease performance than anything else.

Windows does not waste a single byte of memory. Memory which is "free" is used as a cache for preloading, increasing filesystem performance, and improving general system performance. Windows automatically pages out memory which is committed but "unused", which frees up this memory for use by the system cache. By disabling the page file, you force every byte of committed memory to stay resident in physical RAM, severely reducing the amount available for the system cache. Since the only memory that's paged out is "cold" (ie. rarely used), you gain no benefit from forcing it to be resident in memory - but you lose performance by reducing the memory available to the system cache.

If you're using an SSD, then disabling the page file makes even less sense. The major bottleneck in paging operations is drive response time - which is about 10ms for mechanical drive but on the order of microseconds for SSDs. In other words, paging on an SSD doesn't have nearly the same performance impact as a mechanical drive - but by disabling the page file you're doing far more harm than good for general performance!

GeorgeH
Posts: 527
Joined: Mon Aug 17, 2009 6:36 am UTC

Re: Windows Virtual Memory

Postby GeorgeH » Sat Feb 19, 2011 9:27 pm UTC

If you're running a modern Windows OS, don't disable the page file. If you're not incredibly tight on hard drive space, don't even set a size for it; let Windows figure it out. Messing with page file settings is vestigial advice from the bad old days when DOS still ruled the underworld.

In addition to the reasons already mentioned by others, turning off the page file can also make some programs crash; so not only are you not doing overall performance any real favors, you could also be making your PC unstable.

Carnildo
Posts: 2023
Joined: Fri Jul 18, 2008 8:43 am UTC

Re: Windows Virtual Memory

Postby Carnildo » Sat Feb 19, 2011 10:31 pm UTC

Sc4Freak wrote:Why in the world would you want to disable the page file? Disabling the page file is far more likely to decrease performance than anything else.

This really depends on the OS and how you use your computer.

I run Linux on a computer with 8GB of RAM. Normally I run without swap: 5GB or so is used for running programs, while about 3GB is available for caching. A couple of weeks back, I tried adding 4GB of swap. The immediate result was a massive decrease in performance: switching between programs might involve several seconds of swapping. After a few days of use, things seemed to settle down at 4GB programs, 4GB cache, and 2GB swap (don't ask me where the extra gigabyte of data came from).

I disabled swap this morning, because of a persistent quarter-second of swapping every time I switched programs, combined with no appreciable improvement in disk access times. I suspect the lack of improvement is because the combined sizes of every program I use on a regular basis is less than 4GB.

User avatar
Sc4Freak
Posts: 673
Joined: Thu Jul 12, 2007 4:50 am UTC
Location: Redmond, Washington

Re: Windows Virtual Memory

Postby Sc4Freak » Sat Feb 19, 2011 10:52 pm UTC

Carnildo wrote:
Sc4Freak wrote:Why in the world would you want to disable the page file? Disabling the page file is far more likely to decrease performance than anything else.

This really depends on the OS and how you use your computer.

I run Linux on a computer with 8GB of RAM. Normally I run without swap: 5GB or so is used for running programs, while about 3GB is available for caching. A couple of weeks back, I tried adding 4GB of swap. The immediate result was a massive decrease in performance: switching between programs might involve several seconds of swapping. After a few days of use, things seemed to settle down at 4GB programs, 4GB cache, and 2GB swap (don't ask me where the extra gigabyte of data came from).

I disabled swap this morning, because of a persistent quarter-second of swapping every time I switched programs, combined with no appreciable improvement in disk access times. I suspect the lack of improvement is because the combined sizes of every program I use on a regular basis is less than 4GB.

Of course, different OS's have different swapping behaviour, but this thread is about Windows. :P I'm not familiar with how Linux handles the page file, so my advice only applies to Windows (and only to Vista+). But I'm surprised it's that bad on Linux - Windows tends to be fairly smart about what it swaps out. Unless you keep a lot of applications running in the background that you only occasionally switch to?

Carnildo
Posts: 2023
Joined: Fri Jul 18, 2008 8:43 am UTC

Re: Windows Virtual Memory

Postby Carnildo » Sun Feb 20, 2011 10:59 pm UTC

The immediate loss of performance was probably because I added the swapfile after the computer had been running for a few weeks. There was enough memory pressure at the time that Linux decided to swap something out almost immediately, but since it hadn't been tracking memory usage patterns, it made a bad guess based on insufficient data.

I'm at a loss to explain the persistent quarter-second of swapping.

User avatar
bocochoco
Posts: 317
Joined: Thu Aug 06, 2009 8:22 pm UTC

Re: Windows Virtual Memory

Postby bocochoco » Mon Feb 21, 2011 4:12 pm UTC

I haven't noticed any performance decrease, nor crashes. Yet. With 8/16gb though, am I really reducing the memory available to the system? It hasn't yet used even half of what I've got in there, even with Paging off.
Image

User avatar
cerbie
Posts: 934
Joined: Sat Jul 05, 2008 5:14 am UTC
Location: USA

Re: Windows Virtual Memory

Postby cerbie » Tue Feb 22, 2011 6:41 am UTC

Sc4Freak wrote:Why in the world would you want to disable the page file? Disabling the page file is far more likely to decrease performance than anything else.
Except that it doesn't, for those of us who aren't using SSDs. I've yet to encounter one these supposed unexplained slowdowns, except on PCs with swap files.
Windows does not waste a single byte of memory. Memory which is "free" is used as a cache for preloading, increasing filesystem performance, and improving general system performance. Windows automatically pages out memory which is committed but "unused", which frees up this memory for use by the system cache. By disabling the page file, you force every byte of committed memory to stay resident in physical RAM, severely reducing the amount available for the system cache. Since the only memory that's paged out is "cold" (ie. rarely used),
Wrong. If the application tries to used that memory, your entire system sits there and waits for your slow storage device. If you leave your computer and its applications running, this can make an i5 feel like a P3, and in Windows, this is not a configurable option (in Linux, you can have your cake and eat it, too). It will happen, if you leave your applications running, and try to multitask.
you gain no benefit from forcing it to be resident in memory - but you lose performance by reducing the memory available to the system cache.
Nope. There is memory available for that, typically more than the OS will bother to use. In Vista and 7, Windows' own task manager even let's you see that. I've got 8GB, and occasionally have breached 6GB. Typically, even caches and buffers don't get it past 5GB, and they readily move out of the way when an app wants to hog some RAM, so I still end up with 1-1.5GB completely free, even during times of pointless RAM-hogging insanity. This behavior is the same in Linux and Windows, though the idle RAM use differs.

SSDs obviously change the picture.

Carnildo wrote:The immediate loss of performance was probably because I added the swapfile after the computer had been running for a few weeks. There was enough memory pressure at the time that Linux decided to swap something out almost immediately, but since it hadn't been tracking memory usage patterns, it made a bad guess based on insufficient data.

I'm at a loss to explain the persistent quarter-second of swapping.
There is a swappiness setting. If set to 0, you can have both the advantages of no page file in Windows, but also have a page file to back you up. Many distros have swappiness set very high, as it improves throughput-related server test results. Most desktop-centric distros have it set in a middle range (60 seems common, but I've seen defaults as low as 20), by default.
DSenette: (...) on the whole, even a trained killer cow is kind of stupid.

User avatar
Meteorswarm
Posts: 979
Joined: Sun Dec 27, 2009 12:28 am UTC
Location: Ithaca, NY

Re: Windows Virtual Memory

Postby Meteorswarm » Wed Feb 23, 2011 3:38 am UTC

Carnildo wrote:The immediate loss of performance was probably because I added the swapfile after the computer had been running for a few weeks. There was enough memory pressure at the time that Linux decided to swap something out almost immediately, but since it hadn't been tracking memory usage patterns, it made a bad guess based on insufficient data.

I'm at a loss to explain the persistent quarter-second of swapping.


FWIW, my (linux) desktop has a swap partition and about 4 gigs of ram, the swap only has anything in it at all when I'm using nearly all of my RAM, and then none is used for caching.
The same as the old Meteorswarm, now with fewer posts!

Carnildo
Posts: 2023
Joined: Fri Jul 18, 2008 8:43 am UTC

Re: Windows Virtual Memory

Postby Carnildo » Thu Feb 24, 2011 3:56 am UTC

cerbie wrote:
Carnildo wrote:The immediate loss of performance was probably because I added the swapfile after the computer had been running for a few weeks. There was enough memory pressure at the time that Linux decided to swap something out almost immediately, but since it hadn't been tracking memory usage patterns, it made a bad guess based on insufficient data.

I'm at a loss to explain the persistent quarter-second of swapping.
There is a swappiness setting. If set to 0, you can have both the advantages of no page file in Windows, but also have a page file to back you up. Many distros have swappiness set very high, as it improves throughput-related server test results. Most desktop-centric distros have it set in a middle range (60 seems common, but I've seen defaults as low as 20), by default.

Setting it to zero sounds like it'll run into another problem: when the space for buffers+cache falls below a certain level (it varies, but seems to be around 150MB for this computer right now), the computer will slow to a crawl as it frantically loads and discards cache entries.

What I'd like is a way of saying "reserve 500 MB of RAM for caches, then don't swap unless the remaining RAM is exhausted".


Return to “Hardware”

Who is online

Users browsing this forum: No registered users and 6 guests