Spod

No pagefile or RAMdisk pagefile?

Recommended Posts

I'm just curious about which is the better configuration, since opinion seems to be divided. Is it better to disable the pagefile entirely, or to devote half a gig or so to a RAM disk on which you put the pagefile?

For the sake of argument, assume XP, 1 or 2 gigs of RAM*, 1 Raptor for OS, apps & swap, used for gaming & general office stuff.

*(Please consider both cases, if you think it matters)

A few other questions, if anyone feels like addressing them:

Can the RAMdisk method be done without buying additional software?

Should one also put a pagefile on C: in case the RAMdisk pagefile isn't big enough?

Presumably the RAMdisk will be used (up) first?

Is it worth buying more RAM just so you've got enough to put the pagefile on a RAMdisk? Cost would be comparable to going 15K SCSI instead of 10K SATA.

Thanks! :)

Share this post


Link to post
Share on other sites

I don't see the point of running a swap file on a ramdisk, it adds many layers into the process. Not to mention taking away ram that can be used directly. If you have sufficient ram, just allocate a small swap file on your hard drive. It won't be used much, but may be necesarry for some applications.

With a 15k drive, the few accesses to the file will be fast enough, and windows has gotten smarter about swapping every iteration.

Share this post


Link to post
Share on other sites

I think it's rather useless to have a pagefile on a RAM disk. Because when the RAM memory is full the pagefile will be used. But when the pagefile is in on a RAM disk you will have unnecessary memory swap operations.

If you have 1GB or more memory when running WinXP it's rather safe to just turn off the pagefile. I have been running this config for over more than a year now. It happened to me twice that Windows mentioned to me that the pagefile was to low and it automatically increased the pagefile.

This was when running without a pagefile, so when you run out of memory Windows automatically creates one on his own.

So my opinion, just turn off the pagefile completely. Whenever needed, WinXP will create one of his own and will notify you.

Share this post


Link to post
Share on other sites

The reason I asked was to evaluate the argument for RAMdisk pagefiles - Windows uses the pagefile when it still has hundreds of megs of physical RAM available.

If it's going to do that anyway, might as well hold the pagefile in RAM (as long as that leaves you a respectable amount of RAM, e.g. 700MB) so that whatever Windows does (unnecessarily) swap, is still accessed quickly.

People have been saying that this vastly improves the responsiveness of their system vs. a HDD based pagefile, especially for windows that haven't been accessed for a while.

My question is, is this better than having no pagefile, or is (the advantage of having a pagefile available for whatever needs it) outweighed by (using up some RAM when you could just turn the pagefile off and hope nothing crashes/complains/creates a slow HDD based pagefile)?

Share this post


Link to post
Share on other sites
Windows uses the pagefile when it still has hundreds of megs of physical RAM available.

Yep I've noticed that, interestingly though I've never once noticed Windows thrahsing my HDD, not while I still have plenty of RAM. So that begs the question of "is this swap file usage actually casusing any harm". I've heard that much of it can be nothing but un-initialized (but none the less allocated) address space.

Share this post


Link to post
Share on other sites

If you have a RAMDisk in RAM, isn't that basically a Hard Drive pretending to be RAM that is sitting on RAM pretending to be a hard drive? Seems like it just complicates things to me.

Share this post


Link to post
Share on other sites

AFAIK There are tweaks that can be applied to get windows to use RAM more agressively, so

it does not swap out code as frequently. The reason window will still swap even with

a lot of RAM free, is to remove code that is not being frequently accessed in anticipation

of demand from the user or other apps for available RAM. It's supposed to make the

system seem more responsive to the user that way.

Putting the pagefile in RAM (IMO) defeats the whole purpose of having virtual memory.

What people doing that overlook is the additional overhead on the OS and CPU caused

by having to allocate RAM for a single use, and not being able to reclaim that resource

as the systems needs change.

Can the RAMdisk method be done without buying additional software?

There is an (experimental) driver from MS that will let you create a 32MB ramdisk.

There are apparently freeware RAM-drive apps you can use to create a larger than

32MB disk, but they seem to recommend only using that for nonessential files like

your browser cache and some temp file usage.

Overall, I'd say it is better to tweak Windows to perform like you want, and then

reduce your need for a swap file, so the OS and apps will make better use of your

RAM as available memory, rather than as a performance kludge.

Share this post


Link to post
Share on other sites
I'm just curious about which is the better configuration, since opinion seems to be divided. Is it better to disable the pagefile entirely, or to devote half a gig or so to a RAM disk on which you put the pagefile?

Well, opinions are divided over that.... :-)

-- Rick

Share this post


Link to post
Share on other sites

i think the smart money's on disabling it. quoth cas:

For a number of unrelated reasons, my primary machine is w2ksp3. All of my XP machines however, are configured without a pagefile.

there is no individual i trust more on the issue than him :)

for some grittier details, check out this thread.

Share this post


Link to post
Share on other sites

SPOD,

Pagefiles are absolutely not necessary if you have enough system memory. I have 512 Megabytes on my WXP Pro mach. and run many memory intensive applications without a pagefile. I have not had any problems and my puter runs noticeably faster. Here is a simple method for determining your pagefile usesage without doing a lot of system monitoring. Open all of the applications that you would normally use during a "session" then open Windows Task Manager. Select the Performance Tab and look for the section in the lower left hand corner labled Commit Charge. You will see three sets of numbers, let me explain what they mean.

Total = The total amount of physical memory (RAM) + pagefile currently in use.

This number goes up or down when you open and close applications

Limit = The total amount of physical memory (RAM) + pagefile (Note: With no

pagefile this number represents only physical memory i.e. RAM)

Peak = The maximum amount of memory used during this session

Remove your pagefile, restart your puter (This is completely harmless) Open and run your most memory intensive applications. Then just look at the "Peak" number and compare it to the "Limit" I think your in for a pleasant surprise. If you run into problems with the operating system reporting out of memory then just recreate the pagefile.

Share this post


Link to post
Share on other sites
AFAIK There are tweaks that can be applied to get windows to use RAM more agressively, so

it does not swap out code as frequently.  The reason window will still swap even with

a lot of RAM free, is to remove code that is not being frequently accessed in anticipation

of demand from the user or other apps for available RAM.  It's supposed to make the

system seem more responsive to the user that way.

I don't think that's what actually happens, because although Windows could write pages to disk because they might be needed for other things, it can wait with actually removing the page from memory until they're really needed.

BTW, I run without pagefile (because Need for Speed 5 crashes with pagefile) on two systems, one with 1/2 gbyte RAM and one with 1 gbyte RAM.

Share this post


Link to post
Share on other sites

When having 1 gb or more Ram, best is (just my opinion) to create a small pagefile on disk like 500 MB with the option (max size) of 1 GB. If your computer ups the pagefile and again, then you will know what size your pagefile must be.

On the other hand you could start lower like with 200MB and see what gives.

Anyway when your computer runs low on pagefile size it simply tells you.

François

Share this post


Link to post
Share on other sites

Having the swap file on a ram disk is a waste ov memory, memory bandwidth, and CPU cycles (you thought it was free?). Simply diable the swap file and all is well. Make certain that you have enough RAM.

Thank you for your tim,

Frank Russo

Share this post


Link to post
Share on other sites

500 MB is small ??

My page file is 16-64 MB 'cause for some reason a certein P2P program wants a page file. Don't notice any difference in performance so I don't care.

Share this post


Link to post
Share on other sites

Apologies for any repetition - I've seen plenty of threads about disabling pagefiles, but wanted to see why people here didn't generally reccommend RAMdisk pagefiles. Memory bandwidth use and CPU use are good enough reasons for me. Thanks for responding!

Share this post


Link to post
Share on other sites
500 MB is small ??

My page file is 16-64 MB 'cause for some reason a certein P2P program wants a page file.  Don't notice any difference in performance so I don't care.

Yes King, 500 MB, no big deal. Right now i am experimenting havng a pagefile and not.

Not that i do need one, having 1280 MB memory.

François

Share this post


Link to post
Share on other sites

A computer running a large ish pagefile in a ramdisk is as fast as hell.

As long as you have a large amount of ram, and a fast processor.

As windows always pages out to a pagefile even when you have loads of memory,

even if you turn the pagefile off, it still makes and uses one.

I used to use superspeed ramdisk on windows 2000 and it was really fast.

Its about the only ramdisk that lets you put your pagefile onto it

But when i upgraded to windows xp it wouldnt work with it.

But they have not long ago brought out a new version and this works with xp.

superspeed ramdisk plus v8 and its very fast.

When running, windows says you have a very large pagefile,

but when using windows and re opening things,

it is totally instant, with no disk movement at all.

Gary

Share this post


Link to post
Share on other sites

Guys, I too have been wondering about the use of a ramdisk (I've downloaded Superspeed Ramdisk Plus), especially in light of Windows X64's ability to handle vast amounts of memory. Let me explain.

Most applications that I run (e.g. SAS, SPSS, MS Word, Excel) are not 64-bit compliant yet. A couple are (e.g. Stata). However, the machine I am ordering (Dell Precision 690, 8GB memory, two dual-core CPUs) will have X64 as the OS. I do not know how prone X64 is to use page files when there is plenty of RAM. However, until the various programs are 64-bit compliant, I expect that there will be plenty of "extra" memory most of the time that cannot even be accessed by the 32-bit programs.

It seems to me that it might be sensible under these circumstances to use a ramdisk for paging, unless we are all convinced that X64 will not use a page file unless it runs out of RAM. If X64 is now sensible on this score, I guess there's no reason to use a ramdisk for a page file, as X64 will have no trouble accessing all available system memory.

However, what exactly determines the conditions under which a page file is used? Will a 32-bit program running on a 64-bit OS "feel" it is running out of physical memory at the 4GB mark and "demand" some page file space? In other words, is the page file use determined by the OS or the application?

BTW, nothing beats actually running some tests. For people who run stat programs, I have experimented running SAS with its data files residing on a 1GB ramdisk (I have a Dell D810 laptop with 2GB). I ran a frequency procedure (proc freq), which does not generate a new data set. I found that there were no performance gains from the ramdisk unless both the "work" directory (SAS uses this for scratch space) and the actual data set are on the ramdisk. However, when both are, the time for execution is radically reduced (from something like 10 seconds to a fraction of a second). This was done on a data set of about 800MB in size. Of course, my new system will take so little time with such a "small" data set that it might not be reasonable to bother with the ramdisk, unless I get to the multi-gigabyte size.

Anyway, suggestions & hypotheses regarding the cache issue would be very welcome!

Edited by srk

Share this post


Link to post
Share on other sites
Guys, I too have been wondering about the use of a ramdisk (I've downloaded Superspeed Ramdisk Plus), especially in light of Windows X64's ability to handle vast amounts of memory. Let me explain.

Most applications that I run (e.g. SAS, SPSS, MS Word, Excel) are not 64-bit compliant yet. A couple are (e.g. Stata). However, the machine I am ordering (Dell Precision 690, 8GB memory, two dual-core CPUs) will have X64 as the OS. I do not know how prone X64 is to use page files when there is plenty of RAM. However, until the various programs are 64-bit compliant, I expect that there will be plenty of "extra" memory most of the time that cannot even be accessed by the 32-bit programs.

It seems to me that it might be sensible under these circumstances to use a ramdisk for paging, unless we are all convinced that X64 will not use a page file unless it runs out of RAM. If X64 is now sensible on this score, I guess there's no reason to use a ramdisk for a page file, as X64 will have no trouble accessing all available system memory.

However, what exactly determines the conditions under which a page file is used? Will a 32-bit program running on a 64-bit OS "feel" it is running out of physical memory at the 4GB mark and "demand" some page file space? In other words, is the page file use determined by the OS or the application?

BTW, nothing beats actually running some tests. For people who run stat programs, I have experimented running SAS with its data files residing on a 1GB ramdisk (I have a Dell D810 laptop with 2GB). I ran a frequency procedure (proc freq), which does not generate a new data set. I found that there were no performance gains from the ramdisk unless both the "work" directory (SAS uses this for scratch space) and the actual data set are on the ramdisk. However, when both are, the time for execution is radically reduced (from something like 10 seconds to a fraction of a second). This was done on a data set of about 800MB in size. Of course, my new system will take so little time with such a "small" data set that it might not be reasonable to bother with the ramdisk, unless I get to the multi-gigabyte size.

Anyway, suggestions & hypotheses regarding the cache issue would be very welcome!

It is my understanding that 32-bit programs running under x64 will each be given their own private 4 GB code and data space, and that this will not require any recompilation of the 32-bit program (provided it is currently using the Win32 API correctly to request memory) to do so. This will be mapped to either real physical RAM or virtual RAM by the OS as the memory requests are received from the application. Since applications do not manage the memory, all memory should be available to applications without any recompilation required (again, with the caveat that 32-bit apps will only be able to properly deal with a 4 GB code and data space).

If a specific 32-bit application needs to use more than 4 GB of RAM, it should already have built-in methods of handling that scenario.

If, on the other hand, you are concerned that all your 32-bit apps will share a single 4 GB address space, I can reassure you that your concern is unfounded. So, if you are running x64 and have 32 GB of free RAM and 4 32-bit apps running, then each 32-bit app could receive up to 4 GB of its own private space.

In either case, I still think that having enough physical RAM for your application needs and not using a pagefile under Windows is the faster scenario. However, feel free to test this and see if your specific configuration has enough physical RAM to avoid generating errors.

Share this post


Link to post
Share on other sites

Guys, I too have been wondering about the use of a ramdisk (I've downloaded Superspeed Ramdisk Plus), especially in light of Windows X64's ability to handle vast amounts of memory. Let me explain.

Most applications that I run (e.g. SAS, SPSS, MS Word, Excel) are not 64-bit compliant yet. A couple are (e.g. Stata). However, the machine I am ordering (Dell Precision 690, 8GB memory, two dual-core CPUs) will have X64 as the OS. I do not know how prone X64 is to use page files when there is plenty of RAM. However, until the various programs are 64-bit compliant, I expect that there will be plenty of "extra" memory most of the time that cannot even be accessed by the 32-bit programs.

. . . . .

Anyway, suggestions & hypotheses regarding the cache issue would be very welcome!

It is my understanding that 32-bit programs running under x64 will each be given their own private 4 GB code and data space, and that this will not require any recompilation of the 32-bit program (provided it is currently using the Win32 API correctly to request memory) to do so. This will be mapped to either real physical RAM or virtual RAM by the OS as the memory requests are received from the application. Since applications do not manage the memory, all memory should be available to applications without any recompilation required (again, with the caveat that 32-bit apps will only be able to properly deal with a 4 GB code and data space).

If a specific 32-bit application needs to use more than 4 GB of RAM, it should already have built-in methods of handling that scenario.

If, on the other hand, you are concerned that all your 32-bit apps will share a single 4 GB address space, I can reassure you that your concern is unfounded. So, if you are running x64 and have 32 GB of free RAM and 4 32-bit apps running, then each 32-bit app could receive up to 4 GB of its own private space.

In either case, I still think that having enough physical RAM for your application needs and not using a pagefile under Windows is the faster scenario. However, feel free to test this and see if your specific configuration has enough physical RAM to avoid generating errors.

This is fascinating, Trinary. What you say makes a lot of sense. I think I might have misunderstood the fellow who was discussing this with me recently (he was not a Microsoft guru, but he seemed pretty knowledgeable) regarding all 32 bit apps using the SAME 4 GB space. Or maybe I understood him and he was just wrong.

I will probably test the no-page-file hypothesis with a big data set just to see what happens. I can even try a page-to-ramdisk approach. The issue for 32-bit apps needing to use more than 4 GB is not that they (e.g. SAS) can't handle it, but only what the speed hit will be. SAS is very smart about it; SPSS much less so. But smart or not, if I have a 6 GB data file, I'd say that a ramdisk would be something to consider if all I will be doing is running analyses on a data set and not creating new ones.

Share this post


Link to post
Share on other sites

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