RAM disk for swap file instead of hard disk??

J

John Smith

Is it possible to have WinXP and/or Win2000 setup so the hard drive is NOT
used for swap space (virtual memory)?

We currently have a machine that happily runs with 512MB of RAM and 768Mb
of disk space reserved for the swap file.

We'd like to eliminate the hard disk swap space and add an additional 1Gb of
RAM for the swap file in its place.


1) Can this be made to work? Will XP/2000 boot if the swap file points to a
RAM disk?

2) How do I define a RAM-based drive at system startup?

3) Anything else I need to know.


TIA
 
J

Jason Stevens

Windows will only use the swap file when it runs out of physical memory, and
by creating a RAM drive for your swap file you are only taking even more
physical memory away. This memory would have been used anyway, so using it
to create a swap file would not make any sense. Besides, with 512MB of RAM I
doubt the swap file is used very often if at all anyway.
 
R

R. McCarty

No, If your machine has 512 Mb, it is doubtful that the swap file is being
accessed very much at all. You wouldn't see any performance difference
using a "RamDrive" as swapfile space. Even under heavy loading XP
can still handle it, especially with 512 Megabytes of Ram.
The more effective way to utilize large amounts system memory with a
Ramdrive is to load your applications onto the RamDrive. One program
I've used allows you to save your RamDrive image and have it reload
at every boot. In that scenario you would get a tremendous performance
gain over a disk based application. Using RAM to handle the swapfile is
like pouring one bucket of water into another empty one and then back
again. If you think your system is heavily loaded use TaskMgr to view
the VM size and number of page faults that happens while in normal use.
 
J

John McGaw

John Smith said:
Is it possible to have WinXP and/or Win2000 setup so the hard drive is NOT
used for swap space (virtual memory)?

We currently have a machine that happily runs with 512MB of RAM and 768Mb
of disk space reserved for the swap file.

We'd like to eliminate the hard disk swap space and add an additional 1Gb of
RAM for the swap file in its place.


1) Can this be made to work? Will XP/2000 boot if the swap file points to a
RAM disk?

2) How do I define a RAM-based drive at system startup?

3) Anything else I need to know.


TIA
So far as I know it is possible to entirely turn off the use of the swap
file but if you have, after adding RAM, 1.5gB of memory the system should
not try to use the swap file much anyway. I simply moved my swap file over
to a dedicated S: partition and didn't worry about it. But any speed
benefits that the lack of swapping might cause would be pretty much
automatic in a system with enough memory.
--
John McGaw
[Knoxville, TN, USA]

Return address will not work. Please
reply in group or through my website:
http://johnmcgaw.com
 
J

John Smith

John said:
Is it possible to have WinXP and/or Win2000 setup so the hard drive
is NOT used for swap space (virtual memory)?

We currently have a machine that happily runs with 512MB of RAM and
768Mb of disk space reserved for the swap file.

We'd like to eliminate the hard disk swap space and add an additional
1Gb of RAM for the swap file in its place.


1) Can this be made to work? Will XP/2000 boot if the swap file
points to a RAM disk?

2) How do I define a RAM-based drive at system startup?

3) Anything else I need to know.


I forgot to add that this machine is for a high security application where
even the chance of having a swap file on hard disk is not thinkable. I know
that one can enable a registry option to wipe the swap file on shutdown, but
even that is not appealing.

Other tools like 'Eraser' can be used from a Dos-bootable floppy to securely
wipe the unused space on a drive, but that requires manual intervention, and
we all know that if it requires manual intervention it probably will not get
done or done properly.
 
A

Alex Marshall

The whole point of the swap file is that Windows will use it when you run
out of memory. If you put the swap file itself in memory (a ram disk) you
have completely defeated the purpose as you now have even less available RAM
and a small swap file that cannot expand as needed because it's confined to
the ram disk. If the memory that the ram disk would be taking up had been
available the swap file would not have been needed anyway. Eventually you
would end up with out of memory errors. The swap file is designed to work on
a hard disk. Besides as others have mentioned, with that much memory
available your swap file access would be negligible.
 
S

someone

No, If your machine has 512 Mb, it is doubtful that the swap file is being
accessed very much at all. You wouldn't see any performance difference
using a "RamDrive" as swapfile space. Even under heavy loading XP
can still handle it, especially with 512 Megabytes of Ram.
The more effective way to utilize large amounts system memory with a
Ramdrive is to load your applications onto the RamDrive. One program
I've used allows you to save your RamDrive image and have it reload
at every boot. In that scenario you would get a tremendous performance

what is the name of that program?
 
R

Ron Martell

John Smith said:
Is it possible to have WinXP and/or Win2000 setup so the hard drive is NOT
used for swap space (virtual memory)?

We currently have a machine that happily runs with 512MB of RAM and 768Mb
of disk space reserved for the swap file.

We'd like to eliminate the hard disk swap space and add an additional 1Gb of
RAM for the swap file in its place.


1) Can this be made to work? Will XP/2000 boot if the swap file points to a
RAM disk?

2) How do I define a RAM-based drive at system startup?

3) Anything else I need to know.

This is not a good idea.

Windows XP uses the swap file to compensate for the *lack* of
sufficient RAM to meet the total memory requirements being placed on
the computer.

If you create a RAM drive to hold the swap file then the RAM available
to Windows will be reduced by that amount. Less RAM available to
Windows means that a bigger swap file will be needed. So you will
have to increase the size of the RAM drive to hold the bigger swap
file.

That will further reduce the RAM available to Windows, which means
another increase in the size of the swap file that is needed. And so
on.

See where this is heading?

With your present amount of RAM there are two possible scenarios:

1. Your machine is being used for memory intenstive work and
therefore Windows is using the swap file to move active memory content
from RAM so that the RAM can be used for other, currently more
important tasks. In that situation you will end up as described
above.

2. Your machine is not heavily loaded and there is little or no
actual usage of the swap file. In that case there will be zero
performance benefit from putting the swap file into a RAM drive
because there is no actual hard drive activity related to swap file
usage.

Unfortunately Windows XP does not contain any method of easily
determining which of the two possible scenarios actually applies to
you. This is because a lot, and sometimes all, of what Windows XP
reports as swap file (page file) usage is actually phantom usage.
What happens is that most Windows components and application programs
ask for memory allocations that are larger, sometimes substantially
larger, than what they actually need to use under normal conditions.
So the Memory Manager only allocates RAM to those portions of the
requests that are actually being used and assigns the unused portions
to memory locations in the swap file. Because these items are unused
there is no actual disk activity needed - just an entry in the
internal memory mapping tables maintained by the CPU.

Check for actual usage of the page file (swap file) with a free
utility you can download from
http://www.dougknox.com/xp/utils/xp_pagefilemon.htm or from
http://billsway.com/notes_public/WinXP_Tweaks/ and use that to check
for actual page file usage.


If this utility reports little or no actual use of the page file (swap
file) then you are already in scenario #2 and there is no benefit to
be had from the RAM drive.

If this utility does report a significant amount of actual page file
usage (e.g. 50 mb or more) then my suggestion is to upgrade the memory
by 512 mb or perhaps 1 gb, at which point you will almost certainly be
in scenario #2.

Good luck


Ron Martell Duncan B.C. Canada
--
Microsoft MVP
On-Line Help Computer Service
http://onlinehelp.bc.ca

"The reason computer chips are so small is computers don't eat much."
 
R

Ron Martell

I forgot to add that this machine is for a high security application where
even the chance of having a swap file on hard disk is not thinkable. I know
that one can enable a registry option to wipe the swap file on shutdown, but
even that is not appealing.

Other tools like 'Eraser' can be used from a Dos-bootable floppy to securely
wipe the unused space on a drive, but that requires manual intervention, and
we all know that if it requires manual intervention it probably will not get
done or done properly.

One point.

I have never heard of anyone ever actually recovering usable
information of any kind from the contents of the swap file. Not
saying that it is impossible to do so, just that I have never heard of
any actual instance.

If you have high level security concerns then your best bet would be
to post your concerns to a security related newsgroup such as
microsoft.public.security or microsoft.public.windowsxp.security_admin

That is where you will the experts with hands-on experience with high
level security concerns.

Good luck


Ron Martell Duncan B.C. Canada
--
Microsoft MVP
On-Line Help Computer Service
http://onlinehelp.bc.ca

"The reason computer chips are so small is computers don't eat much."
 
R

Robert

John said:
Is it possible to have WinXP and/or Win2000 setup so the hard drive
is NOT used for swap space (virtual memory)?

We currently have a machine that happily runs with 512MB of RAM and
768Mb of disk space reserved for the swap file.

We'd like to eliminate the hard disk swap space and add an additional
1Gb of RAM for the swap file in its place.


1) Can this be made to work? Will XP/2000 boot if the swap file
points to a RAM disk?

2) How do I define a RAM-based drive at system startup?

3) Anything else I need to know.


TIA
_________________________________

Hi, John!
You should not atttempt to completely get rid of the SWAP file.
The SWAP file is actually necessary to the correct functioning of XP.
In any case, it is used to:
- store System Restore backups,
- store the current RAM state in anticipation of possible system
hang-ups and also when your system goes into suspend mode.

Just leave SWAP file management to XP.
 
W

Walter Hawn

My solution is to use a separate drive for the swap file and all temp files.
Even using an old, slow drive will show better performace, because the temp
and swap file usage (and XP does a lot of both -- even with large amounts of
RAM) is transferred to a different head/arm assembly. If you go to a
separate drive, the swap file size, and temp file creation, doesn't impinge
on your main storage, either, so you get less fragmentation overall. I've
been happily running my two-drive setup for about 18 months, with nary a
problem.
--
Hope this is helpful,

Walter Hawn
Please reply within Newsgroup
email addy is fictitious
 
L

Lorne Smith

Robert said:
Hi, John!
You should not atttempt to completely get rid of the SWAP file.
The SWAP file is actually necessary to the correct functioning of XP.
In any case, it is used to:
- store System Restore backups,
- store the current RAM state in anticipation of possible system
hang-ups and also when your system goes into suspend mode.

Just leave SWAP file management to XP.

Virtual memory is NOT used to store system restore filles.
Virtual memory cannot help you if your PC crashes, nor does it store the
system state when in suspend mode. I suspect you are thinking of the
Hibernation file (hiberfil.sys), which DOES store the current memory state
but ONLY when you tell the PC to hibernate. It is completely seperate to
the swap file and cannot be used to undo a system crash.

Virtual memory is merely a portion of the hard drive the PC can use as
"pretend" memory for when it runs out of the real thing. Think of it like
this: System memory is analogous to your desk where everything is available
a soon as it's needed; virtual memory is analogous to a file cabinet you've
got to get up and walk accross the room to. It can hold a lot more
information than your desk can, but it takes longer to get it out.

No offence Robert, but you should check your information before leading
others down the wrong path.

Lorne
 
R

Robert

Lorne said:
Virtual memory is NOT used to store system restore filles.
Virtual memory cannot help you if your PC crashes, nor does it store
the system state when in suspend mode. I suspect you are thinking of
the Hibernation file (hiberfil.sys), which DOES store the current
memory state but ONLY when you tell the PC to hibernate. It is
completely seperate to the swap file and cannot be used to undo a
system crash.

Virtual memory is merely a portion of the hard drive the PC can use as
"pretend" memory for when it runs out of the real thing. Think of it
like this: System memory is analogous to your desk where everything
is available a soon as it's needed; virtual memory is analogous to a
file cabinet you've got to get up and walk accross the room to. It
can hold a lot more information than your desk can, but it takes
longer to get it out.

No offence Robert, but you should check your information before
leading others down the wrong path.

Lorne
_________________________________

No offence Lorne, but have you checked YOUR information?
I gave that piece of information in complete good faith because I had
read it in a book on Windows XP.
But maybe that book led me down the wrong path.
Certainly, one of us must be barking up the wrong tree of knowledge! :)
 
L

Lorne Smith

Robert said:
_________________________________

No offence Lorne, but have you checked YOUR information?
I gave that piece of information in complete good faith because I had
read it in a book on Windows XP.
But maybe that book led me down the wrong path.
Certainly, one of us must be barking up the wrong tree of knowledge! :)

Such information is common knowledge to anyone who's been using windows for
a while, and I've been using and developing software for windows since
version 2 way back in the 80's...

What book gave you this incorrect information? Sounds to me like it belongs
in the bin...

Lorne
 
R

Robert

Lorne said:
Such information is common knowledge to anyone who's been using
windows for a while, and I've been using and developing software for
windows since version 2 way back in the 80's...

What book gave you this incorrect information? Sounds to me like it
belongs in the bin...

Lorne
_________________________________
Hi, Lorne!

1) Why be so aggressive? Yesterday I was "leading others down the wrong
path". Today my book "belongs in the bin".
People are often aggressive in this way when their life is not going
the way they would like or when they are short of real arguments.
Which is it, Lorne? A bit of both maybe?
In any case, why take it out on me? Please, let's stick to real
arguments!

2) "Common knowledge" has never been an argument. At one time it was
"common knowledge" that the earth was flat and that the sun was
revolving around the earth. So much for "common knowledge".
What's more, if the workings of the Windows SWAP file were so much
"common knowledge", there would not be so many people asking questions
about it, and so many others answering so many different things.

3) I know people who have used Windows systems for dozens of years.
They still haven't got a clue how it works on a deep level. So your
"experience" about Windows systems is as good as anybody's. It is no
ARGUMENT at all. As a matter of fact, you haven't got a clue since your
arguments only amount to "common knowledge" and your self-enlightened
"experience". You are only trying to impress people with your alleged
"experience". You obviously like to lord it over other people. I am not
impressed at all. I would be impressed if you belonged to the Microsoft
team who created XP. But obviously, this is not the case at all! You
just post "common knowledge" messages on newsgroups!

4) I won't try to impress you with "experience" but I'll still give you
a piece of my own humble "experience". In the past, I have used various
utilities to monitor both SWAP file and memory activity. Even when
there is surplus of memory and only 40% of memory is used, there still
is SWAP file activity. If the SWAP file was only meant to be used when
there is memory shortage, why is it used when there isn't?

Of course, no offence meant and no hard feelings, I hope!
 
L

Lorne Smith

Inline...

Robert said:
_________________________________
Hi, Lorne!

1) Why be so aggressive? Yesterday I was "leading others down the wrong
path". Today my book "belongs in the bin".
People are often aggressive in this way when their life is not going
the way they would like or when they are short of real arguments.
Which is it, Lorne? A bit of both maybe?
In any case, why take it out on me? Please, let's stick to real
arguments!

I wasn't aware I was being agressive. I seek only to inform and IMHO, books
which give out incorrect information DO belong in a bin!
I said you were leading others down the wrong path simply because you were,
albeit unknowingly... Aggression didn't come in to it, merely stating a
fact. If you took it the wrong way, I apologise.
2) "Common knowledge" has never been an argument. At one time it was
"common knowledge" that the earth was flat and that the sun was
revolving around the earth. So much for "common knowledge".
What's more, if the workings of the Windows SWAP file were so much
"common knowledge", there would not be so many people asking questions
about it, and so many others answering so many different things.

I used the phrase "common knowledge" freely in that as far as I was aware,
it IS common knowledge. Certainly everyone I know, knows under what
conditions the swap file is used. Maybe I should define it clearer as
"common knowledge to those with a technical/programming background"?
3) I know people who have used Windows systems for dozens of years.
They still haven't got a clue how it works on a deep level. So your
"experience" about Windows systems is as good as anybody's. It is no
ARGUMENT at all. As a matter of fact, you haven't got a clue since your
arguments only amount to "common knowledge" and your self-enlightened
"experience". You are only trying to impress people with your alleged
"experience". You obviously like to lord it over other people. I am not
impressed at all. I would be impressed if you belonged to the Microsoft
team who created XP. But obviously, this is not the case at all! You
just post "common knowledge" messages on newsgroups!

See above... I do "have a clue" actually... Nor have I ever tried to
impress people with the level of my knowledge. I mentioned Windows 2 only
to point out that I've been using Windows pretty much since it's beginnings.
I also mentioned I'd been developing applications for it since then also,
which should have given an indication that my knowledge was perhaps greater
than the average users. You asked for my sources of information, and my
sources of information are my experience...
4) I won't try to impress you with "experience" but I'll still give you
a piece of my own humble "experience". In the past, I have used various
utilities to monitor both SWAP file and memory activity. Even when
there is surplus of memory and only 40% of memory is used, there still
is SWAP file activity. If the SWAP file was only meant to be used when
there is memory shortage, why is it used when there isn't?

Ron Martell made an excellent post earlier describing "phantom" swap file
usage where Windows allocates swap file for program which "might" use it so
there's no need for me to reiterate it. If you disable the swap file
entirely, you'll actually find that a fair number of programs won't actually
operate very well, if at all...
Of course, no offence meant and no hard feelings, I hope!

I niether took or intended any of either :) Just enjoying the
conversation...
 
J

John Smith

Lorne said:
Inline...



I wasn't aware I was being agressive. I seek only to inform and
IMHO, books which give out incorrect information DO belong in a bin!
I said you were leading others down the wrong path simply because you
were, albeit unknowingly... Aggression didn't come in to it, merely
stating a fact. If you took it the wrong way, I apologise.


I used the phrase "common knowledge" freely in that as far as I was
aware, it IS common knowledge. Certainly everyone I know, knows
under what conditions the swap file is used. Maybe I should define
it clearer as "common knowledge to those with a technical/programming
background"?


See above... I do "have a clue" actually... Nor have I ever tried to
impress people with the level of my knowledge. I mentioned Windows 2
only to point out that I've been using Windows pretty much since it's
beginnings. I also mentioned I'd been developing applications for it
since then also, which should have given an indication that my
knowledge was perhaps greater than the average users. You asked for
my sources of information, and my sources of information are my
experience...


Ron Martell made an excellent post earlier describing "phantom" swap
file usage where Windows allocates swap file for program which
"might" use it so there's no need for me to reiterate it. If you
disable the swap file entirely, you'll actually find that a fair
number of programs won't actually operate very well, if at all...


Hi,

I'm the original poster who started this discussion thread.

Since I don't have a lot of 'common knowledge' about Windows (ask me about
OpenVMS instead), I need to ask the following:

a) When during the XP/2000 *boot sequence* does the swap file get used?

b) If the answer to a) is not at all, then is it not possible to
'instantiate' a RAM disk as part of the 'load these programs on startup' and
have the XP/2000 virtual memory use this RAM drive as the swap space?

c) Are there any hidden 'gotchas' in XP/2000 that absolutely says that the
swap space has to be on a disk drive with platters as opposed to some RAM?
In other words, is 1Gb of RAM disk dedicated to swap the same as 1Gb of
rotating platter space dedicated to swap?

d) Either way, RAM-based or rotating platter, when you run out of swap space
the shit hits the fan ...correct?

e) Since the application I have need of this for is a high security one, I
suppose that I might be able to not only put the aplication and its data on
an encypted drive but also perhaps put the swap file on an encrypted drive
as well? But this question also comes back to question a)...if XP/2000 needs
non-encrypted or non-RAM based swap to boot then I'm hosed.

TIA
 
O

oldschool

Hi John Smith.

The following information is, of course, use-at-your-own-risk by its very
nature.

I'll answer this in "inline" style below:

<snipped a lot of interesting but essentially non-relevant stuff by Lorne
and Robert>
Hi,

I'm the original poster who started this discussion thread.

Since I don't have a lot of 'common knowledge' about Windows (ask me about
OpenVMS instead), I need to ask the following:

OpenVMS? On a real VAX by any chance? said:
a) When during the XP/2000 *boot sequence* does the swap file get used?

b) If the answer to a) is not at all, then is it not possible to
'instantiate' a RAM disk as part of the 'load these programs on startup'
and
have the XP/2000 virtual memory use this RAM drive as the swap space?

Let me have you consider another direction on this.

If you have a good 32-bit RAMdisk program that can be launched as an NT
service (rare, but I've seen one), it could be set to launch at boot time
and be assigned a consistent drive letter, and then it could be used as a
drive for the pagefile. But there may be a better way (see below).

(BTW, I helped consult such as system before that project was scrapped in
favor of a battery-backed RAM drive as the boot volume - yes, they were
successfully booting from RAM - that was the screamingest system I've used
to date).

FYI, I have been working with RAMdisk programs and encrypted volumes for
years. So you know, Windows XP has a built in way to disable perpetual file
caching of the Windows system components to the swap file if you have enough
RAM on hand (min. 512M, 1 or 2 gig preferred), and yes, if you have enough
RAM on hand you can actually disabled all paging altogether.
c) Are there any hidden 'gotchas' in XP/2000 that absolutely says that the
swap space has to be on a disk drive with platters as opposed to some RAM?
In other words, is 1Gb of RAM disk dedicated to swap the same as 1Gb of
rotating platter space dedicated to swap?

Again, the answer as implied above is "no" to the hidden gotchas. There are
tricks, of course. You can do swapping to a RAMdisk, provided again that it
is an NT service compatible 32-bit program that can be started at boot time.

But again, there is a better way.
d) Either way, RAM-based or rotating platter, when you run out of swap
space
the shit hits the fan ...correct?

Microsoft's exception handling when it runs out of memory - virtual or
otherwise - has always been less than stellar. BSODs a little friendlier
with XP, but frankly nobody has really addressed this issue yet to my
satisfaction.
e) Since the application I have need of this for is a high security one, I
suppose that I might be able to not only put the aplication and its data
on
an encypted drive but also perhaps put the swap file on an encrypted drive
as well? But this question also comes back to question a)...if XP/2000
needs
non-encrypted or non-RAM based swap to boot then I'm hosed.

TIA

Firstly, as stated above, the best solution is to stick 4-gig of RAM in the
system, then turn off both system process paging and then turn off the
pagefile system altogether.

Secondly, when you have enough RAM, it is wise for performance sake to turn
of the system process paging anyway (for performance reasons).

Third, the right way to handle security is to use BIOS-level volume
encryption. Most BIOSes will support this (although not always with the
default BIOS that comes with your motherboard). Make sure you use a
password/encryption key that is not a "dictionary" type look-up, meaning is
composed of upper- and lower-case letters, numbers, punctuation and either
ANSI or Unicode extended characters (like é which can be entered by holding
down ALT+0223 on the numeric keypad).

Caveat emptor: If using BIOS level drive encryption, don't lose your
password! If you screw-up and forget your password/encryption key, your
computer (or at least your hard drive) will thereafter best be used as a
doorstop, because until you enter the right encryption key at the BIOS
power-on self test, the drive will not be mountable by the BIOS and
therefore neither bootable nor useable, even by connecting it to another
computer (in fact, it may not even be fdisk-able because the encryption
algorythm is stored in the drive's onboard parameter table). This is
considered the most secure method for running a Windows OS, because all of
the operating system, including the swap file, are on that encrypted volume.
And because it is mounted and managed by the BIOS, the encryption and
decryption are done "on the fly" without any (much) CPU performance
degradation and is completely transparent to the OS.

The ingredients for BIOS-level encryption are; 1) a BIOS that supports it
and 2) a hard drive that supports it (virtually any drive manufactured after
1998). Again, getting a replacement BIOS for your system that includes
hard-drive encryption (standard on Dell laptops) may be a custom job from
Doctor BIOS.

"One more thing..." (-Uncle from Jackie Chan Adventures cartoon)

Another way that I have used for years that I like a lot, but which is not
necessarily user friendly, is a virtual encrypted volume program called
SeNTry by Soft Winter. SeNTry allows you to create a virtual volume on your
very-large hard disk. This virtual volume mounts just like any other drive,
but the SeNTry software includes several highly advanced encryption
algorithms, which when used with the above-described password structure may
simply be uncrackable. I have not tried using a SeNTry volume as a swap
disk, but since SeNTry can mount as a service, it might work. Having never
tried it I don't know at what point of the boot process you would be asked
for your encryption key file and password, but if it did work like that it
would be very cool. In the mean time, using SeNTry in combination with
turning your system file paging off, and/or turning your pagefile off
altogether, would be a nice, reasonably secure environment. (I'm not saying
the NSA couldn't get something off such a system... <grin>)

To turn your system paging off you need to tweak your registry. As always
if you are not comfortable doing this, don't! And again, this should not be
done except on an 2k/XP machine with AT LEAST 512M RAM.

HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory
Management\DisablePagingExecutive
Edit the DWORD and change the value from 0 to 1 and close regedit and
restart.

Another method that makes shutting down really slow is simply to purge the
hard disk based swap file during shutdown.

HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory
Management\ClearPageFileAtShutdown
Change the value to 1.
REMEMBER, this will make shutdown slower, so don't be suprised when your
hard drive LED is on for half a minute during shut down.

And of course, if you didn't already know this, you can turn off your swap
file altogether in the System Properties | Advanced | Perfomance Settings |
Advanced | Virtual Memory ("Change") by selecting "No paging file" and
pressing set, but I'd only do this on a system with 2 to 4 gig RAM, because
this isn't just the OS system paging parameters, this sets all paging
including what is used by any applications that use the Windows swap file.
(It doesn't affect applications that use their own private paging files.)

I hope this helps.

(my thanks to gutspiller for the above registry tweeks)
oldschool
 
J

John Smith

Also answered [inline]
Hi John Smith.

The following information is, of course, use-at-your-own-risk by its
very nature.

I'll answer this in "inline" style below:


OpenVMS? On a real VAX by any chance? <grin>

[ Yes. 750, 780, 8200, and MVII, and VAXstations. Also many flavors of
Alphaservers.]

Let me have you consider another direction on this.

If you have a good 32-bit RAMdisk program that can be launched as an
NT service (rare, but I've seen one), it could be set to launch at
boot time and be assigned a consistent drive letter, and then it
could be used as a drive for the pagefile. But there may be a better
way (see below).

(BTW, I helped consult such as system before that project was
scrapped in favor of a battery-backed RAM drive as the boot volume -
yes, they were successfully booting from RAM - that was the
screamingest system I've used to date).

FYI, I have been working with RAMdisk programs and encrypted volumes
for years. So you know, Windows XP has a built in way to disable
perpetual file caching of the Windows system components to the swap
file if you have enough RAM on hand (min. 512M, 1 or 2 gig
preferred), and yes, if you have enough RAM on hand you can actually
disabled all paging altogether.


Again, the answer as implied above is "no" to the hidden gotchas.
There are tricks, of course. You can do swapping to a RAMdisk,
provided again that it is an NT service compatible 32-bit program
that can be started at boot time.

But again, there is a better way.


Microsoft's exception handling when it runs out of memory - virtual or
otherwise - has always been less than stellar. BSODs a little
friendlier with XP, but frankly nobody has really addressed this
issue yet to my satisfaction.


Firstly, as stated above, the best solution is to stick 4-gig of RAM
in the system, then turn off both system process paging and then turn
off the pagefile system altogether.

Secondly, when you have enough RAM, it is wise for performance sake
to turn of the system process paging anyway (for performance reasons).

Third, the right way to handle security is to use BIOS-level volume
encryption. Most BIOSes will support this (although not always with
the default BIOS that comes with your motherboard). Make sure you
use a password/encryption key that is not a "dictionary" type
look-up, meaning is composed of upper- and lower-case letters,
numbers, punctuation and either ANSI or Unicode extended characters
(like é which can be entered by holding down ALT+0223 on the numeric
keypad).

Caveat emptor: If using BIOS level drive encryption, don't lose your
password! If you screw-up and forget your password/encryption key,
your computer (or at least your hard drive) will thereafter best be
used as a doorstop, because until you enter the right encryption key
at the BIOS power-on self test, the drive will not be mountable by
the BIOS and therefore neither bootable nor useable, even by
connecting it to another computer (in fact, it may not even be
fdisk-able because the encryption algorythm is stored in the drive's
onboard parameter table). This is considered the most secure method
for running a Windows OS, because all of the operating system,
including the swap file, are on that encrypted volume. And because
it is mounted and managed by the BIOS, the encryption and decryption
are done "on the fly" without any (much) CPU performance degradation
and is completely transparent to the OS.

The ingredients for BIOS-level encryption are; 1) a BIOS that
supports it and 2) a hard drive that supports it (virtually any drive
manufactured after 1998). Again, getting a replacement BIOS for your
system that includes hard-drive encryption (standard on Dell laptops)
may be a custom job from Doctor BIOS.

"One more thing..." (-Uncle from Jackie Chan Adventures cartoon)

Another way that I have used for years that I like a lot, but which
is not necessarily user friendly, is a virtual encrypted volume
program called SeNTry by Soft Winter. SeNTry allows you to create a
virtual volume on your very-large hard disk. This virtual volume
mounts just like any other drive, but the SeNTry software includes
several highly advanced encryption algorithms, which when used with
the above-described password structure may simply be uncrackable. I
have not tried using a SeNTry volume as a swap disk, but since SeNTry
can mount as a service, it might work. Having never tried it I don't
know at what point of the boot process you would be asked for your
encryption key file and password, but if it did work like that it
would be very cool. In the mean time, using SeNTry in combination
with turning your system file paging off, and/or turning your
pagefile off altogether, would be a nice, reasonably secure
environment. (I'm not saying the NSA couldn't get something off such
a system... <grin>)

To turn your system paging off you need to tweak your registry. As
always if you are not comfortable doing this, don't! And again, this
should not be done except on an 2k/XP machine with AT LEAST 512M RAM.

HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory
Management\DisablePagingExecutive
Edit the DWORD and change the value from 0 to 1 and close regedit and
restart.

Another method that makes shutting down really slow is simply to
purge the hard disk based swap file during shutdown.

HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory
Management\ClearPageFileAtShutdown
Change the value to 1.
REMEMBER, this will make shutdown slower, so don't be suprised when
your hard drive LED is on for half a minute during shut down.

And of course, if you didn't already know this, you can turn off your
swap file altogether in the System Properties | Advanced | Perfomance
Settings | Advanced | Virtual Memory ("Change") by selecting "No
paging file" and pressing set, but I'd only do this on a system with
2 to 4 gig RAM, because this isn't just the OS system paging
parameters, this sets all paging including what is used by any
applications that use the Windows swap file. (It doesn't affect
applications that use their own private paging files.)

I hope this helps.

(my thanks to gutspiller for the above registry tweeks)
oldschool


Thanks very much. A most lucid dissertation of exactly the type I was hoping
to hear.

I've used PGP disk volumes before and they work quite well, but what I'm
after this time is a step beyond that.

Thanks again!!
 

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