Im just wondering if anyone with, say, 4GB+ of RAM actually turn off their page file for potential speed gain. And if so, do you see any none-trivial speed gains?
The theory is that if you turn off paging, all apps and kernel drivers and application data will only be kept in the RAM and not swapped out to the super slow HDD-based page file. This is obviously assuming you are not running super duper RAM hungry applications like Photoshop or such, as they will create their own HDD-based cache file independent of the OS.
-
-
The 'theory' and 'common wisdom' that you cite is flat out wrong these days. At least for an OS more modern than Windows 98. XP had some kernel problems in this area that made the theory/wisdom appear to be valid. But with kernel fixes/updates in the SP3 timeframe, even those problems went away.
When XP came out, the typical desktop had 256 mb RAM while servers had between 512 Mb and 2 Gb of RAM. Nearly 10 years later, a typical end user machine will have between 2 and 4 Gb of RAM while a server will have between 4 and 8 Gb or RAM. MSFT has updated/changed their kernel behaviors to take these hardware advances into account.
Windows (and Unix/Linux for that matter) always wants to have page space. Always. Programs like to and are allowed to pre-allocate as much memory as they want. Even if they are never ever going to actually use it. And sometimes those programs properly deallocate memory, sometimes they don't. Sometimes, programs leave parts of themselves in allocated memory just in case you are going to run that program again.
If you 'force' this allocation to occur in real RAM, you are shorting other programs and the OS when they need/want more memory.
Do note that system/virtual memory and RAM are NOT the same thing. RAM is your physical chip-based memory. Total System Memory is the blending of real RAM and disk based page space. The kernel takes care of swapping memory pages between RAM and page space as fast as possible and with some adaptive intelligence so that programs are executing from real RAM and are not stuck waiting for their memory pages to be brought in from page space.
In Server 2003/2008, there are utilities and OS settings you can force-set on a per-process basis to control this. Most often, these settings are controlled by the programs themselves like SQL Server, Oracle, and DB2 as well as server-side products from Adobe, Wolfram, and Autodesk. But in Vista/Win7, those settings are not available to the end-user. You can try and manually jam the registry settings in. The kernel knows that you are on a desktop OS and will ignore the server-specific memory and page space allocation control settings.
This is one of those old theories that will probably never go away. There are so many people who learned their MSFT OS from XP and seem to be unable or unwilling to update their knowledge. It's easier for them to spout obsolete knowledge (and yes, there is such a thing!!!!) than for them to upgrade their skillsets. You're going to see more and more of this in the next 6 months as MSFT starts to cancel and invalidate old MCSE certifications for people still stuck on XP and Server 2000/2003. -
So, are you saying that turning off the page file will lead to no performance gains under any circumstance whatsoever, and that there is no reason to turn it off?
-
If you want an all encompassing yes/no answer to your question you are not going to be happy.
I am saying that IF you bother to turn it off you are standing a good risk of crippling your system with NO chance of a long-lasting benefit.
At a minimum it will do nothing positive for you.
There is no maximum amount of memory the OS will try to allocate for itself. The OS is also smart enough to grab as much system memory as if needs for program modules (which in turn will sit in RAM as long as possible) and rapidly deallocate its own working set as user programs jump in and ask for memory. Without a page space, those deallocated memory pages are emptied completely. This means that when the OS wants to execute those functions (memory pages) that were once in RAM/system memory, they have to be loaded fresh from the appropriate .dll/.sys/.exe file. This takes a lot longer than if those code pages were already considered loaded and have been parked in page space.
People think that loading code from a .dll/.sys/.exe on disk takes the same amount of time as swapping code in from page space. This is not true. Code that is in page space is already registered to the OS as being available; bang, one OS system call and the code is swapped into RAM. Code that is coming in as a .dll./sys./exe needs to be read in, 'registered', read for memory allocation requirements, granted memory allocations, and have their code pages added to the system tables. It takes significantly longer to pull in fresh code than to swap it around to and from a page space. It also takes a lot more disk work. Yes, running a machine with a zero-length page file will cause the hard drive to WORK HARDER (more stress, more wear/tear) than if you are using a properly configured page space.
This is only counter-intuitave to people who don't really know how memory allocation and page files work in a MSFT (and Unix/Linux) OS.
Lots of people here advocate system hacks that cause no apparent harm. This is a far cry from saying that the same hacks provide an actual benefit and do not set you up for failure with hidden problems.
There are also about a dozen well publicized but useless registry hacks that date from the Windows 2000 days. These are ineffective on anything newer than Windows 2000 SP1.
And as far as Adobe and Autodesk 'cache' directories go. These are not for working code sets. They are for copies of documents/files/images that are in-progress for things like undo layers, etc, etc. Even MS Office does this but their 'cache' is known as temp files. Most programs will use the OS-defined temp directory for things like this. Both Adobe and Autodesk create their own temp/cache directories in order to give the user more flexibility in where to place all that disk work, say on a well-connected external disk that doesn't interfere with the main system disk. Beyond avoiding maxing out the I/O capabilities of the main system disks, it's really got NOTHING to do with the concept of system memory or system page space. Again, this 'feature' dates from the days of early desktop machines where something like an ill-behaved backgammon game could max out the available I/O of a hard drive. Doesn't happen so much these days. -
unless im mistaken, many ppl recommend disabling page file when using SSD boot drive w/ 4GB RAM
is this wrong? -
For those with a dual drive system, from what I've seen, it is recomended to move the page file to the HDD, even if it is just a small one there. I will have a page file on the HDD.
Can you run without a page file, the answer is obvious, yes you can. Is it smart to run without one, again obvious, no it isn't. So now I can hear you say why isn't it safe. Well software is alot better behaved than it used to be you still never know. The OS is designed to alow system function and part of this design is the page file. When you disable any core part of the OS design you take from its intended capabilities.
Albeit a minimalist example at work we have some monthly data stored by clerks in an excel file. at bare design the data should fit in a 50K file. Well they keep making a new file each month and the base file and subsequent work sheets storage size just keeps growing. They are now with data at 3 megs a file. These are minimal data sets if there were alot of data and thias happened it could easily kill the available ram.
Without a page file alot of data could get lost. With the page file the system will start slowing down and you will know something is afoot.
In the end it is a personal choice. You should be informed of the risks and if you are willing to take them in the end it lies on you. Never make this decision for someone else, it then is their decision so long as they are properly informed.
As far as performance hits, well with the super fast HDD's and now SDD's of today there really isn't a plus or minus or at least a noticable one, especially with Windows 7. So my take is if there is if there is no percievable difference and done smartly with your existing hardware configuration then why remove it entirely? -
"Lots of people recommend" things based on what they hear from a friend (who in turn heard it from other friends ad infinitum.....) without any understanding of the underlying technology. This is why I constantly tell people to update their personal skill sets, get familiar with the technet documentation, and stop relying on outdated knowledge that gets repeated endlessly.
Memory allocation is usually not a matter of whether or not a program is well designed. Memory deallocation can be. Garbage collection routines in Win7/Server2008 are much better than in previous releases. And at the end of the day, the OS controls everything based on what the user programs request and (hopefully) release bounced against what the OS itself requires.
And yes, the page file issue (flash memory r/w lifecycles) on SSDs are Just Another Good Reason to stay away from that technology for a while yet. Considering the prices, there aren't enough upsides to compensate for the downsides. This isn't a hit on the capabilities of an OS, it's a hard judgement on the suitability of a piece of technology for widespread use on desktops and laptops.
Yes, it is always a personal choice to make a bonehead decision.........
Have at it. Especially if you're going to cherry pick specialized situations to justify a decision. -
-
I have a 256 GB SSD and 8 GB RAM. pagefile is off
-
ScuderiaConchiglia NBR Vaio Team Curmudgeon
Gary -
You know, I would love to see someone hose a Windows 7 or Linux system with a disabled pagefile. It's pretty much impossible... your program may crash, and there will be much less caching of files for quick re-reading, but disabling a pagefile should have no ill effects otherwise.
The last time I had an issue with disabling a pagefile was about 10 years ago, with NT4 and a version of Photoshop that just got pissy that there wasn't a pagefile. And that's it. If you're running an SSD with a lot of memory (like I am), it can save a lot of already precious disk space to disable it, or put it down to the minimum 400MB that Windows wants for crash reporting information.
Further information: http://lifehacker.com/5426041/understanding-the-windows-pagefile-and-why-you-shouldnt-disable-it
TL;DR: If you have a big HDD, keep the pagefile around, it won't hurt and can help. With an SSD and a lot of memory, it won't cause your machine to explode if you disable it or shrink it severely, and can give you a bit more "breathing room" for disk space -
ScuderiaConchiglia NBR Vaio Team Curmudgeon
Gary -
It won't help the performance of the machine, but that's why I had that bolded bit at the bottom of my post. The TL;DR part that you apparently didn't read. You shouldn't turn it off in general because it rarely if ever hurts and can in certain instances cause things to go slower. But if you have an SSD or otherwise limited disk space it is a very valid way of getting quite a bit back from the default Windows install without much risk.
-
ScuderiaConchiglia NBR Vaio Team Curmudgeon
Gary -
I have turned off the paging file in the past. I couldn't tell any difference, except that once when I tried to play Company of Heroes on a huge map with no paging file and 2 GB RAM, it spontaneously crashed to desktop due to insufficient memory, and that I had some extra hard drive space (but far less than, say, reducing System Restore's space gives you).
-
I've had mine disabled for some time now, but more for disk space than performance. I don't have issues on my current laptop with 4GB (aside from a random "Low Memory" error when running a game (And I've gotten that warning with still 1.5GB left)) or my old Compaq with 768MB of RAM, but that runs XP.
It does seem to run a bit faster without a pagefile, but that might be because its a 4200RPM PATA drive that's only 30GB in size. -
Anyone with large amounts of RAM turn off page files?
Discussion in 'Windows OS and Software' started by Triple_Dude, Jul 9, 2010.