Pagefile size on system w/256gb ssd and 32GB RAM?

Started Feb 19, 2013 | Discussions
Sean Nelson
Sean Nelson Forum Pro • Posts: 13,240
Re: Pagefile size on system w/256gb ssd and 32GB RAM?

tocar wrote:

With such a great configuration why would you want to limit the pagefile? You won't see significant speed by adjusting the pagefile.

One of the problems of having a pagefile, at least with Windows XP, was that the system tended to boot active programs out of memory in order to cache file reads and writes.   That meant that if you did a huge file copy you'd end up with big waits when switching back to active programs again.  If you have a huge enough file to copy, it doesn't matter how big your page file is, programs will be forced out of memory.   And for a one-time file copy the caching is utterly useless because the file is never accessed again.

I don't know if this is still an issue in Windows 7, but I avoided the issue by getting enough memory to put everything into RAM and eliminate the page file altogether.   I've never looked back since then.

rio911
rio911 Contributing Member • Posts: 973
Re: Pagefile size on system w/256gb ssd and 32GB RAM?

Sean Nelson wrote:

tocar wrote:

With such a great configuration why would you want to limit the pagefile? You won't see significant speed by adjusting the pagefile.

One of the problems of having a pagefile, at least with Windows XP, was that the system tended to boot active programs out of memory in order to cache file reads and writes. That meant that if you did a huge file copy you'd end up with big waits when switching back to active programs again. If you have a huge enough file to copy, it doesn't matter how big your page file is, programs will be forced out of memory. And for a one-time file copy the caching is utterly useless because the file is never accessed again.

I don't know if this is still an issue in Windows 7, but I avoided the issue by getting enough memory to put everything into RAM and eliminate the page file altogether. I've never looked back since then.

I'm sorry Sean, but that was true when RAM was slow and HDD's were the only option.  SSD's are very different and when combined with lots of fast RAM, pagefile is not a problem.  While disabling the pagefile is actually counter productive.

I have recently started looking into something else, but I haven't tried it yet.  I would suggest to the OP if he is really concerned with the pagefile location: how about give ramdisk a try?  This is where you set aside part of your RAM for actual OS pagefile and disable the drive's pagefile.  So let's say from your current 32GB of RAM, I don't think you will miss 6.  Download a freeware program like dataram ramdisk and see if it works out for you?

rio

 rio911's gear list:rio911's gear list
Sony RX100 Sony SLT-A77 Sony 50mm F1.4 Sony 70-300mm F4.5-5.6 G SSM Sony DT 16-50mm F2.8 SSM
rio911
rio911 Contributing Member • Posts: 973
Re: Pagefile size on system w/256gb ssd and 32GB RAM?

It's me again with a couple of space saving/cleaning suggestions:

- First "C:\Windows\Software Distribution\Download" Directory. This dir contains the files that are downloaded when you update the Microsoft files. Once they are updated, you don't need the files any longer and you can just delete them. Here is a guide how to do it: link.

- Second Win7 SP1 and other updates backup files.   They are located in "c:\windows\winsxs"  and can't be deleted directly.  My folder at the moment is over 11GB.  Open a command prompt (you might need Admin rights) and type dism /online /cleanup-image /spsuperseded.  Just be aware that, removing the backup files, makes all updates permanent!

Note: I ran the command on my system and it actually removed just 4.5GB.  The other 7GB are still there.

Hope this helps,

rio

 rio911's gear list:rio911's gear list
Sony RX100 Sony SLT-A77 Sony 50mm F1.4 Sony 70-300mm F4.5-5.6 G SSM Sony DT 16-50mm F2.8 SSM
(unknown member) Forum Pro • Posts: 14,338
Re: Pagefile size on system w/256gb ssd and 32GB RAM?

rio911 wrote:

I have recently started looking into something else, but I haven't tried it yet. I would suggest to the OP if he is really concerned with the pagefile location: how about give ramdisk a try? This is where you set aside part of your RAM for actual OS pagefile and disable the drive's pagefile. So let's say from your current 32GB of RAM, I don't think you will miss 6. Download a freeware program like dataram ramdisk and see if it works out for you?

I prefer to keep simple things simple, versus making them complicated.

Chances are the OP rarely needs any swap with 32GB of RAM. However, removing all swap can make Windows upset. So just create a small fixed size swapfile on the SSD -- it works fine.

If the OP knows that he'll need a large swapfile from time time, create one on the spinner. Or better still, do as Jim suggests and create a small swap on the SSD and a large one on a HDD.

I do agree it's a good idea to disable hibernation on a desktop machine. It's not useful, IMO. With a laptop it's much more of a personal preference I think. I do leave hibernation enabled on mine.

Sean Nelson
Sean Nelson Forum Pro • Posts: 13,240
Re: Pagefile size on system w/256gb ssd and 32GB RAM?

rio911 wrote:

I'm sorry Sean, but that was true when RAM was slow and HDD's were the only option. SSD's are very different and when combined with lots of fast RAM, pagefile is not a problem.

Hard drives have access times measured in a few milliseconds.   SSDs have access times measured in a few dozen microseconds.   RAM has access time measured in nanoseconds.   So while SSDs are about 100 times faster than a hard drive, they're still about 10,000 times slower than RAM.  Given the option to programs and data currently being used by the CPU on RAM, SSD or hard drive, RAM is by far the best choice.

...disabling the pagefile is actually counter productive.

How so?   What's counterproductive about keeping everything in RAM?   I've been doing exactly that for 4 years now and it certainly hasn't been counterproductive for me.

rio911
rio911 Contributing Member • Posts: 973
Re: Pagefile size on system w/256gb ssd and 32GB RAM?

Sean Nelson wrote:

rio911 wrote:

I'm sorry Sean, but that was true when RAM was slow and HDD's were the only option. SSD's are very different and when combined with lots of fast RAM, pagefile is not a problem.

Hard drives have access times measured in a few milliseconds. SSDs have access times measured in a few dozen microseconds. RAM has access time measured in nanoseconds. So while SSDs are about 100 times faster than a hard drive, they're still about 10,000 times slower than RAM. Given the option to programs and data currently being used by the CPU on RAM, SSD or hard drive, RAM is by far the best choice.

...disabling the pagefile is actually counter productive.

How so? What's counterproductive about keeping everything in RAM? I've been doing exactly that for 4 years now and it certainly hasn't been counterproductive for me.

Hi Sean,

I'm glad it works out for you!

Disabling paging file is counterproductive because it brings all the problems and none of the benefits!  Just to make things clearer: disabling the paging file does not affect the performance of your PC, if you have large enough RAM = therefore no benefit.  But if you reach your RAM limit with disabled paging file, your pc will crash and it will crash hard = huge problems.

rio

 rio911's gear list:rio911's gear list
Sony RX100 Sony SLT-A77 Sony 50mm F1.4 Sony 70-300mm F4.5-5.6 G SSM Sony DT 16-50mm F2.8 SSM
Jen Yates Senior Member • Posts: 1,414
Re: Pagefile size on system w/256gb ssd and 32GB RAM?

joey_B wrote:

You could go with a 4 - 8 GiB pagefile, but whatever you choose, first make sure that the swapfile will become a continguous file on your disk.

So first set the PC to use NO pagefile, and reboot. do a full disk defragmentation (probably with Defraggler), defragment the freespace

NO NO NO!

Never defrag an SSD. And there is zero reason to have a contiguous file when using an SSD.

Following the above advice will serve no benefit and will only shorten the life of the SSD. Seriously. Look it up.

Sean Nelson
Sean Nelson Forum Pro • Posts: 13,240
Re: Pagefile size on system w/256gb ssd and 32GB RAM?

rio911 wrote:

Disabling paging file is counterproductive because it brings all the problems and none of the benefits! Just to make things clearer: disabling the paging file does not affect the performance of your PC, if you have large enough RAM = therefore no benefit.

As I mentioned, this is not true with Windows XP. When you copy large enough files it will give RAM over to the file cache and can force open programs out to the page file.

But if you reach your RAM limit with disabled paging file, your pc will crash and it will crash hard = huge problems.

But here's the thing - if you use a page file the universal advice is to set it to a fixed size to avoid fragmentation. (Fragmentation is less of an issue with SSDs because access times are faster, but it can still result in the need for multiple writes and therefore slow down performance.)

So let's say I decide on a fixed page file size of 8GB for my system with 12GB of RAM. That gives me a total of 20GB of virtual memory. If I attempt to exceed that, my PC will crash (actually, in Windows 7 it doesn't crash, it simply stops and presents a dialogue box offering to terminate the program using the most memory7).

Now let's say I upgrade my system from 12GB to 24GB. I still run the same programs as I did before. Why do I need a page file? I have more virtual memory available to me than I did before, so even without a pagefile I'm at less risk of running out than I was originally.

So the thing is that at some point, pagefile or not, you have to draw a line in the sand and say "this is the maximum amount of virtual memory I will provide". It really doesn't matter whether you supply that with RAM + page file or with RAM alone - either approach is just as safe.

And in fact this is exactly why my recommendation to the OP was to measure his own usage rather than relying on someone else's suggestion.   You can't know whether you have enough virtual memory or not until you go and see what the space requirements are for the programs that you run.

mfait Contributing Member • Posts: 679
Re: Pagefile size on system w/256gb ssd and 32GB RAM?

rio911 wrote:

I have recently started looking into something else, but I haven't tried it yet. I would suggest to the OP if he is really concerned with the pagefile location: how about give ramdisk a try? This is where you set aside part of your RAM for actual OS pagefile and disable the drive's pagefile. So let's say from your current 32GB of RAM, I don't think you will miss 6. Download a freeware program like dataram ramdisk and see if it works out for you?

rio

This is redundant.  The pagefile is used when you run out or RAM.   Putting it in RAM using a RAMDISK isn't really doing anything.

 mfait's gear list:mfait's gear list
Canon PowerShot S100 Canon EOS 450D
mfait Contributing Member • Posts: 679
Re: Pagefile size on system - Don't need much

You don't need much with 32 Gigs of RAM.

The rule of thumb "pagefile = RAM" is stupid, since the more RAM you have the less likely you will need to touch the pagefile.

I would go with 1-2 Gigs in case some software needs to see it.

Here is a good description of pagefiles.

http://lifehacker.com/5426041/understanding-the-windows-pagefile-and-why-you-shouldnt-disable-it

 mfait's gear list:mfait's gear list
Canon PowerShot S100 Canon EOS 450D
Sean Nelson
Sean Nelson Forum Pro • Posts: 13,240
Re: Pagefile size on system w/256gb ssd and 32GB RAM?

mfait wrote:

rio911 wrote:

I would suggest to the OP if he is really concerned with the pagefile location: how about give ramdisk a try?

This is redundant. The pagefile is used when you run out or RAM. Putting it in RAM using a RAMDISK isn't really doing anything.

+1

The only reason I can see for doing this would be if you have some old program (such as Photoshop 6) that won't run without a pagefile. Even then, I think it would be simpler to just create a dinky little 100MB pagefile on a hard drive or SSD rather than bothering with RAMdisk software.

Of course that's assuming you don't need any more virtual memory than you have actual RAM.   If you do need more virtual memory, then you need a page file on an SSD or hard drive, and that will solve the problem for any of those old pagefile-dependent programs.   You can't increase your virtual memory size beyond the amount of RAM you have by putting the pagefile in RAM - it's got to go somewhere else.

mfait Contributing Member • Posts: 679
Re: Pagefile size on system w/256gb ssd and 32GB RAM?

Sean Nelson wrote:

mfait wrote:

rio911 wrote:

I would suggest to the OP if he is really concerned with the pagefile location: how about give ramdisk a try?

This is redundant. The pagefile is used when you run out or RAM. Putting it in RAM using a RAMDISK isn't really doing anything.

+1

The only reason I can see for doing this would be if you have some old program (such as Photoshop 6) that won't run without a pagefile. Even then, I think it would be simpler to just create a dinky little 100MB pagefile on a hard drive or SSD rather than bothering with RAMdisk software.

Of course that's assuming you don't need any more virtual memory than you have actual RAM. If you do need more virtual memory, then you need a page file on an SSD or hard drive, and that will solve the problem for any of those old pagefile-dependent programs. You can't increase your virtual memory size beyond the amount of RAM you have by putting the pagefile in RAM - it's got to go somewhere else.

Well said!

 mfait's gear list:mfait's gear list
Canon PowerShot S100 Canon EOS 450D
Andreja Contributing Member • Posts: 740
Re: Pagefile size on system w/256gb ssd and 32GB RAM?

Sean Nelson wrote:

As I mentioned, this is not true with Windows XP. When you copy large enough files it will give RAM over to the file cache and can force open programs out to the page file.

That's somewhat of an oversimplification. The "system cache" which the I/O manager uses in 256KB slots is actually in virtual memory, not in RAM. Its size depends on many factors, but on a 32-bit system that's not booted with /3gb (no kernel compression) the system cache will be around 960MB.

What portion of that is resident in RAM depends on memory pressure and the "hints" being passed to the OS in (say) a CreateFile() call. If the app/process indicates that sequential access is likely, the cache manager will attempt to read ahead. Other indicated access patterns may not lead to the same cache utilization.

The biggest obstacle there is not the file I/O, but the limited 2GB virtual memory that the cache has to share with many other components, irrespective of whether the system has 256MB of RAM or 4GB. It's even worse on 32-bit servers which are booted with /3gb. They're rare nowadays of course, as they should be, but a server booted with both /3gb and /PAE could squeeze the cache down to less than 500MB, even if the box had lots of RAM by the standards of the day (16GB, 32GB, or even 64GB).

Keyboard shortcuts:
FForum MMy threads