Help with the Windows 7 swap file.

P

Peter Jason

I have Win 7 and i7960 6-core CPU, and 6GB of RAM, & a X58 Gigabyte
motherboard.

The "gadget meter" on the desktop indicates that the RAM is
consistently used at 45%, and the CPU never exceeds 10%.

If I buy twice as much RAM to get 12GB, is there any way to configure
the system to use little or no page file?

Peter
 
C

Char Jackson

I have Win 7 and i7960 6-core CPU, and 6GB of RAM, & a X58 Gigabyte
motherboard.

The "gadget meter" on the desktop indicates that the RAM is
consistently used at 45%, and the CPU never exceeds 10%.
I'm not seeing a problem. What problem are you trying to solve? If
half of your existing memory is already going unused, what's the point
of having 75% go unused?
If I buy twice as much RAM to get 12GB, is there any way to configure
the system to use little or no page file?
Sure, but you can also do that without buying additional RAM. I'm not
sure why you'd configure the system that way since it already looks
like the Pagefile isn't being used extensively, but that goes back to
the question asked above: what problem are you trying to solve?
 
P

Paul

Peter said:
I have Win 7 and i7960 6-core CPU, and 6GB of RAM, & a X58 Gigabyte
motherboard.

The "gadget meter" on the desktop indicates that the RAM is
consistently used at 45%, and the CPU never exceeds 10%.

If I buy twice as much RAM to get 12GB, is there any way to configure
the system to use little or no page file?

Peter
You can try this, and get a breakdown of memory usage on your computer.
Maybe this will give you a more meaningful result than the "gadget".

"RAMMap v1.1"
http://technet.microsoft.com/en-us/sysinternals/ff700229

If that doesn't satisfy your curiosity, you can try this.

http://memory.dataram.com/products-and-services/software/ramdisk

Now, I tried that on my WinXP system. I allocated 2GB to a RAMDisk. This
is a benchmark of the resulting virtual disk.

http://img196.imageshack.us/img196/8694/hdtunedataram2gbabove.gif

Then, I placed my page file on it. Not a large page file, but
large enough. The end result, was a smoother running system,
under certain circumstances (i.e. when the normal system memory
was exhausted and the system needed to page). It helps to show,
at least on older versions of Windows, how their memory management
tends to choke under pressure. But the result wasn't enough of a
success, to continue to use it. I noticed a couple anomalies over
a period of four days, and stopped using it. If you get your 12GB
installed, you can have some fun with it.

Paul
 
R

Rich

Now, I tried that on my WinXP system. I allocated 2GB to a RAMDisk. This
is a benchmark of the resulting virtual disk.

http://img196.imageshack.us/img196/8694/hdtunedataram2gbabove.gif

Then, I placed my page file on it. Not a large page file, but
large enough. The end result, was a smoother running system,
under certain circumstances (i.e. when the normal system memory
was exhausted and the system needed to page). It helps to show,
at least on older versions of Windows, how their memory management
tends to choke under pressure. But the result wasn't enough of a
success, to continue to use it. I noticed a couple anomalies over
a period of four days, and stopped using it. If you get your 12GB
installed, you can have some fun with it.
I played with that exact same thing back in the Windows98 days. I never
quite grasped the contradiction. It's like removing clothing from a walk-in
closet, pushing a free-standing wardrobe closet inside the walk-in closet,
placing the clothes in there & somehow feeling that it works better for
picking out clothes.
However, it was fun playing with RAMDisk but I also uninstalled it as
unpractical.

Rich
 
P

Paul

Rich said:
I played with that exact same thing back in the Windows98 days. I never
quite grasped the contradiction. It's like removing clothing from a
walk-in closet, pushing a free-standing wardrobe closet inside the
walk-in closet, placing the clothes in there & somehow feeling that it
works better for picking out clothes.
However, it was fun playing with RAMDisk but I also uninstalled it as
unpractical.

Rich
I've experimented with previous OSes, so this isn't the first time.
But I don't leave them like that.

There was actually a second reason for the test I did on WinXP. We've
been told in the past, that WinXP 32 bit can only use 4GB of RAM. I
installed 6GB of RAM, and that RAMDisk program is the first one I've seen,
that could use memory above the 4GB mark, and that is with a 32 bit OS. It
implies that PAE, or some kind of similar mapping is being used,
which we're not accustomed to. With the 6GB plugged in, WinXP claimed
3.2GB was free, and 2GB was allocated to the RAMDisk. The page file was
placed on the RAM Disk. When I opened up enough applications to go past
3.2GB, the system didn't even blink, because the page file was so fast.
In the past, I've experienced long delays, when RAM is de-allocated on
that system. And that was the impressive part of the experiment. Normally,
I'd stop launching programs around the 2.6GB mark or so, but with the
pagefile mounted on the (unreachable) memory, I was able to work past
that point, with no obvious side effect. Allocating or deallocating
RAM around the "limit", had no visible effect. Smooth as could be.

I'd have liked to keep the configuration, but for a couple situations
that implied there was a bug in the software. One program "lost" it's
Task Bar icon, such that I could not click it and maximize the window.
I could go into Task Manager, and the program was still running. I could
kill it, no problem. But the graphical output was kinda "lost in space".
After that, I put the toys away, and returned the system to having
the pagefile on the hard drive. I also had a 3D game abort, half way
through the game, which is not normal on this system.

But it's still fun to play with.

The last time I tried that program, it crashed during the very first
test case I ran on it. The RAMDisk program has matured considerably
since then, and is damn close to being a "keeper". Using it to host
a pagefile, is asking a lot of it, and it's likely that if you were
just storing regular files on it, the thing would be spotless.

Paul
 
P

Peter Jason

I'm not seeing a problem. What problem are you trying to solve? If
half of your existing memory is already going unused, what's the point
of having 75% go unused?
Since the RAM memory is volatile, and the page data stays on the HDD,
then it would be safer to use the RAM method should the computer HDD
be imaged or stolen.

Sure, but you can also do that without buying additional RAM. I'm not
sure why you'd configure the system that way since it already looks
like the Pagefile isn't being used extensively, but that goes back to
the question asked above: what problem are you trying to solve?
Just for security as above. Also, the HDD would have to work less.
 
P

Peter Jason

You can try this, and get a breakdown of memory usage on your computer.
Maybe this will give you a more meaningful result than the "gadget".

"RAMMap v1.1"
http://technet.microsoft.com/en-us/sysinternals/ff700229

If that doesn't satisfy your curiosity, you can try this.

http://memory.dataram.com/products-and-services/software/ramdisk

Now, I tried that on my WinXP system. I allocated 2GB to a RAMDisk. This
is a benchmark of the resulting virtual disk.

http://img196.imageshack.us/img196/8694/hdtunedataram2gbabove.gif

Then, I placed my page file on it. Not a large page file, but
large enough. The end result, was a smoother running system,
under certain circumstances (i.e. when the normal system memory
was exhausted and the system needed to page). It helps to show,
at least on older versions of Windows, how their memory management
tends to choke under pressure. But the result wasn't enough of a
success, to continue to use it. I noticed a couple anomalies over
a period of four days, and stopped using it. If you get your 12GB
installed, you can have some fun with it.

Paul

Thanks, I'll check this out.
 
B

Brian Gregory [UK]

Paul said:
I've experimented with previous OSes, so this isn't the first time.
But I don't leave them like that.

There was actually a second reason for the test I did on WinXP. We've
been told in the past, that WinXP 32 bit can only use 4GB of RAM. I
installed 6GB of RAM, and that RAMDisk program is the first one I've seen,
that could use memory above the 4GB mark, and that is with a 32 bit OS. It
implies that PAE, or some kind of similar mapping is being used,
which we're not accustomed to. With the 6GB plugged in, WinXP claimed
3.2GB was free, and 2GB was allocated to the RAMDisk. The page file was
placed on the RAM Disk. When I opened up enough applications to go past
3.2GB, the system didn't even blink, because the page file was so fast.
In the past, I've experienced long delays, when RAM is de-allocated on
that system. And that was the impressive part of the experiment. Normally,
I'd stop launching programs around the 2.6GB mark or so, but with the
pagefile mounted on the (unreachable) memory, I was able to work past
that point, with no obvious side effect. Allocating or deallocating
RAM around the "limit", had no visible effect. Smooth as could be.

I'd have liked to keep the configuration, but for a couple situations
that implied there was a bug in the software. One program "lost" it's
Task Bar icon, such that I could not click it and maximize the window.
I once tried moving the XP swap file to a separate hard drive and that
caused problems, I can't remember exactly what now though. One problem I
have had with putting the XP swap file in odd places shows up only if you
get a crash that would cause a blue screen of death and creation of a dump
file. The dumping bit can sometimes go haywire if the swap file isn't where
it expects it to be.

There is a good chance this is all fixed in Windows 7.
 
R

R. C. White

Hi, Peter.

The swap file - also known as the page file or paging file, or as virtual
memory - is not very well understood by most computer users. One of the
best articles on the subject was written by MVP Alex Nichol, but he died in
2005, while Vista was still in beta and long before Windows 7. While that
article focuses on WinXP, and some details of the user interface have
changed since then, the fundamentals have not changed and we can still learn
a lot from that explanation:
http://www.aumha.org/win5/a/xpvm.htm

A key paragraph from that article applies to your question:
<quote>
Why is there so little Free RAM?
Windows will always try to find some use for all of RAM — even a trivial
one. If nothing else it will retain code of programs in RAM after they exit,
in case they are needed again. Anything left over will be used to cache
further files — just in case they are needed. But these uses will be dropped
instantly should some other use come along. Thus there should rarely be any
significant amount of RAM ‘free’. That term is a misnomer — it ought to be
‘RAM for which Windows can currently find no possible use’. The adage is:
‘Free RAM is wasted RAM’. Programs that purport to ‘manage’ or ‘free up’ RAM
are pandering to a delusion that only such ‘Free’ RAM is available for fresh
uses. That is not true, and these programs often result in reduced
performance and may result in run-away growth of the page file.
If I buy twice as much RAM to get 12GB, is there any way to configure the
system to use little or no page file?
The more RAM you get, the more of it will be "wasted", to use your term.
And see the paragraph, "Can the Virtual Memory be turned off on a really
large machine?", in Alex's article. I used RAM disks a lot and loved them -
but that was back in DOS days and even in early Windows, as I recall.
(Remember the days of "expanded RAM" v. "extended RAM", and using DesqView
and other RAM managers?) But that was when 1 MB was a lot of RAM and 1 GB
was almost unimaginable. Nowadays, all a RAM disk does in most cases is use
up RAM that could be used more efficiently - if needed at all - by the page
file.

If you insist on managing the swap file yourself, you can do it easily
(after a long click-path to find the page):
Start | Control Panel | System | Advanced system settings (furnish
Administrator credentials) | Advanced tab, Performance / Settings | Advanced
tab | Virtual memory / Change

Finally!

This page can be tricky. But you can choose from 3 "radio buttons": Custom
size, System managed size, or No paging file. Unless you actually
understand this subject, I recommend you let the system manage it. You need
to understand WHAT you are doing and, more importantly, WHY you are doing
it. I have 4 hard disks with a dozen or so partitions and 8 GB RAM. I let
the System manage my page file - and it does it very well. Just set it and
forget it.

I agree with Char: "I'm not seeing a problem."

RC
--
R. C. White, CPA
San Marcos, TX
(e-mail address removed)
Microsoft Windows MVP (2002-2010)
Windows Live Mail 2011 (Build 15.4.3508.1109) in Win7 Ultimate x64 SP1


"Peter Jason" wrote in message

I have Win 7 and i7960 6-core CPU, and 6GB of RAM, & a X58 Gigabyte
motherboard.

The "gadget meter" on the desktop indicates that the RAM is
consistently used at 45%, and the CPU never exceeds 10%.

If I buy twice as much RAM to get 12GB, is there any way to configure
the system to use little or no page file?

Peter
 
K

Ken Blake

I have Win 7 and i7960 6-core CPU, and 6GB of RAM, & a X58 Gigabyte
motherboard.

The "gadget meter" on the desktop indicates that the RAM is
consistently used at 45%,

If you are only using 45% of your RAM, you have considerably more RAM
than you need for what you use your computer for.

Here's my standard message on the subject:

Wanting to minimize the amount of memory Windows uses is a
counterproductive desire. Windows is designed to use all, or most, of
your memory, all the time, and that's good not bad. Free memory is
wasted memory. You paid for it all and shouldn't want to see any of it
wasted.

Windows works hard to find a use for all the memory you have all the
time. For example if your apps don't need some of it, it will use that
part for caching, then give it back when your apps later need it. In
this way Windows keeps all your memory working for you all the time.

and the CPU never exceeds 10%.

That's fine.

If I buy twice as much RAM to get 12GB, is there any way to configure
the system to use little or no page file?

No configuration is needed. If you are only using 45% of your RAM, you
are already using little or no page file. Do not confuse page file use
with page file allocation. Windows preallocates virtual memory in
anticipation of a possible need for it, even though that allocated
virtual memory may never be used.

And buying additional RAM is completely unnecessary. It's a waste of
money, since it will do nothing for you.
 
Y

Yousuf Khan

I have Win 7 and i7960 6-core CPU, and 6GB of RAM,& a X58 Gigabyte
motherboard.

The "gadget meter" on the desktop indicates that the RAM is
consistently used at 45%, and the CPU never exceeds 10%.

If I buy twice as much RAM to get 12GB, is there any way to configure
the system to use little or no page file?
No matter how much RAM you get, you won't be able to get rid of your
pagefile, or at least it's not advisable to get rid of it. The pagefile
is used by Windows and Windows programs to store the contents of their
RAM. Even though RAM contents are supposed to be volatile, some stuff in
RAM rarely gets used except initially when the program starts up. This
stuff then gets swapped out to the pagefile on a demand-basis.

Yousuf Khan
 
D

Dave-UK

Peter Jason said:
Since the RAM memory is volatile, and the page data stays on the HDD,
then it would be safer to use the RAM method should the computer HDD
be imaged or stolen.
If you're worried about the swapfile being copied then you can tell
Windows to clear it at every shutdown.
You can set it by using the Policy Editor, gpedit.msc, or do it manually.
Find this key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management

and set this value to one:
ClearPageFileAtShutdown

(This will probably increase your shutdown time.)
 
B

Brian Gregory [UK]

Ken Blake said:
If you are only using 45% of your RAM, you have considerably more RAM
than you need for what you use your computer for.
I don't think WIndows 7 counts RAM that's only being used as disk cache as
used even though you are getting benefit from it being installed on your
system.
 
P

Peter Jason

If you're worried about the swapfile being copied then you can tell
Windows to clear it at every shutdown.
You can set it by using the Policy Editor, gpedit.msc, or do it manually.
Find this key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management

and set this value to one:
ClearPageFileAtShutdown

(This will probably increase your shutdown time.)

Thanks; this what I *really* need. I'll try & report back.

Where can I go to check that the file has been cleared?

Peter
 
C

Char Jackson

Thanks; this what I *really* need. I'll try & report back.

Where can I go to check that the file has been cleared?
Multiple ways, but one that I might try would be to do a normal
shutdown, (the expectation is that the pagefile will be cleared), then
boot with a Linux live CD. Once in Linux, open the pagefile and see
what's in it.

Note that I don't know what is meant by "clearing the pagefile". Does
it mean the pagefile is overwritten with a constant value, overwritten
with random values, all of the contents are removed and the file size
is 0 bytes, or what?
 
D

Dave-UK

Char Jackson said:
Multiple ways, but one that I might try would be to do a normal
shutdown, (the expectation is that the pagefile will be cleared), then
boot with a Linux live CD. Once in Linux, open the pagefile and see
what's in it.

Note that I don't know what is meant by "clearing the pagefile". Does
it mean the pagefile is overwritten with a constant value, overwritten
with random values, all of the contents are removed and the file size
is 0 bytes, or what?
According to Larry Miller (Microsoft MCSA) it overwrites with zeros.
See the responses to this article:
http://www.detector-pro.com/2008/11/windows-tip-how-to-clear-page-file-on.html
I think it's a security requirement to physically overwrite the data but I
don't think it's up to the various government standards for shredding data,
like seven passes of writing 0s and 1s.
That would make the shutdown time too long for most users.
 
P

Peter Jason

According to Larry Miller (Microsoft MCSA) it overwrites with zeros.
See the responses to this article:
http://www.detector-pro.com/2008/11/windows-tip-how-to-clear-page-file-on.html
I think it's a security requirement to physically overwrite the data but I
don't think it's up to the various government standards for shredding data,
like seven passes of writing 0s and 1s.
That would make the shutdown time too long for most users.
I've set the security to do this every shutdown. Can safer wiping be
done with CCleaner or East-tec Eraser?
 
D

Dave-UK

Peter Jason said:
I've set the security to do this every shutdown. Can safer wiping be
done with CCleaner or East-tec Eraser?
I don't know about East-tec Eraser but it looks like CCleaner
does not (or cannot) clear the pagefile. It would have to do it
outside of Windows somehow.
I've just tried shutting down with the pagefile clear option and
it looks like the data has been overwritten with zeros.
The pagefile.sys is locked by Windows during use so you can't
access the contents while Windows is running.
I used a boot disk to view pagefile.sys.
 
B

BillW50

In
Paul said:
You can try this, and get a breakdown of memory usage on your
computer. Maybe this will give you a more meaningful result than the
"gadget".
"RAMMap v1.1"
http://technet.microsoft.com/en-us/sysinternals/ff700229

If that doesn't satisfy your curiosity, you can try this.

http://memory.dataram.com/products-and-services/software/ramdisk

Now, I tried that on my WinXP system. I allocated 2GB to a RAMDisk.
This is a benchmark of the resulting virtual disk.

http://img196.imageshack.us/img196/8694/hdtunedataram2gbabove.gif

Then, I placed my page file on it. Not a large page file, but
large enough. The end result, was a smoother running system,
under certain circumstances (i.e. when the normal system memory
was exhausted and the system needed to page). It helps to show,
at least on older versions of Windows, how their memory management
tends to choke under pressure. But the result wasn't enough of a
success, to continue to use it. I noticed a couple anomalies over
a period of four days, and stopped using it. If you get your 12GB
installed, you can have some fun with it.
Hi Paul! I have used a RamDisk with Windows 2000 and put the swapfile on
it. And that was okay. As W2k complains if there isn't any swapfile
setup.

Under some of my XP computers with SSD, my swapfile is turned off
completely. And these netbooks has 2GB of RAM installed. And I never
seen a problem until the free memory hits somewhere around 250MB. And if
it gets under say 200MB or so, XP will freeze up for seconds and almost
minutes. If you don't free up memory soon, XP will totally hang.
Although with 2GB on a netbook, I rarely use up more than 1GB of RAM
anyway. So it is okay.

I would think it would work basically the same way for Windows 7 too.
Heck when I am running Windows 7 with 1.5GB of RAM, I rather hit over
1GB of RAM in use either.
 
B

BillW50

In
Rich said:
I played with that exact same thing back in the Windows98 days. I
never quite grasped the contradiction. It's like removing clothing
from a walk-in closet, pushing a free-standing wardrobe closet inside
the walk-in closet, placing the clothes in there & somehow feeling
that it works better for picking out clothes.
However, it was fun playing with RAMDisk but I also uninstalled it as
unpractical.
Hi Rich! Oh back in the early days (in the 80's), RamDisks were
wonderful! As drive speeds were so slow and pokey. Even the Windows 98
StartUp disc uses a RamDisk. It is quite useful. True, the W98 StartUp
loads up DOS with a RamDisk. And earlier versions of DOS also was helped
with one as well.

Some people thinks today RamDisks have no use. And while it is true
Windows virtual memory is very much like an automatic RamDisk in many
ways. So adding another RamDisk really shouldn't help much if any at
all.

But that isn't true for all setups today. As some systems use SSD as
drives. And writing to SSD excessively shortens their life. So I often
move the temp files to a RamDrive. And if I am using a swapfile, I move
that too to the RamDrive. I also have cut down other Windows writing too
on the SSD.

And by doing so, I have figured out based on the little amount of
writing, my SSD will last about 8,000 years from what I recall. Yeah a
bit of overkill I agree. But if you make no changes at all, you can
waste a SSD in as short as 2 years.
 

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