What about memory leaks? What about some programs that require tonnes of RAM to startup and then don't use the vast majority of it afterwards? What about things like superfetch that pre-emptively populates RAM?
Some folks say that Windows is really aggressive about what it chooses to offload to the pagefile but I dunno. It has a backing store whereby the contents of RAM also exist on disk. Then when a program wants more RAM, Windows can clear it quickly because it already has it on disk ready to be paged back in when needed. That should mean that Windows can handle new memory requests very quickly. Pagefile is one of these backing stores but is not the only one.
In the old, old days of Windows it may have been true that if a program wanted lots of memory, Windows would start writing tonnes to the pagefile so it could free up physical memory resulting in mucho hdd thrashing and mucho slowdown. I don't think its like that now and the mechanism I described is like the absolute most basic way that it can be put. The way Windows manages virtual memory could very well be the subject of an entire book. Whilst I acknowledge that most of the technicalities are beyond me, I trust Microsoft's recommendations for their own operating system and continue to do so over the opinion of some random sysadmin ranting anonymously on internet forum.
-
I disable page file completely. The performance gap between RAM and SSD/HDD is too large and is really the last resort if after maxing out the memory that the machine can handle and I still need more, I would enable it.
-
Again, what about memory leaks? What about programs that are grossly inefficient in terms of physical memory usage? What about disk access that has nothing to do with the pagefile?
For some reason, end users tend to habitually disable some of the mechanisms that make the most recent versions of Windows efficient with virtual memory management.
Disabling the pagefile doesn't stop Windows from accessing your storage disk which it will do anyway with code fetched from executable files on disk and dynamic link libraries etc. None of these things go into the pagefile whether you have one or not. You can also see where Windows will hit up the disk by monitoring which running processes get hit with hard page faults since they technically should never happen if you never need to page anything into memory from disk. You will at some point or other get hard faults, again whether you have a pagefile or not.
Hell, disabling the pagefile is actually a waste of system memory since its going to be chock full of stuff you haven't accessed in ages and in some cases probably never will. As such it doesn't need to populate system memory anyway. For example, if you have a 100 level undo buffer but you never undo 100 times. All of these branches don't exist on disk and since you don't use them why on earth would you want to keep them in system memory when this is exactly the type of thing that can and probably should be paged out and back in when necessary?
There is nothing stopping you from throwing money at a system with much more RAM than you actually need but I think that in a tautological sort of way, some people are creating a need for more RAM precisely because they disabled stuff like the pagefile. I feel however that this is like cracking a nut with a sledgehammer but at the end of the day, its your money. -
Memory leak ? I cannot say about your particular setup, I never seen one in my own usage, dated back to my NT days. The longest inter-boot I had was about 180 days.
What do you mean by creating a need for more RAM by disabled stuff like page file ? Page file is nothing more than VERY SLOW RAM as far as the OS is concern. If you need that, it means you need more RAM. Sure if it is occasional spike, it may not be worth the extra dollar for them but given the RAM price of today, I would definitely max out the RAM first before I enable page file. -
Go back to the undo example. Many programs allow for multiple undo levels. If you have no pagefile all of these branches are resident in physical memory. For things like executable files on disk, your OS can fetch necessary program code straight from the disk but undo branches are not stored on disk. Pagefile is naturally suited to this sort of thing where it isn't necessary to keep so many branches in physical memory. If you don't need the really old undo levels you can page them out and release physical memory for use elsewhere or the OS can prepopulate physical memory with stuff that you are more likely to use in the short term. They are kept on disk in the event that if you need to undo that far, you still can but it won't be hogging physical memory that is arguably better used elsewhere.
Memory leaks are programme specific, not system specific. It happens when a process is allocated a large amount of memory, not all of which needs to be used at the same time but the excess isn't released back to the OS. In recent memory the adblock extension for Firefox is or was notorious for this sort of thing.
As for maxing out RAM - that depends on how much RAM you really need. You can buy more RAM than you need but the key is to monitor how much RAM you are using so that you can make an informed purchase that will make a real difference.
Please also remember that Windows will hit up the storage disk in many circumstances that have nothing to do with the pagefile such as on disk cache, fetching from .exes, .dlls etc.
You'll be better served doing that sort of thing from an SSD than a HDD, especially when data needs to be fetched from its original storage location and these accesses are small and frequent or concurrent like alot of OS scratchwork is with temporary (and invisible) files/folders, browser cache etc.
I think you can get very technical about this if you want to but alot of it is concealed from the end user so you never need to think about it. Overall, I think that for the vast majority of users it is best to let Windows handle virtual memory and that most end users should go for the best price/performance parts rather than pay a premium to get more than you need. This matters alot with computers since even the top of the line computers right now will more than likely get slaughtered by the bang/buck parts you will be able to get in 2 or 3 years time. This is a pattern that has up to now been oft repeated.
There are other benefits of SSD too that have nothing to do with performance such as silent operation, low heat production, low power consumption, excellent shock resistance. They are physically small and easier to miniaturize than HDDs (see MBA's teeny SSDs) plus they weight less too. All of these things are important for a notebook computer and make a real difference that you can see, feel and hear on a day to day basis. -
I am a developer and my desktop typically has over 10 programs (Visual Studio, Excel, and a number of other things) opened all the time. And I need the so called 'unlimited undo'. However, I only hit may be a handful of times of 'low memory warning'. That was on a 32 bit system where the max RAM is limited to 3.2G or so. Now I have changed to 64 bit system and haven't even seen one. Which program you run that experience the undo which push beyond 4G RAM ?
As for non-kernel memory leak, close the program and re-open is the simplest thing. IE/Chrome/Firefox all keeps on using more and more RAM over time(as cache). But they are so uncritical and I have no problem closing them.
Beside, I would rather have a program that accidentally(or intentionally) allocated memory that I don't have and failed rather than it allocates 100G memory and Windows keep expanding the page file and bring down my whole system.
And that is exactly what I mean. But disable page file, I would be warned before I hit the ceiling, no need to monitor anything.
As for who is paying the premium, 4GB(even 8GB) seems to be cheaper than a reasonably sized SSD. All the other benefits mentioned are IMO fringe. Have to remember that the majority of the notebook out there are still HDD based meaning that people can live with the disadvantage of HDD. -
I don't think I'm explaining it properly. I think this guy does it better than me:
Understanding the Windows Pagefile and Why You Shouldn't Disable It
But even this is a super simplification. The whole thing about the undo buffer is just one example to illustrate a waste of memory. I didn't intend for people to think that undo is destroying my PC or anything absurd like that. Unlimited undo is useful of course. The point I'm trying to make is that you are not likely to undo all the way back to the beginning very often, so the least used ones (the furtherest back) can be paged out and back in when you need them. It isn't necessary to have all of it using RAM all the time. -
I think you explained very well. At least I understood... and I didn't think about it before. +1
-
Beside, I am not sure that explanation of page file is correct. -
tilleroftheearth Wisdom listens quietly...
Hayte has it right here.
Don't disable your pagefile if you want the most consistent performance from your system.
Of course, some configurations/usage/apps mask the need for a pagefile, but that doesn't mean the system is operating faster without one.
I have tested this myself many times (and purposely avoided the programs that will explicity fail without a pagefile) and invariably the pagefile-less system is slower in responding to my inputs compared to the 'default' install I do.
Note that my 'default' install is not Windows default:
With 8GB RAM I set the pagefile size at a 4095MB 'fixed' size for both min/max values. Not 'System Managed' or 'Automatically set pagefiles for each drive'. This is for my portable systems.
For my desktops, I set the pagefile sizes the same, but it is duplicated on my physically discrete drives (Raptors) three more times (4x Raptors). What this allows Win7x64 to do is choose which pagefile it can use on the fly - based on which drive is the most responsive at that point in time.
Logically/theoretically; a disabled pagefile is the 'ultimate'.
Real world benefit; a properly configured one (or one on each physical drive you have on your system) is actually (much) better.
chimpanzee, not saying that you should change what you're doing (since it works for you, obviously), but depending on the software used, a missing pagefile can give many, many glitches to an otherwise 'normally' performing O/S. -
I think i was seeing three things going on-
1) single channel mode verse dual channel mode. Single channel mode draws slightly lesser power by about 1-2 w with one module compared to two.
2) There was also the slight drop that i saw about 5-10 mins just switching from 4gb to 8gb.
3) My SSD is also a bit more power conservative. I switched from a 128GB Samsung to a 256GB Samsung but the difference between those drives are next to nothing. I switched around the same time that i did the upgrade.
All three things have resulted possibly may be an increase in battery life. I allow my virtual memory to be system managed.
May be someone else with an ultraportable can try this and remove one single 4GB and allow their virtual memory to be system managed? -
tilleroftheearth Wisdom listens quietly...
Rachel,
I didn't know we had the choice on how to manage our RAM?
How can I try this? -
I'm talking about virtual memory, I better correct that.
-
tilleroftheearth Wisdom listens quietly...
Oh! I thought I would have a new variable to play with.
SSD or 8 GB of Memory: Researching Reasonable Upgrade Options
Discussion in 'Hardware Components and Aftermarket Upgrades' started by Phil, Nov 2, 2010.