Friday, March 27, 2009

Moving the Windows XP pagefile to an IDE flash drive - it works!

This has been kicked around the Web and discussed inside IT circles since CF and SD cards have dropped in price to affordable numbers. It's not a new concept, but the technology has now matured to the point where one can dabble in it and not break the bank in the process.

Long story considerably shortened: If you move the Windows XP pagefile to a drive other than the hard drive that the operating system is running on, you gain some measure of performance. Why? The hard drive heads don't have to access the operating system's pagefile at the same time they're loading a given program file, which keeps the I/O traffic jam minimized. That translates to speed.

Windows Vista does something like a mirror of the pagefile in their ReadyBoost technology, using a USB card reader to cache system data. The problem there is that the USB interface is pretty slow compared to an IDE or SATA bus, a bottleneck in itself, so it's not the best solution.

Unfortunately, Windows XP does not allow one to mount a flash card as an internal drive through a USB card reader, at least, not without some serious gyrations, and you're still stuck with that relatively-slow USB data path.

So how to accomplish it?

I have been working with two variations over the last couple of weeks, both camping out on the Secondary IDE bus, to avoid any data bandwidth conflicts with the system hard drive on the Primary IDE bus. You gain nothing moving the pagefile to a different partition on the same hard drive, and if you want the best I/O speed, you really should move the pagefile drive to a different IDE/SATA channel.

One way to accomplish this is to use a Compact Flash IDE adapter, which is a small circuit card that mounts a Compact Flash card on one end, with 40/44 pin IDE connections on the other end. There are jumpers for Master/Slave, and a separate power feed. This is the one I'm using:


Windows XP recognizes it as an internal hard drive, but there's a catch - it has to be Industrial or True-IDE flash. If not, then Windows XP will only recognize it as a removable flash drive, and will not allow one to move the pagefile to it. Garden-variety compact flash cards don't always offer the fixed disk option, so you have to be somewhat selective in the card(s) you buy for this purpose.

Once installed, it was easy to simply create a new Windows XP pagefile on the flash drive, remove the original pagefile from the system drive, and pretty much let it go with no further ado. The pagefile for this particular system is approximately 2Gb in size, so there's another 2Gb left on the card. I've moved some files in and out, and even loaded some videos to see what the performance was like. Writing was about like any other spinning platter hard drive, but reading files was pretty darned quick. I'll try to get some hard numbers later using PCPitstop.com, just to see what the transfer rates are compared to the rest of hard drives in this system. I was NOT able to format the flash drive in NTFS, so I left it as FAT32. That's fine, because NTFS does a lot more reading and writing in file management, and reading a pagefile every now and again via FAT32 isn't really a problem. I've removed all the files save for the pagefile and Windows-associated System Volume Information folder, so that the Compact Flash card's wear management features have plenty of available transistors to shuffle amongst.

How well does it work? Keep in mind this is a quad-Xeon 3.0Ghz machine with 2Gb of memory, and I doubt that it ever really hit the pagefile that hard to begin with. However, I have noticed so far that Windows boots a bit faster, and applications load a wee bit quicker. I've watched the green access LED on the IDE adapter, and it doesn't really show much activity save for boot-up and starting larger programs like Quark Express and Adobe Photoshop CS2. Brothers in Arms Earned in Blood seems to hit it a fair amount, also. It's actually working quite nicely, and I've since transferred the CF card and IDE adapter to my wife's identical workstation, with the intent of doing a long-term evaluation to see just how well a flash drive holds up. So far, so good, and it's really a minimalist install, although I mounted the CF/IDE adapter in her IBM's hard drive bay so I could see the three LEDs flashing through the front grill.

On a friend's suggestion, I also looked into a SSD hard drive, also known as DOM, or Disk-On-Module. This is a flash module that's designed to replace a spinning-platter hard drive completely, geared towards small embedded systems and notebooks. I didn't really want or need a large HD replacement, so I found an 8Gb Transcend DOM unit that's absolutely tiny, and snaps directly into the IDE motherboard socket:



Again, it installed very easily under XP Pro, but wouldn't let me format it as NTFS, so it, too, stays as FAT32. I mounted it on the Secondary IDE channel, and since it's occupying the socket, I won't be able to add any more IDE devices to that chain without some sort of cable male/female Y-adapter of sorts. I'm cool with that, because my DVD burner is the slave device on the Primary IDE channel, no problem. The rest of the hard drives in this computer are SCSI, so we're safe. I noticed that the little Transcend DOM drive has a miniature selector switch for Master/Slave, so they know some folks will probably use such an adapter cable. There were no instructions in the box with the drive, but I would imagine few would be needed.

This one performs the same way as the CF/IDE adapter combination, albeit with 8Gb of space vs. the former's 4Gb. I've left just the pagefile on this drive, too, so that wear leveling has a chance. That, and I will bump up the system memory eventually, which will automatically expand the pagefile size.

Like I said before, so far, so good. About the only reason I tried this is because people recommended against it, but since SSD technology is finally established, I want to see just how long such an implementation would hold up in day-to-day operation. It may be robust enough to actually work, or it may crap out at some point in the future - we'll see.

14 comments:

Anonymous said...

Typically FLASH media "wears out" faster and SWAP files have heavy I/O use. I am curious to see how your CF card holds up. Using a fixed SWAP file size instead up letting Microsoft manage the file size is reputed to help performance. Somewhere (I can't find the link), there was a way under XP to stripe multiple 4 GB SWAP files together to help performance and for massive memory operations.

kip said...

very creative solution. i wanted to try something like this (haven't figured out a way in a laptop).

but:
i heard (from a technician in india) that CFs are designed to last for about 10 million reads, then start to die. 10 million is a long time, if you store documents or whatever.

but a working swapfile, that gets about 5 read ins per second. you'll hit 100,000 read ins after 5 and a half hours of heavy use.

the CF lasts a year if you're lucky.

Gewehr98 said...

Hey guys, I was very much aware of the concerns about flash media having a limited read/write lifespan.

It's why I bought Industrial Flash, as well as that DOM IDE flash drive. They are advertised to have better wear-leveling. They're sold as solid-state replacements for hard drives in embedded and kiosk-style computer systems.

As I've watched these things in action over the last few months, I've noticed that the WinXP pagefile doesn't see much use in actuality. I installed HDDLED software, and the biggest hits the pagefile flash drives see are during boot-up, and also when one minimizes an application.

I also left them in FAT32 configuration, since by all accounts NTFS tends to be more disk-intensive. We'll see how the experiment pans out. If they die, then that's data for the experiment, nicht wahr?

ajay16 said...

Hiya, i have just bought a tablet PC and it has a PCIE card slot, so i was thinking il move the pagefile to a cf card in this slot so that the HDD isnt spinning while im just browsing the web.

Do i need an industrial CF card as surely the PCIE bus should just see it as a normal fixed drive no matter what card i use in it?

My tablet is 1GHZ, 1GB ram, and i was thinking about a 1gb cf card for pagefile, maybe 2.

Gewehr98 said...

You may indeed need to source Industrial Flash for that PCIE card reader.

That, or there's a technique for jumpering pins on a CF card to "force" it into True IDE mode. I didn't want the hassle, plus Industrial Flash is considered to have better longevity, so I defaulted to that.

jai said...

nice post
pls see our site for more info.
http://www.magicram.com

__________________________
IDE Flash
IDE Flash Disk

Brian said...

hmmm, I'm running Windows 7 64-bit w/ 4GB of RAM. Would this help my performance in hi-res gaming?

Anonymous said...

I wanted to try this for so long but was never sure if it would work.

Thanks for trying it out and documenting your experience!

johnvoni said...

Trying something similar in a small PIII laptop limited to 256mb of ram. Dual CF to IDE adapter. Master side and slave side. I'm going to put the OS on a 16GB 133x CF card on the master side and move the page file to a 4gb CF microdrive. This SHOULD get the benefit of greater speed in the Flash memory and moving hte write rewrites to the Microdrive which is not limited in its number of writes (not by the disk though the spinning platter will eventually die like any hdd).

Any holes in this thinking? Will this speed the laptop up at all?

Doug said...

Just wondering if you're still running the XP pagefile flash drive? Have any issues come up?

Gewehr98 said...

Doug,

Thanks for asking. Yes, I've continued using a flash drive for the Windows pagefile, but have now expanded the concept to Windows 7 on a newer IBM workstation. I'll have a blog post up soon detailing the long-term results of the older experiment, as well as particulars regarding the latest iteration.

LokIT said...

Really useful blog.Good work keeping this updated! encrypted flash drive Thanks a lot!

Anonymous said...

How is the Original CF card holding up, with the finite reads and writes. Did it get very hot also. i'm thinking of using an IDE anything for the pagefile on a SATA syatem, are there any jam ups that you might know of?

Gewehr98 said...

The CF card is still doing just fine, although it's running in a Quad 2.2Ghz Xeon IBM IntelliStation 6850 running XP Pro for now. I disabled defrag on that particular drive letter, since read times aren't dependent on platter file location when it comes to solid-state hardware. I don't really know how many read/write cycles that particular CF card has endured since becoming a dedicated pagefile drive, but I know the computer itself gets a workout nearly every single day. It doesn't appear to get any warmer than ambient case temps, but those IntelliStations are real wind tunnels when it comes to cooling their innards.

The Transcend DOM drive has since been migrated to an IBM 6221 Quad-Xeon IntelliStation running Windows 7 Pro 32 bit. It too appears to be working just fine, and it also gets a daily workout.

I've since done a couple more experiments, but they await a separate blog posting report.