Is it possible to use a USB Pen Drive as the swapfile?

M

mydejamail

I am thinking about using a USB Pen Drive as the swapfile for Windows -
is this possible?

There also the issue of USB pen drives having a limit of the number of
times they can be read or written.

If the former is possible how long might one last?
 
P

paulmd

I am thinking about using a USB Pen Drive as the swapfile for Windows -
is this possible?

Maybe, but it's a BAD idea. If for no other reason than speed of
access.

So, why exactly do you want to do this? If it's 'cuz you don't want the
feds to dig your porn out of your swapfile when your back is turned, it
won't work.
 
U

Uwe Sieber

I am thinking about using a USB Pen Drive as the swapfile for Windows -
is this possible?

Not thru the dialog - it offers fixed drives only. But if
you mount it into an empty folder on an NTFS drive in
the disk management an enter then this path in the registry
under
HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management
PagingFiles
e.g.
C:\MyPageFileFlashDrive\pagefile.sys 990 990
it may work. I've not tried it.
There also the issue of USB pen drives having a limit of the number of
times they can be read or written.

Yes, it's limited, but modern flash drives should have enough
reserve blocks.
http://en.wikipedia.org/wiki/Wear_levelling

The main problem I see is that Windows uses the page file
in blocks of 4096 Bytes but flash memory usually has logical
blocks of 65536 Bytes and whenever a 4K block is written the
flash device has to erase and rewrite a whole 64K block.
It would be interesting to know more about the pageing internals.
I think that Windows tries to write as linear as possible because
it saves access times on harddisks and this would help to avoid
the described effect. But who knows...
If the former is possible how long might one last?

Depends on how heavy you Windows uses the pagefile :)
So far all tries I heard about to kill a flash drive by endless
write accesses are failed.


Uwe
 
G

Guest

Bob I said:
1. Try Vista

Indeed Vista can use USB drives, but not exactly as the swapfile.
If only I understand this correctly, it copies there the part of OS image
that must load to the RAM on resume from standby or hybernation.
Then, it reads from USB drive, while the hard disk is busy spinning up or
seeking for other data.
Since this OS code stored on the flash changes rarely, the wear of the flash
is not as heavy as it were with random swap file data.

Regards,
--PA
 
P

Pavel A.

Bob I said:
That sounds like the support for "flash ram enhanced hard drives".

The initial portion of the OS still needs to load
from the hard disk, before it is able to read from USB, so it still
needs to wait until the HD spins up (unless they also change the boot
order to boot off this USB drive - what I don't think they do)

A real hybrid HD can return the data immediately if it is on it's flash part,
even when the rotating disk is not ready.

--PA
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top