Jump to content

Recommended Posts

Posted

Hi,

I have been trying to find information on how to use a flash drive as RAM in windows XP. I've heard that it is possible but I haven't been able to find any info on how to do it after doing some google searches. Does anyone know if a) it's possible and b) whether there are instructions on the web about how to do it. I have a PNY Attache 256M drive. I know 256 isn't a lot but I only have 512 in my comp so I figure it should make some difference.

Thanks

Posted

I was told RAM, but I don't know what swap is. What is it and what would be the benefit of converting the flash memory into it?

Thanks

Posted

it would be swap. its kind of pointless. you can do it on vista (its one of it supposed 'new' features) and you can do it on linux(you can even use a floppy drive for it and have been able to do it since it could handle swap partitions) but i don't know about XP. you will already have a swap file on your harddrive so it isn't going to do much.

Posted

it depends how often you access your hdd for non-swap purposes and how much you need to use swap. my computer used to get all choked up trying to load something from the hdd into ram, whilst simultaniously trying to ditch something from ram to swap.

 

my 'puta sped up notisably after i got a crappy old hdd and plonked that in as a dedicated swap drive, even tho it's access speed is lower than my main hdd's.

Posted

The speed of the flash device is very important. Most flash memory is pretty slow; a hard drive is almost always faster. I’m really not sure what Microsoft is trying to pull here.

Posted

The reason ReadyBoost (in Vista) works is due to the rapid seek time of the Flash drive compared with a hard drive. The kind of data we're talking about here tends to be relatively short bursts from relatively numerous locations. So the overall effect is one of improvement, even though in theory the drive should be slower than an SATA HDD.

 

Note that Microsoft got the idea from drive manufacturers, who are now beginning to incorporate Flash memory directly onto controller cards. They already have RAM buffers, so clearly they're also getting another kind of improvement from this approach.

Posted

Thanks for the advice guys. Sounds like I got some bad info originally and that there isn't much point in using the extra flash drive as a swap device.

Thanks!

Posted

well, like pangloss said (and i've seen this said elsewhere) they can actually be faster for frequent short bursts of info. it depends what you use your computer for, and what else you have going thru the usb hub (i think).

 

if you want to try it out, i would assume you just plug your USB drive in, follow these instructions:

 

http://www.extremetech.com/article2/0,1697,1679935,00.asp

 

select the USB drive to have the page file, set the size to take up all the free space on the drive, and reboot.

 

note that you'll have to leave the USB drive in at all times. i don't think you can hot-(un)plug your swap drive :D

Posted

I'm still curious about the OP. It's be a really bad idea to use Flash memory as RAM for several reasons, but I can't help but wonder if there might be SOME use for it. But right now you can't do that even with Vista.

 

I'm sure the reasoning is that there's already a system in place that assists the user in memory-full situations. We're interplacing Flash in between RAM and HDD now which will improve that system. In theory that would be exactly the same thing as "using Flash as RAM".

 

But in practice it's something else, because VM is an OS system and it has its own overhead, background tasks, and various limitations.

 

You know what might be possible would be to do this at the hardware level, with extensive changes to the motherboard chipset and BIOS/CMOS. The goal would be to have some slots on the motherboard where you could shove in some slotted Flash chips (obviously chucking the USB ports, because I believe Flash is able to go considerably faster than USB 2.0 speed), and then you'd add that "memory" to the main pool.

 

But I'm guessing that the vast difference in speed between the "real" RAM and the Flash "RAM" would be so great that you would run into some paging and channeling issues. So you'd need something at the hardware level to stand in the way and gate-keep the swappage. Probably some programming in the Southbridge chip.

 

But look at the cool tricks you'd get out of the final product. For example, you could probably set up a "RAM Mirror", which would simply copy the contents of the RAM into Flash memory whenever the system was idle for a moment. That way if the power was cut, voila, you're right back where you were, without having to hibernate.

 

Sleep mode would become obsolete since you'd essentially have Hibernate capability built into the RAM itself (i.e. you could remove the battery of a laptop equipped in this manner without having to hibernate or shut down). And of course your hibernation time would just fly by.

 

All very interesting, but probably not useful enough for mass production. Although I believe one of the Sony ultra-portables uses some kind of trick where there's no hard drive, just a large pool of Flash memory instead. Not quite the same thing. :)

Posted

[bUBBLE=note that you'll have to leave the USB drive in at all times. i don't think you can hot-(un)plug your swap drive][/bUBBLE]

 

Do you mean that if I were to take it out and turn the computer on that it would be looking for hardware that isn't there and an error would occur, or do you just mean that while i'm using the computer I can't unplug the flash drive?

 

**edit** After reading the how to article it seems like it won't make as big of a difference as I thought. Though if you wouldn't mind still answering my question Dak I would appreciate it

Thanks!

Posted

well, iirc, if xp boots and it's page file is unnacessable (eg, if you've put the page file on a USB drive and then removed it) it'll just make do without a page file.

 

but if you pull it out whilst the computer is on, all the info in the swap will be unaccessable, which would probably result in a blue screen of death. someone else who understands swap files better will probably be able to say for sure.

 

(basically, when you run out of space in your RAM, some of it is put temporarily in the page file. so, if you remove the page file, loads of data about your running programs will be lost. which i'd strongly assume would casue a crash next time the computer tries to take them back out of the page file and put them back into ram.)

Posted

But look at the cool tricks you'd get out of the final product. For example, you could probably set up a "RAM Mirror", which would simply copy the contents of the RAM into Flash memory whenever the system was idle for a moment. That way if the power was cut, voila, you're right back where you were, without having to hibernate.

 

RAM is changing so fast it will always be out-of-sync. What you COULD do because of low power requirements is to have a battery lying around that keeps the RAM and flash powered just long enough to mirror in power failure events. It's like RAM and flash would have an UPS on their own.

 

but if you pull it out whilst the computer is on, all the info in the swap will be unaccessable, which would probably result in a blue screen of death. someone else who understands swap files better will probably be able to say for sure.

 

It should. If it keeps going with missing or corrupted RAM, further operation will further corrupt data, that's what BSOD is all about. By definition, BSOD is not a crash, as widespread knowledge goes. A crash is when nothing moves or it goes wild. BSOD is when the OS has detected that something is wrong and can't fix it without risking further damage.

 

E.g, your DOC is open in Word, some parts of the doc get corrupted by unplugging. If you save, you do more damage than if you just halt.

 

(basically, when you run out of space in your RAM, some of it is put temporarily in the page file.

 

In theory. In practice, system swaps out data even when there's plenty of free RAM to keep RAM free. If you have 100M free RAM and you load a 200 MB file, you have to wait the OS to swap 100 M. So what the OS does is page out data that hasn't been used for a while, thus freeing -say- 300 Mb so that the file load is instant.

 

This has the drawback the the system needs to swap back out even if you have enough RAM. It's about optimization for the PC role. For video editing, swap everything that isn't you. For a network server, don't swap until the last byte is full. And so on.

 

Several blends can be achieved, such as shadowing. RAM is swapped and also kept in memory, in a mirror. If it's needed, it's instant. If it needs to be swapped, it's instant. Requires loads of RAM.

Posted
RAM is changing so fast it will always be out-of-sync. What you COULD do because of low power requirements is to have a battery lying around that keeps the RAM and flash powered just long enough to mirror in power failure events. It's like RAM and flash would have an UPS on their own.

 

Hmm, you're probably right about RAM changing too fast. But there are also times where nothing happens for a while. I used to berate fellow office workers when I'd walk by their desk while they were away, and I'd see a huge work of text open on the screen in Word with the title "Document1" at the top of the screen. Of course Word handles that problem itself now, but not many programs do that.

 

That's an interesting alternative, but batteries of course have their own set of issues, such as requiring user maintenance and awareness. I think it would be interesting, though, if batteries were split up more often, so that you could change one while the other remained in place. Most of the time it's just one big slab. Sometimes you'll see them have a secondary battery in place of, say, the optical drive, but most people don't go for those because of the extra weight.

 

I don't think there's any real value in my idea; there's just too much else going on in that area. Laptops automatically go into protective sleep or hibernate modes when you close the clam shell, and desktops can be set to do the same. UPSs are common, and as you say my idea would require the computer to idle for a while before it would take the time to "back up" the RAM to Flash.

 

Any practical benefit from it would be exceedingly rare.

Posted

Flash wears out. Using it for something like swap is a horrible idea.

 

I can only assume ReadyBoost avoids making multiple successive writes to the same memory location.

Posted

THAT's interesting, I'd not heard that before. How quickly does it wear out?

 

I guess with something like ReadyBoost you probably don't care much, since the stuff is cheap and you can easily yank it from the USB socket for replacement. I'd have to agree that pretty much closes the door on my iffy suggestion.

 

(Although it does make me wonder how Vista handles failing ReadyBoost drives -- what kind of error checking it does and how it reacts to failure.)

Posted
THAT's interesting, I'd not heard that before. How quickly does it wear out?

 

I thought everyone knew that.

 

It depends on the type of flash, and whether your are reading or writing, I can't find any good numbers at the moment, it's thousands though.

Posted

http://en.wikipedia.org/wiki/Flash_memory#Limitations

 

Another limitation is that flash memory has a finite number of erase-write cycles (most commercially available flash products are guaranteed to withstand 1 million programming cycles). This effect is partially offset by some chip firmware or file system drivers by counting the writes and dynamically remapping the blocks in order to spread the write operations between the sectors. This technique is called wear levelling. Another mechanism is to perform write verification and remapping to spare sectors in case of write failure, which is named bad block management (BBM).
  • 1 year later...
Posted
Hi,

I have been trying to find information on how to use a flash drive as RAM in windows XP. I've heard that it is possible but I haven't been able to find any info on how to do it after doing some google searches. Does anyone know if a) it's possible and b) whether there are instructions on the web about how to do it. I have a PNY Attache 256M drive. I know 256 isn't a lot but I only have 512 in my comp so I figure it should make some difference.

Thanks

even i have heard the same by using RAM BOOSTER Software but it doesnt work. if you come across any updates regarding using USB Flash drive as RAM please lemme know also.

 

Regards,

Ritesh

riteshsaggitarius@gmail.com

  • 2 weeks later...
Posted
it would be swap. its kind of pointless. you can do it on vista (its one of it supposed 'new' features) and you can do it on linux(you can even use a floppy drive for it and have been able to do it since it could handle swap partitions)

 

Sort of a funny/curious story about that... "back in the day" circa '95 or '96 I was playing around with slackware and a 486DX33 machine with 8MB RAM... I put 2 floppy drives in the machine, then discovered that the drive and head IDs were switched from "normal" on one of the drives, however, this particular motherboard seemed to handle that rather strangely, and with a buddy, we were able to figure out how to make a device with 4 heads and double the number of tracks, that formatted to 2.88MB (with two floppies in of course) Now, the interesting thing was, it turned out also to be twice as fast... wee were seeing about 250-300KB/sec off it... not satisfied with this.. we then stuck a second floppy controller in the system and crosswired two more drives, and got another 2.88 "fast" floppy drive. Now, the HDDs we were using were clunky old non-DMA non-EIDE 400KB/sec beasties... so we got the crazy idea of combining the floppy volumes, and mounting it as a swap file... so we managed to do that and got a ~5MB device with 600KB/sec DMA transfers (FDD controllers have DMA) and it was faster than swapping to a HDD swap partition! However, 5MB was rather on the small side, and I'd borrowed one of the drives for the test, also made quite a lot of noise as you can imagine... Not toooo long after that, that machine got a decent DMA capable HDD with 1500KB/s + performance and so the config was not revisited.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.