Virtual Memory Optimization Guide!

Discussion in 'Reviews & Articles' started by Dashken, Oct 29, 2004.

  1. Adrian Wong

    Adrian Wong Da Boss Staff Member

    Hello Noam,

    Nothing much to be said about your setup. Looks like you are following our guidelines. :thumb:
     
  2. Well actually I was wondering what about the FAT32/NTFS combination (drive A NTFS drive B FAT32) and the 700MB split (drive A 200 drive B 500)

    By the way both partitions are formatted at 4K cluster size.,

    I wonder if there is another way to split them for optimizing a little bit more maybe I should just look on the page file usage on each drive and decide myself what need more/less.,

    Thank you,
    -Noam
     
  3. Adrian Wong

    Adrian Wong Da Boss Staff Member

    Err.. If you take a look at the post PRIOR to your first post, you will see the answer to that - http://forums.rojakpot.com/showthread.php?p=150974#post150974 ;)

    IMHO, there is a practical limit to how much we can optimize the paging file without getting bogged down into the fine details and wasting more time than we would save with a perfectly optimized paging file. ;)

    In other words, I personally think your setup is pretty good. You should concentrate on optimizing it in other areas (check the guide), rather than worry about fine-tuning the allocation of space. It won't matter much as long as the second hard disk has a paging file that is large enough for most occasions.
     
  4. Dashken

    Dashken Administrator!

    The article has just been updated! :wave:

    Even today, virtual memory is still very important component of the operating system. No matter how much memory you have, there is always a need for virtual memory. Therefore, its performance is of great importance. Optimizing the virtual memory system will greatly improve the performance of the computer.

    Today, we will take an in-depth look at cluster size and its effect on the performance of the paging file. We will also take a look at how it affects paging files on RAID arrays! Come and check out the definitive Virtual Memory Optimization Guide!

    Here are the updates:-
    • Added a new section on cluster sizes and their effect on the performance of the paging file.

    [​IMG]

    Link : Virtual Memory Optimization Guide Rev. 4.1!
     
  5. pmg4125

    pmg4125 Newbie

    Hmmm.... i think i needd to work back on the graphics for the guides and stuff again :p

    nvm. interesting article... but i am trying on having some VM by using RAID setup. was wondering if it will get mirrored :p
     
  6. Adrian Wong

    Adrian Wong Da Boss Staff Member

    Yes, it will. That's why it's not advisable for you to put the paging file in a RAID array, unless you are striping.
     
  7. GeoDude

    GeoDude Newbie

    Contiguous VM on Win2K?

    I've just read most of the sections that pertain to Win2K. Great series! Except, that VM has been around since long before Windows was even imagined... early sections of the article sounds like VM was invented for Windows... LOL!

    Question -- After I have changed the static and dynamic sizes of my VM on Win2K, if I defrag my partition will that make it contiguous?
     
  8. Adrian Wong

    Adrian Wong Da Boss Staff Member

    ROTFL! :haha:

    Well, to be honest, I only have experience with Windows and DOS so I can only talk about VM in Windows. ;)

    As for your question, the static paging file or static portion of a semi-permanent paging file will be defragmented IF you set your defragmentation utility to optimize the paging file. Most 3rd-party utilities support this but not Windows XP's built-in defragger.
     
  9. Mike89

    Mike89 Newbie

    I read your article on Virtual Memory.

    Either you got something wrong or I'm misunderstanding something big time. You talk about the size the Virtual Memory should be(I'm running Windows XP).

    I have a gig of ram. When I play Vampire - Bloodlines, the Commit Charge Peak is over 1.32 gigs (I'm rounding off)! This is the highest number I have ever seen in a game. The only other game I have seen go over 1 gig was HL2. Farcry was around 850 - 920 megs.

    Now it was my impression that this number represented the total amount of ram that game used (including both physical ram and Virtual Memory). I would interpret that number meaning that it used all of my gig of ram plus another 320 megs of Virtual Memory.

    From what I interpreted from what you said about that Task Manager reading was that number represented the amount of Virtual Memory that was used. That seems all wrong to me. I take what you said to mean is that 1.32 gig reading I got was that the game used all of my 1 gig of memory PLUS another 1.32 gig of Virtual Memory.

    So your explanation is really throwing me off. According to what you said, with a 1.32 gig reading, I would need to make my swap file over 1.32 gigs (even with 1 gig of physical memory). I thought that all it needed was over 320 megs (being 1 gig of that reading was the used up physical memory of 1 gig).


    So please clarify that for me. What does that Commit Charge Peak reading read? You got me tripping out here.
     
  10. Adrian Wong

    Adrian Wong Da Boss Staff Member

    Hello Mike,

    In the first place, the guide NEVER mentioned anything about Commit Charge Peak. ;)

    What I wrote in the guide was check the maximum usage of the dynamic paging file before you decide on the optimal size for the permanent or semi-permanent paging file.

    If you check Task Manager -> Performance, you will see PF Usage. THAT shows the usage of the paging file. ;)

    I think I should add that into the guide to clarify this matter for everyone.

    Hope that helps you some! :mrgreen:
     
  11. Kludgemeister

    Kludgemeister Newbie

    Adrian, thank you for the comprehensive article. You wrote:

    The semi-permanent paging file offers the advantage of never running out of virtual memory. That means even if the permanent part cannot handle the memory load, the application won't halt with an "Out of memory" error message. The dynamic part will come into action and provide the extra virtual memory required by the application.​

    I am running Win2k, and from everything I have read it has a 2GB memory address space, so that I cannot use more than 2GB combined physical and paging memory. Will this get around that limitation?

    I am trying to stitch a panorama image that, with all its temporary files open is over 2GB combined. With the permanent swapfile pegged at 1GB (I have 1GB physical memory) I am getting "Out of memory" errors.

    Thanks again.
     
  12. Adrian Wong

    Adrian Wong Da Boss Staff Member

    Kludgemeister,

    Are you sure Windows 2000 can access only 2GB of memory? :think:

    If you check this page ( http://support.microsoft.com/default.aspx?scid=kb;en-us;328882 ), you will see that Windows supports 4GB by default.
     
  13. Kludgemeister

    Kludgemeister Newbie

    Thanks for the reply, Adrian. It is true that Win2k has a 4GB total memory space, but

    By default, Windows can address a total of 4 gigabytes (GB) of virtual address space. By default, 2 GB of this is reserved for the kernel (operating system), and 2 GB is reserved for User mode programs such as Exchange.​

    This can be reset in Win2k Advanced Server and WinXP to 3GB, but Win2k Pro (which I have) is stuck with 2GB for program use. And that does seem to be the limit, based on when I get the "Out of memory" error messages.

    I haven't had a chance to play with it yet, so I am still wondering if the permanent plus semi-permanent page files get past the 2GB of program memory limitation.
     
    Last edited: Dec 7, 2004
  14. frodiggs

    frodiggs Newbie

    Very interesting article. I may need to read it twice as is it very detailed.

    quick question.

    Have you or anyone benchmarked the effects of stopping NTExecutive From Paging for systems with 512mb memory? It sounds like a good idea but i then wonder that after loading a number of programs that they would spill into VM thus making THEM slower.

    Also is it worth speaking on changing the 'memory usage' option to system cache programs vs- is the default of 'programs' best in most cases?

    My system [SATA RAID 0] has one paging file on my C partition, which should be striped across the two drives (seperate SATA channels), is there any advantage to putting another paging file on my other partition D? Of course its the same drive but I was a bit confused by the reading.

    Lastly, I will soon move to some very fast ram totalling 1gb, is it a better idea to stop NTExecutive From Paging at that point? and if I add another physical drive I assume the paging file will like that better?

    Thanks in advance.
     
  15. Adrian Wong

    Adrian Wong Da Boss Staff Member

    Hello Kludgemeister,

    I must say this is a really unique situation. I personally have never used up so much RAM for a single process.

    Windows supports up to 4GB of virtual memory PER VOLUME. So, I think paged-out memory do not count towards the addressing limit.

    However, I think Windows will still be stuck with an addressing limit of 2GB per process. If your digital stitching takes up more than 2GB, I don't think a large paging file can help there.

    Still, this is uncharted territory IMHO. There's only one way to find out - increase your paging file size to 1.5-2GB and see if that helps you get away from the limitation. :think:

    Do let us know if it works! :mrgreen:
     
  16. Adrian Wong

    Adrian Wong Da Boss Staff Member

    Hello frodiggs,

    I think it would be very hard to benchmark the effects of preventing NTExecutive from paging out.

    Spill into virtual memory? Err.. That tweak prevents Windows from paging out pageable system and driver code. So, how can they just "spill" into virtual memory??

    Hmm.. this isn't even related at all to virtual memory or this guide. :haha:

    But going off topic a little, just follow their recommendations and set it to Desktop, if you actually work on the computer. The Server option is only for computers that are used as servers. It diverts memory from your applications to the disk cache.

    Now, let's get back to topic again, shall we? ;)

    I'm confused. Is your C partition using the entire RAID 0 array or is your D partition on it? Or is your D partition on a separate (third) hard disk?? :confused:

    As mentioned in the guide, it is always a good idea to stop NTExecutive from paging out. Doesn't matter if you have 512MB or 1GB of memory.

    If you add another hard disk on its own IDE channel, yes, it will help improve the virtual memory performance if you place a paging file on it as well.

    But IMHO, please don't forget that virtual memory is just backup memory. It can NEVER replace real RAM. If you want performance, get more RAM, not more virtual memory.

    Please don't get too engrossed trying out exotic ways to eke out the very last bit of performance from your paging files. Remember - the key idea here is to minimize the usage of the paging file and its effect on the performance of the system. ;)
     
  17. frodiggs

    frodiggs Newbie

    Thanks for the reply, yes I was exotic and a bit all over the place.

    anyhow re my setup

    2 mathcing SATA drives in a raid 0 array (32k cluster). I then partitioned the array and have a C (OS and apps) and D (data) drive in windows.

    re NTExecutive, I was asking that if the OS and the drivers are not paged out (and are part of physical memory), does that leave programs with less physical memory and thus more VM usage?
     
  18. Adrian Wong

    Adrian Wong Da Boss Staff Member

    Hello frodiggs,

    In your RAID 0 array, the two disks have been stripped in blocks of 32KB. If the first partition always takes up the outer tracks, what would that leave your second partition (drive D)? Think about that. Would the paging file be better alone in drive C or split into drives C and D?

    About NTExecutive, you might want to re-read the initial pages of the guide first. Especially on the differences between a paging file and a swapfile. ;)

    As mentioned in the guide, the paging file pre-emptively pages-out pageable data even if there is PLENTY of free memory. But the data will still be in physical memory.

    So, even if you let Windows page out the pageable parts of drivers and system code, they will still remain in physical memory. You are NOT going to get more physical memory for your programs. The memory they used are only released if you run out of physical memory.

    This is what I mean by getting too engrossed with the details that you forget what you are optimizing for, in the first place! :mrgreen:

    No matter how much memory you put into your computer, Windows will use a large portion of it for the disk cache. So, you will never seem to have enough memory. That's why it is important to force Windows to keep as much of its data in fast physical memory as possible.

    Hope this clears your doubts! :mrgreen:
     
  19. frodiggs

    frodiggs Newbie

    got it and thanks.

    I did not know that in an array, the first partition is put on the outermost tracks. So my C partition would be the ideal place for the paging file which is where it resides currently.

    ps- no doubts, just questions to hopefully better understand so I can make an educated decision and not blindly follow.
     
  20. Adrian Wong

    Adrian Wong Da Boss Staff Member

    LOL! Agreed. :mrgreen:

    Well, based on your questions, I will improve the guide further in coming revisions.
     

Share This Page