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