I dont know if there is a particular amount to allocate as virtual memory but in reading this pdf guide called TweakGuides Tweaking Companion for Windows Vista, it suggests that for those with 2GB RAM, allocate essentially 1GB for your pagefile.
The guide suggests that for those with 1GB RAM, set virtual memory to 2GB...for those with 2GB RAM, set it to 1GB, and for those with 3GB-4GB RAM, set it to 512 MB.
I thought most people set it at 1.5x-2x their physical RAM, and I see that the default for me is 3055MB.
I think its just a little unusual to set the virtual memory value to be less than your actual physical RAM.
Maybe someone could elaborate on importance and optimization of virtual memory, for different amounts of RAM (512 MB/1GB/2GB)?
-
I wouldn't recommend setting it to anything less than the amount of physical RAM yo have. I do recommend to set both values to an equal amount so it doesn't have to expand itself. Setting the pagefile "too high" will not result in any loss in performance.
-
Windows sets the initial minimum size of the paging file at the amount of random access memory (RAM) plus 300 megabytes (MB) and the maximum size at 3xRAM installed on your computer. If you see warnings at these recommended levels, then increase the minimum and maximum sizes.
-
John Ratsey Moderately inquisitive Super Moderator
The total memory requirement (physical + virtual RAM) should be the same for a particular operating condition so the Tweak Guides makes sense to me. I also believe in a fixed size swap file to avoid it getting fragmented.
Some programs (photo editing & GIS come to mind) can use large amounts of RAM so the best way to estimate your virtual RAM requirements is to open up all the applications which you might have open at any one time, then open up lots of files within those applications and look in Task Manager to see how much memory you are using.
Unless you are desperate for HDD space, there's no disadvantage to being generous with virtual memory. The operating system will only use the space it needs. At the moment I'm on 3GB physical + 3GB virtual and don't expect to ever get an "out of memory" message.
John -
I have never received a message saying I am "out of memory" but I just wanted some insight on what happens if you set virtual memory too high (like maybe 4+ GB)
Right now I have not changed it from the default of 3055MB. -
Once I used a video editing program and it told me I was low on memory even though I had 4gb on a Vista Ultimate system. I raised the paging file permanently to 5gb (had enough space to do so) and never saw that warning again.
-
Usually having lots of RAM means that the OS needs to swap less. If you have more then 2GB of RAM, it's sort of a waste of disk space to create a huge swap file. I stopped using swap on XP since getting 1GB of RAM, now I have 2GB. Not using swap forces the OS to run totally from RAM. Never had any oom's errors. And yes I did see improvements in the speed of my system. I'm not sure I would totally get rid of the swap file in Vista though. Depending on what you do, I think it's safe to follow that guide and have it at 1GB which is half your RAM. Haven't used Vista a lot thought so you're gonna have to experiment for yourself. I find XP to be faster and more stable for now. Hopefully SP1 for Vista will change this.
-
Don't mess with the settings. Most tweak guides are crap. Just leave it set to automatic and leave things alone unless you are seeing a specific problem.
-
-
Has anybody tried using a separate partition for their swap file as suggested by this tip swapfilepartition The idea is that it should help to minimize the fragmentation on your main C: partition by relocating the swap file. Would fixing the default and maximum size of virtual memory achieve the same result ie 1 big file could be allocated and it wouldn't change size thus in theory it shouldn't become fragmentated?
I'm getting a new Vista notebook for Christmas so I'm trying to decide if a partition just for virtual memory is a good idea. I will have 2GB RAM so according to that tip I should set the partition size to 5.5GB with virtual memory set to 5GB - you need the extra 0.5GB to prevent low memory warnings. My disk is 250GB but that still seems a big chunk of it if it doesn't get used! -
From the article:
OK, enough of the rant... Often the idea of a separate swap partition comes from a misunderstanding of the fact that if you put it on a separate physical disk drive, you will see some slight performance improvement because if that's all the disk is doing, it isn't competing with everything else you are doing. Some people then extrapolate and say that, "well, I only have 1 hard drive, so another partition is almost like that same thing!". That's not true, because the performance only comes from it being a separate disk. Then that guy writes a guide like this, and after realizing his folly, has to come up with some other way to justify the silly advice he's been giving out.
As for fragmentation... The performance impact of disk fragmentation is WAY overblown. If you have a movie that you downloaded from p2p with 10,000 fragments, then yes, you will see problems when playing back that file, but in general all of your programs and data are small enough that fragmentation doesn't cause much more of a problem because the disk has to seek to find the whole file anyway. Rarely are 2 whole files right next to each other on the disk.
Now you want some recommendations. Keep in mind that most "guides" are merely regurgitations of the "common wisdom" that people have heard over and over, and most of the guide writers don't actually understand what they are saying, or they do but not on a deep enough level.
Finally, the answer you are looking for, which you will not find in any "tweak" guide: Leave the swap settings alone. Don't change them, don't touch them, don't worry about them. Just leave it alone and let Windows handle it.
PS. Also ignore all the "tweak" guides. They are almost all garbage and tell you to do things to your system without explaining or even knowing the implications. If there are some things that are bothering you, just change those, but otherwise leave everything else alone. -
The myth that you should set it to 1.5x-2x your RAM is just that, a myth. It makes absolutely no sense.
The entire point in a pagefile is that it should cover for you when you run out of RAM. In other words, the more you run out of RAM, the bigger your pagefile should be. Which means that the less RAM you have, the bigger your pagefile should be.
I think the guide you've found makes good sense.
Having 4GB combined RAM + pagefile is generally optimal.
The pagefile doesn't have to be bigger than your RAM, because data in RAM isn't mirrored in the pagefile.
Hope that helps.
When all that is said, I agree with orev's post above. Generally, you might as well just leave pagefile settings alone to be managed by Windows. -
Cheers Orev, thanks for your comments, I think I'll put this supposed tip down as a waste of time and effort.
Apologies for deviating from the main theme here but one tip I am keen on however, and maybe you or someone else has an opinion to offer, is that of creating a data partition, the main plus points I can see are that this would (a) Make it easier to do a clean re-install of Vista if required, and (b) Makes it easy to do a backup of all your user data - obviously users (myself mainly!) would have to make sure they used this data partition to make this possible rather than folders on the C: partition. I plan to use the MKLINK command to create a 'C:\Users' junction point that hardlinks to 'D:\Users' (ie my data partition) so that all the 'Documents', 'Contacts' etc folders under 'Users' and 'Public' are automatically located on the data partition but I'm not sure how these are processed by Vista and if it could impact performance.
Thanks -
As for the separate partition itself, my preference is not to use them. It's just as easy to remember to keep your data in your home directory as it is to keep it on a separate partition. Having a separate partition invariably leads to the problem where you put too much disk space in one partition, and now you need it on the other. Using 1 partition gets rid of this problem.
If you are clean installing that often, then you should have an external disk for backup anyway. Even if you're not, you should still have one. Even if you have a separate data partition, do you trust the install process enough not to mess with it? -
Thanks again Orev for your comments, I can undertsnad your points although it's still something I'd like to try out - this link indicates that you can achieve this by using MKLINK to another partition, think I'll give it a go when I first set up my notebook.
-
-
Just let Windows decide. I had a pagefile set at 6gb and had memory dumps problems. After I re-setted to Windows' defaults, no more dumps.
-
I do exactly that, and it works great.
What I do is this:
My Windows partition (Dcontains:
- The Windows folder
- A junction point named "Program Files", pointing to "F:\Win32\Program Files"
- A junction point named "Documents and Settings" pointing to "F:\Win32\Documents and Settings"
(And a similar junction point for my games folder)
This means that I can format D: at a moment's notice, without losing *any* data.
It also means that I can install software to the default location (Program Files), and it'll get redirected automatically to my data partition.
There are two disadvantages though:
1: Installers can't usually keep track of junction points. So when I install software, it checks for free disk space on D:, where it's F:'s space that actually matters. To work around this, I've had to make D: so big that there are always ~10GB free. (I think it's currently 25GB)
2: It's a bit awkward to set up. Obviously, Windows doesn't like it if you delete Docs & Settings or Program Files. With a bit of creativity you can work around that, though. (I have two Windows installations, so I simply booted into my secondary Windows install, moved the folders from within that, and created the necessary junction points, and then booted back into the main Windows)
You can probably get around it with safe mode as well, if you're careful and shut down a lot of processes, or you can boot from a liveCD such as BartPE.
Use your imagination.
This is on XP though. I know Vista by default uses junction points for its system folders (Users and what they other ones are called), so it'll probably be easier to set up there. In which case you can disregard disadvantage #2. -
Sounds like a pretty interesting setup. I think it makes my point about unnecessary added complexity though
-
ScuderiaConchiglia NBR Vaio Team Curmudgeon
Gary -
I'm not saying everyone should do this, but it works great for me, and the complexity is only when you set it up initially (and as I said, that part should be easier under Vista)
And it has saved me a lot of trouble, and even preserved my data in face of a harddisk crash. (Windows disk died, and if I hadn't made this setup, a ton of my data would have been on the Windows partition)
So yeah, I'm happy with this setup, but I agree it's not worth it for everyone. -
ScuderiaConchiglia NBR Vaio Team Curmudgeon
I have never bothered with moving the Program Files directory though. I felt that it was always so inexorably tied to the registry that, again at least for me, it seemed that if I was going to have to restore the C: partition my Program files directory would be out of sync with my registry and I would have to reinstall some application anyway.
Gary
Virtual Memory Optimization
Discussion in 'Windows OS and Software' started by vaio2k7, Oct 7, 2007.