back

by EwanG·14y ago·view on hn ↗
FWIW, but all my drives are set to timeoff "Never" because I would rather pay a little more in electricity. Per one of the other comments, even if the drive is spinning, Windows checks the page file first to see if it already "knows" about the file. In many cases that check takes longer than a modern drive would take to seek-find-copy. IMNSHO, Page files are an old solution that need to be rethought given the newer hardware that many of us are using.
2 comments
No page file generally means apps crash hard when they reach the limit of memory. On a multi-tasking OS not set up for making individual applications hibernate, that's a recipe for data loss.

Back in the days of 16-bit Windows, we had this thing called cooperative multitasking. It sucked. It meant that a single unresponsive application could potentially lock up the entire system, and you'd lose all apps. Now, we have preemptive multitasking. The OS calls the shots. Without a page file, we'd be back into a similar situation re memory: a single app could consume most of the system, and all other apps would fail on allocation - and most apps are not written to be stable in the face of allocation failures. It's either that, or background apps would need to be suspended or killed arbitrarily by the OS, or some other kind of drastic limitations on productive work.

I have 16GB of memory in my system; but I regularly run utilities that consume a large fraction of that (enough that the 12GB in my previous system was starting to look pokey - and my prior system with 8GB IIRC, I had to run utilities sequentially instead of in parallel to avoid page thrashing). The advantage of having lots of memory is that you can write utilities that build massive in-memory data structures. Problems are way easier to solve when you can rely on being able to stuff everything into a big hash table, rather than worry about temporary files on disk, or god forbid faffing around with a database and losing orders of magnitude of performance.

Page files, even in the presence of large amounts of RAM, are what enable this approach on workstations, in two ways: it means you won't suffer an app crashing from out of memory as you skirt the line of maximum physical memory; and secondly, and probably more importantly, page files backing allocated pages means the OS is able to free up memory sooner for those applications that demand it.

If you use your computer for casual use and don't stress it or do much critical work with it (i.e. use it much like you would a phone or tablet), you can get by just fine without a page file. But if you actually want to use the thing, a page file is a very handy thing to have.

I'm sure page files make sense. But if a page-file starts freezing applications regularly for seconds with typical settings and hardware, all while there is still sufficient main-memory, there seems to be some rework necessary indeed.
I've never had page file activity "freezing applications regularly for seconds" since the late 90s. I'm not sure what's causing what you're talking about; it sounds like a dodgy hard drive.
Not dodgy, just a sleeping hard drive. Modern HD's sleep when unused and take that long to wake up - that's not really unusual. People just don't notice that as much if they have a single HD as that is usually active most of the time you are working. But with 2 HD's (typical SSD + HDD combination) you often have one HD sleeping and will run into this a lot more thereby. There's ways to work around it - putting the page file on the HD which is more active or not allowing the HD to sleep as often. But my favorite would still be to simply prevent Windows from even using the page-file before the memory is at least used up to 50% - which would nearly never happen on my system for example.
I don't let my HDDs sleep for this very reason (my main drive is indeed SSD). Your heuristic would fail pretty badly on my machine; faced with an allocation for 8GB (not unusual for my utilities), I would have to wait while about 6GB of memory is paged out. That latency would be far worse than any delays from paging.
powercfg /change disk-timeout-dc 0

powercfg /change disk-timeout-ac 0