You don't need a page file. You need more RAM.

While smirking at CNET's Alfred Ng's response to advertising I browsed down to his tweet about a BSOD on a bus station terminal and thought hey, can I read this well enough to find out what the error is? Yep. It's KERNEL_DATA_INPAGE_ERROR, which is exactly what it sounds like: an error in restoring a page of memory from the paging file to physical memory. And that's an error which you really should never see again.

Paging

Paging files permit your computer to pretend that it has more memory than it actually does, by copying pieces of memory out to storage and then using those areas of memory again for something else. This storage can be lower-speed RAM somehow located on an expansion bus, but it is usually either a hard disk drive (commonly pejoratively referred to as "spinning rust") or a solid-state (flash) drive. Each of these devices has its own unique drawbacks when used as a swap device, and either way, paging incurs a massive performance penalty. Paging to a HDD means waiting for seeks and transfers on reads; paging to a SSD means waiting for transfers on writes, as well as adding wear to the disk.

Even this ignores the biggest problem with paging: most of the time, if you are paging, it's only going to make your life worse. The typical exception is poorly designed software which allocates more memory than it really needs as a matter of course, and complains about it if you don't have it. This is relatively unusual these days, but it did not stop happening. But most of the time, if you're doing a lot of paging, it's because a program is out of control and it's allocating more and more memory for no good reason. Eventually, one of two things will happen, when the paging file fills up: some critical operating system component will need more memory, won't get it, and the system will crash; or the "out-of-memory killer" process will figure out which process has gone nuts, all the software that you actually wanted to use which has been paged out will be paged back in, and you'll be able to continue using your computer.

So, what happens when you have no paging file and a program goes off the rails and uses all your memory? Exactly the same thing, only a lot sooner. Instead of thrashing your disk for a while and then crashing, or killing the offending program (you hope) and then thrashing it some more, the machine either crashes or it doesn't right away. Practically nobody should even page any more. It's completely bananas.

The only reason to page RAM is that RAM is expensive compared to disk, but RAM is now practically free compared to the days when paging was invented, or even when it was introduced to consumers. (For Windows, that was Windows 3.0; for Macintosh, it's System 7.) Maybe there will be another major memory price crunch; If you look at historic memory prices you'll see a steady downward trend (and perhaps marvel at what memory prices were like in the old, old days for a moment) with but one notable peak, between early 1998 and mid-1989 where people I know were making good money torching DIP DRAM off of PC boards, cleaning it up, and reselling it. That kind of thing will make you believe in paging. Compare the cost per gigabyte to historic hard drive prices and you will see that there used to be a yawning chasm between the cost of memory and storage, but that it has narrowed dramatically in recent years.

Now, there are some people who are still going to have to page, like people who are trying to build Android on a normal PC with a normal number of DIMM slots. Apparently, that's something of a problem, but maybe I'm out of date on that. Maybe some people with very large databases are still having to do some paging. For those people, there are RAM drives that will let them turn their old server memory into volatile memory drives and talk to it through a storage interface; this is a reasonably fast way to swap given modern storage interface speeds, and you avoid both wear and speed issues. And maybe some people with older laptops are physically unable to install enough RAM to run modern applications. But no desktop machine (and certainly no public kiosk) should be paging. It's just another opportunity for problems to arise. For example, a transient disk error that might be worked around if you aren't paging can turn into a BSOD. Most paging files are in the 1-2 GB range. How much is it worth to you to spec out another couple of GB of RAM, and not need one at all?

Add new comment

Default

  • Use [fn]...[/fn] (or <fn>...</fn>) to insert automatically numbered footnotes.
  • You may link to images on this site using a special syntax
  • Web page addresses and e-mail addresses turn into links automatically.
  • To post pieces of code, surround them with <code>...</code> tags. For PHP code, you can use <?php ... ?>, which will also colour it based on syntax.
  • Internal paths in single or double quotes, written as "internal:node/99", for example, are replaced with the appropriate absolute URL or path. Paths to files in single or double quotes, written as "files:somefile.ext", for example, are replaced with the appropriate URL that can be used to download the file.
  • Filtered words will be replaced with the filtered version of the word.
  • Lines and paragraphs break automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <blockquote> <q>

Issue

  • Lines and paragraphs break automatically.
  • To post pieces of code, surround them with <code>...</code> tags. For PHP code, you can use <?php ... ?>, which will also colour it based on syntax.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>

Drinking Game

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <p> <br> <pre> <h2> <h3> <h4>
  • Images may be embedded like: [image:node_id align=alignment hspace=n vspace=n border=n size=label width=n height=n nolink=(0|1) class=name style=style-data node=id] Leave off any attributes you don't want.
  • [img_assist|...] tags will be displayed, maybe. Please don't make more of them.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Refresh Type the characters you see in this picture. Type the characters you see in the picture; if you can't read them, submit the form and a new image will be generated. Not case sensitive.  Switch to audio verification.