Paging File on boot SSD or second HDD?

Page 2 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.

Fedaykin311

Member
Apr 14, 2009
48
0
0
The only thing that concerns me with wear on my SSD is my browser. I stream Netflix and that seems to dump large amounts of data into the browser cache (After watching one film I'll easily have 300MB+ of cache).

However (and please correct me if I'm wrong) but the wear issue seems to be moot. With 10,000 P/E cycles and wear leveling on a 120GB drive, that amounts to 1.2 PB of writes or 4 million Netflix movies before I approach wearing out the drive. If I had an earlier drive with 5,000 P/E, that's still 2 million Netflix movies.

With that in mind, I'd have to fill the drive once a day for 27 years to wear it out.
 
Last edited:

cytg111

Lifer
Mar 17, 2008
25,315
14,820
136
No, it's not magic, the pagefile is used as a backing store for data that has no other storage besides main memory. It's one of multiple locations that data can be paged to/from during normal operation and while it's not a hard requirement for virtual memory to work, but it's a really stupid idea to run without one. Much like a net for a trapeze artist. And artificially limiting 1 resource, memory in this case, in the name of making more of it available is a pretty bad idea as well.

We will have to agree on disagreeing on that one. To me it's stupidity to have a spindle drive emulate RAM. That just blows on multiple levels. once upon a time perhaps, but still, i'd much rather my OS tells me that i need more ram, rather than begin swapping parts of running-non-running stuff to disc.

Define this logic : I used to have 6G ram in my machine, windows insisted on a 6G swapfile. Windows knows best right (ok the kernel dev, the magic man), I use application stack X on this machine. Now i upgrade to 12G, and now windows wants a 12G pagefile. I still use application stack X as i did before. Why? (I'll define it : stupid.)
Also, what will windows, erh the kernel dev, erh the magic man do to me if I were to run out of ram AND pagefile? Is it too much to ask that whatever this response might be, be the same as if i just run off ram alone and disable the goddamn pagefile?
 

jiffylube1024

Diamond Member
Feb 17, 2002
7,430
0
71
- Some very productive solutions has been implemented with duct tape, to ignore the power of duct tape is upthere with "the magic man did it", wich trips right over the ".. Windows kernel developers really do know.." ... kernel devs being magic men. For all that we know, the reason for physical pagefile might be backwars compatability with a win3.11 app or whatever.

I say, duct-tape that shit(pagefile) to a ramdrive, test before and after and if it works out for the better then all hail the sacret duct tape.

I seriously doubt the pagefile is for backwards compatibility of Windows 3.11 (or even 32-bit) apps considering by default it's around 1-2GB.
 

jiffylube1024

Diamond Member
Feb 17, 2002
7,430
0
71
The only reason I would put the pagefile onto a spindle drive is if I had a very small SSD (30-40GB) where you're desparately offloading things like hibernate file, page file, Adobe Photoshop cache, etc to other drives. As long as your SSD is sufficiently large, I would agree with the majority that putting it on a separate drive seems like it would hurt performance and is generally a bad idea. Disabling it altogether is even worse IMO.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
We will have to agree on disagreeing on that one. To me it's stupidity to have a spindle drive emulate RAM. That just blows on multiple levels. once upon a time perhaps, but still, i'd much rather my OS tells me that i need more ram, rather than begin swapping parts of running-non-running stuff to disc.

Define this logic : I used to have 6G ram in my machine, windows insisted on a 6G swapfile. Windows knows best right (ok the kernel dev, the magic man), I use application stack X on this machine. Now i upgrade to 12G, and now windows wants a 12G pagefile. I still use application stack X as i did before. Why? (I'll define it : stupid.)
Also, what will windows, erh the kernel dev, erh the magic man do to me if I were to run out of ram AND pagefile? Is it too much to ask that whatever this response might be, be the same as if i just run off ram alone and disable the goddamn pagefile?

It doesn't emulate ram, it's a separate level of storage. Keeping everything in memory all of the time is a huge waste, there's lots of things in the background that have started and haven't been touched since right after your PC has booted.

The OS won't tell you run low on memory because physical memory should be as close to full as possible at all times. If you're not running enough to fill it, the OS will cache recently file data (and SuperFetch will preload what it thinks you'll want next) in order to speed up operations on them. And way too many apps don't check their memory allocations properly so once that call fails the app will likely just crash.

I'm pretty sure that Win7 doesn't default to a pagefile 1x the size of your physical memory like previous versions. And maybe your application stack X is dynamic and uses more memory for it's workload when it sees the more memory available now.

As you run low on pagefile space Windows warns you so that you can either enlarge it or kill whatever's using all of your memory. Once you finally run out of space processes will start crashing randomly, basically in the order of apps that just happen to try a memory allocation. This isn't new and every OS has something similar to this, there's lots of discussion about the OOM on Linux.

The response would be the same in both cases, failed malloc call, but leaving the pagefile enabled makes that event a lot less likely.
 

wpcoe

Senior member
Nov 13, 2007
586
2
81
On my desktop with 8GB RAM, I reduced my pagefile to minimum size 128MB, max size 4GB. So far, after months of usage, I've never seen the pagefile exceed the 128MB size.

My notebook has only 4GB RAM, so I was curious what would happen if I used the same settings. It's the same: never seen the pagefile exceed the 128MB size.

I doubt the pagefile is even being used. However, I've heard of some apps that require the presence of a pagefile to work -- even if they never end up using it, apparently -- so I've fought the temptation to delete the pagefile entirely.

And, to address the OP: I keep the 128MB pagefile on the SSD on my desktop.
 

cytg111

Lifer
Mar 17, 2008
25,315
14,820
136
http://support.microsoft.com/kb/889654

- While it may not be a smoking gun specific to x64 win7 or vista, its better than "the magic man did it"

If you have enough RAM installed in your computer, you may not require a page file at all, unless one is required by a specific application.
- allrightythen

unless one is required by a specific application.
- cough win3.11 pos-app cough - allrightythen

-Whatever. I say; you got the juice? Turn it off, got crashes? Turn it back on. Are you a stubborn sob, put it on a ramdrive and take it for spin (!!pun) again.
 

LiuKangBakinPie

Diamond Member
Jan 31, 2011
3,903
0
0
The only thing that concerns me with wear on my SSD is my browser. I stream Netflix and that seems to dump large amounts of data into the browser cache (After watching one film I'll easily have 300MB+ of cache).

However (and please correct me if I'm wrong) but the wear issue seems to be moot. With 10,000 P/E cycles and wear leveling on a 120GB drive, that amounts to 1.2 PB of writes or 4 million Netflix movies before I approach wearing out the drive. If I had an earlier drive with 5,000 P/E, that's still 2 million Netflix movies.

With that in mind, I'd have to fill the drive once a day for 27 years to wear it out.
So? get a couple of samsung F4 and use them as a scratch disk in a raid-0 config
 

Dadofamunky

Platinum Member
Jan 4, 2005
2,184
0
0
Why WOULD anyone run without a paging file, when space is so cheap and plentiful? I agree, it makes no sense. HOWEVER, if a) you are running a 64-bit OS, b) you have really disgusting amounts of RAM, i am not convinced running a paging file is really necessary. If you're running the typical 4096-6144MB paging file on a system with 24 GB of RAM and a 64-bit OS, where's the issue? If the swap file is stuff that would ordinarily reside in main memory otherwise? Now with every Linux OS ever made, you simply cannot eliminate the swap partition as it is an integral part of the Linux file system. But Windows does offer the choice to remove it entirely. Most people shouldn't do it.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
http://support.microsoft.com/kb/889654

- While it may not be a smoking gun specific to x64 win7 or vista, its better than "the magic man did it"

- allrightythen

And how many people do you think are qualified to enough to determine what "enough" memory for their workload really is? And the irony is that if you have enough memory to run without a pagefile, having one won't hurt one bit so what's the point in disabling it? You're just removing a safety net and possibly causing problems for yourself.

And you can throw out your "magic man" red herring all you want but it doesn't take away from the fact that most people don't understand virtual memory or how the pagefile fits into it. To most people it really is effectively magic until you read something like Inside Windows or Understanding the Linux Kernel and understand how the kernel handles resource management.

- cough win3.11 pos-app cough - allrightythen

-Whatever. I say; you got the juice? Turn it off, got crashes? Turn it back on. Are you a stubborn sob, put it on a ramdrive and take it for spin (!!pun) again.

Win3.x didn't have a pagefile, it had a swap files and their use is significantly different. Apps that would require a pagefile would be allocating large amounts of memory that has no file for a backing store. Probably niche things like A/V editors that maintain lots of changes in memory for real-time editing and don't use their own "magic" scratch disk like that POS Photoshop.

But regardless of whether you want to run without it or not, putting it on a RAM disk is the most idiotic thing you can do. Once again, if you have the memory to waste on a pagefile then you're probably not hitting it significantly anyway so you're just wasting that memory in a misguided attempt to make more more memory available.

hanspeter said:
You can also disable swap in Linux ...

Yes and that's very useful for the initrd environment and small, special/embedded systems like phones and such but not so much for a desktop trying to run FF4 and hoping the OOM killer doesn't attack.
 

cytg111

Lifer
Mar 17, 2008
25,315
14,820
136
"And how many people do you think are qualified to enough to determine what "enough" memory for their workload really is? And the irony is that if you have enough memory to run without a pagefile, having one won't hurt one bit so what's the point in disabling it? You're just removing a safety net and possibly causing problems for yourself."

- I dont get that you dont get it? Enough for workload X would be (otherwise i'd gotten memory faults) : 12G, 6G actual and 6G swap. Now the logic would be that 12G actual physical ram would do the job WITHOUT pagefile (this is, actual logic, not just spouting random words here).
 

Diogenes2

Platinum Member
Jul 26, 2001
2,151
0
0
If turning off the page file, or moving it to a RAM disk was really a good idea, we would no longer be discussing it... (..... after all these years )
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
"And how many people do you think are qualified to enough to determine what "enough" memory for their workload really is? And the irony is that if you have enough memory to run without a pagefile, having one won't hurt one bit so what's the point in disabling it? You're just removing a safety net and possibly causing problems for yourself."

- I dont get that you dont get it? Enough for workload X would be (otherwise i'd gotten memory faults) : 12G, 6G actual and 6G swap. Now the logic would be that 12G actual physical ram would do the job WITHOUT pagefile (this is, actual logic, not just spouting random words here).

Except it's not that simple, the pagefile is not just an extension of physical memory so you can't just add the amount of physical memory and pagefile and say that's the largest workload you can handle. That logic may work in a lot of cases, but then so does leaving the Windows default settings which is both easier and less risky so why not just take that route?

tweakboy said:
You dont need a paging file if you have 8GB ram... even @ 4gb you can disable virtual memory. gl

Disabling virtual memory would mean you can't run anything except real mode code, so you'd be stuck in DOS.
 

Engineer

Elite Member
Oct 9, 1999
39,230
701
126
Any thoughts of placing a small, fixed size pagefile on the SSD and then let Windows manage a 2nd one on a regular HD? Seems to be the best of both world (making the assumption that you have plenty of physical ram - 8GB or more).
 

Voo

Golden Member
Feb 27, 2009
1,684
0
76
- I dont get that you dont get it? Enough for workload X would be (otherwise i'd gotten memory faults) : 12G, 6G actual and 6G swap. Now the logic would be that 12G actual physical ram would do the job WITHOUT pagefile (this is, actual logic, not just spouting random words here).
Ok so you're basically saying that from those two scenarios:

Scenario 1: Pagefile available. Application runs out of memory and trashes around a bit. We get a bit lower performance (since the scheduler can swap out memory of other processes that may not even need it right now, maybe not even much). If we want to redeem this situation we can just install another memory stick when we get around it. Cost: A few gb space which for the large majority of people is extremely cheap, the minority is able to fix the problem and also get the cheap cost with one change.

Scenario 2: Pagefile disabled. Application runs out of memory, we get a out of memory exception (or even funnier a BSOD, we can swap some kernel memory out). Your whole work is lost and you can start anew, which undoubtly will cost a whole lot more time. Person is rightfully extremely pissed at windows.
Cost: Lost work, all the possible problems a BSOD while working can get you, annoyed person.

Scenario 2 is to be preferred.
Nope, I don't really see the appeal. Especially considering that virtual memory in its whole glory (overcommitment [oh god, why did I have to remind myself of that?], PAE,..) is complicated enough that even many programmers who should know it better don't get it completely right.

Also there are some application that allocate a large amount of memory at startup without planning to use all of it at once - without the pagefile windows can't handle that request (yeah linux could with overcommitment enable - something which incidentially still causes me nightmares). So without a pagefile the app fails.

And if we go into OS engineering reasons, usually the OS commits a whole lot of more memory than is actually needed so without a pagefile we actually WASTE perfectly good memory for no use, write the memory back with a low priority IO and afterwards use it for something useful (after all low priority IO only happens if nobody else wants to use the disk anyhow)

Completely agree with Nothinman on that one - there ARE some extremely rare cases where disabling it makes sense, but if you have one of those at hand you don't need to ask questions here (no local writeable disk; you want to make sure the scheduler doesn't swap out dirty pages,..)
 
Last edited:

KIAman

Diamond Member
Mar 7, 2001
3,342
23
81
I forced a fixed size for the page file (4096MB) and left it on my SSD. As far as usage, I have yet to have that file ever be touched and in the rare case it needs to, it will benefit from fast SSD speed.

I say leave it on SSD. The wear and tear will be minimal but you get vastly improved performance if your OS needs to page.
 

Capt Caveman

Lifer
Jan 30, 2005
34,543
651
126
Just picked a Microcenter 64gb SF SSD and came across this thread.

In regards to pagefile, on both Win7 64 and WinXP 32, I've found that even if I have plenty of free RAM, my systems will use 1gb+ of pagefile. I believe the pagefile is being used for Firefox even though, I've disabled FF from caching browser history on disk and increased to 512mb the amount of RAM it can use.

If I reduce the pagefile to 128mb, I get a too low on virtual memory warning and am told that Windows is increasing the amount of virtual memory and I see my pagefile going to 1gb.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Just picked a Microcenter 64gb SF SSD and came across this thread.

In regards to pagefile, on both Win7 64 and WinXP 32, I've found that even if I have plenty of free RAM, my systems will use 1gb+ of pagefile. I believe the pagefile is being used for Firefox even though, I've disabled FF from caching browser history on disk and increased to 512mb the amount of RAM it can use.

If I reduce the pagefile to 128mb, I get a too low on virtual memory warning and am told that Windows is increasing the amount of virtual memory and I see my pagefile going to 1gb.

How much memory do you have and what are you considering "plenty of free RAM"? Have you looked at the commit size, working set and private working set values for running processes in taskmgr to see what might be using a lot of memory?
 

dvdmike

Junior Member
Mar 10, 2013
1
0
0
I did this and the second drive just this second died.
Widows would not boot until I disconnected the second drive.
It was another SSD that was probably a mistake looking back!
So I am guessing with the way ssd's work that I am stuck without the data?
I can boot into windows and have moved the page file but everything is a little buggy to say the least, is there a way to reassign everything onto a working drive quickly?
Just to kill off the error messages and get the system back to normal?
Thanks in advance to anyone that can help
 
Last edited:

Namira Fang

Member
Mar 10, 2013
27
0
0
I actually just use a cheap 16GB SSD for my pagefile and temp folders. Also have Chrome using that drive to store all internet files. Still get my SSD performance with minimal wear to my main SSD. Think that 16GB drive cost me like $30.