Author Topic: Virtual Memory  (Read 773 times)

Offline Gunthr

  • Gold Member
  • *****
  • Posts: 3043
      • http://www.dot.squat
Virtual Memory
« on: November 19, 2001, 07:54:00 PM »
When I'm climbing out and I alt-tab out of AH, I can barely run any other programs and I can hardly surf the web... these things take forever. AH runs great. When I close out of AH, everything will go back to working very snappy. This started happening recently. Any ideas what could cause this? I'm only guessing as to whether it might be virtual memory.  Thanks for any ideas.


1400 mhz AMD
512MB PC2100
Win2k - latest service packs

[ 11-19-2001: Message edited by: Gunthr ]
"When I speak I put on a mask. When I act, I am forced to take it off."  - Helvetius 18th Century

Offline -ammo-

  • Platinum Member
  • ******
  • Posts: 5124
Virtual Memory
« Reply #1 on: November 19, 2001, 08:23:00 PM »
see my post below gunthr, it might help you. Leph gave me some pointers I am gonna implement them tonite.
Commanding Officer, 56 Fighter Group
Retired USAF - 1988 - 2011

Offline Gunthr

  • Gold Member
  • *****
  • Posts: 3043
      • http://www.dot.squat
Virtual Memory
« Reply #2 on: November 19, 2001, 09:00:00 PM »
My prob is a little diff than yours Ammo. I tried the launcher. Since my prob is that when AH is running, it seems I have hardly no memory left for anything else, I tried reducing the priority to "3" in Leph's launcher proggy to allow other apps some priority, but it didn't make any diff.

I also went to the Virtual Memory Tab as Lephturn suggested, and changed the Initial Size to 350mb and the Maximum Size to 350mb. I saw no difference. I still can't do anything else while AH is running minimised with Alt-tab.

I've got 512mb of ram and didn't have this prob till recently. No doubt its something I did... (compulsive tweaker)

Hope these ideas may solve your prob though...G'luck

[ 11-19-2001: Message edited by: Gunthr ]
"When I speak I put on a mask. When I act, I am forced to take it off."  - Helvetius 18th Century

Offline qts

  • Nickel Member
  • ***
  • Posts: 782
      • None yet
Virtual Memory
« Reply #3 on: November 20, 2001, 06:13:00 AM »
VM size should be a minimum of RAM + 11 MB in one chunk, with at least 2 MB on your boot partition. NT/2k really don't like it if this does not hold

In your case, this means a minimum VM size of 523 MB. Having multiple pagefiles across multiple physical disks helps too, especially if you're running SCSI.

If you go into Task Manager you can look at the Performance Tab for more info.

Offline Gunthr

  • Gold Member
  • *****
  • Posts: 3043
      • http://www.dot.squat
Virtual Memory
« Reply #4 on: November 21, 2001, 04:43:00 AM »
Thanks a lot, Qts - will try changing it
"When I speak I put on a mask. When I act, I am forced to take it off."  - Helvetius 18th Century

Offline Gunthr

  • Gold Member
  • *****
  • Posts: 3043
      • http://www.dot.squat
Virtual Memory
« Reply #5 on: November 21, 2001, 08:55:00 AM »
Qts, I tried the recommended VMem settings. It didn't make any difference. I have it at something like 750 and 750. Is this ok? I still have the problem...

AMD 1600XP
512 MB PC2100 RAM
Win2k - all updates

[ 11-21-2001: Message edited by: Gunthr ]
"When I speak I put on a mask. When I act, I am forced to take it off."  - Helvetius 18th Century

Offline qts

  • Nickel Member
  • ***
  • Posts: 782
      • None yet
Virtual Memory
« Reply #6 on: November 22, 2001, 03:06:00 PM »
750 MB should be fine. This shows that your problem isn't VM-related.

Do you get the same symptoms when you log in as a different user?

Offline mrsid2

  • Parolee
  • Silver Member
  • ****
  • Posts: 1081
Virtual Memory
« Reply #7 on: November 25, 2001, 07:06:00 AM »
Gunthr next time you try doing that, check if your HD light is burning constantly - if that's the case then your prob is related to virtual memory use and a very slow harddrive. Maybe you managed to tweak your HD settings to use PIO mode instead of busmaster? That would explain freezing.

If your HD light isn't burning, go to task manager and see your CPU memory used vs max amount available. In your case you should have Commit charge total around 200Mb and l limit around 1 Gbytes. I'm just running AH offline on background and it shows 99% cpu usage - still things work quite snappy.

Offline Gunthr

  • Gold Member
  • *****
  • Posts: 3043
      • http://www.dot.squat
Virtual Memory
« Reply #8 on: November 25, 2001, 08:54:00 AM »
No diff logging as diff user, qts.

My problem turned out to be a real time anti-virus program running without me knowing it. Thanks for your help, qts. Mr. Ripley, thanks for info on "commit charge". I wasn't sure what that should be.
Anyway, I am now squared away after disabling the real-time proggy.   :)


.

[ 11-25-2001: Message edited by: Gunthr ]
"When I speak I put on a mask. When I act, I am forced to take it off."  - Helvetius 18th Century

Offline Lephturn

  • Silver Member
  • ****
  • Posts: 1200
      • http://lephturn.webhop.net
Virtual Memory
« Reply #9 on: November 26, 2001, 06:53:00 AM »
Whoops, missed this one before.

QTS, I don't believe you are correct.

1.  You do not need as much swap file as you have RAM given that you have a lot of RAM.  This depends on what applications you are running of course.  With folks having 512 Megs of RAM much of the time, even a 350 Meg swap file is normally plenty.  I've seen production Win2k Servers running 512 RAM and a 500 meg swap with no problems.  The only reason you need a swap of RAM + 11 Meg is if you want to be able to have your RAM contents saved in the event of a serious system crash with NT4/2k and I presume XP.  A gaming machine doesn't need that, it's a waste of space.

2.  You DO NOT need ANY of your swap file on your boot partition.  In fact, NT/2k/XP runs much better if you move your swap file on to a separate physical disk.  If you have various partitions on one physical disk, it's completely irrelevent which partition the swap file lives on.  The OS won't care one way or the other.  Splitting the swap file to have a few megs on the boot partition is not necessary or desirable.  Either put it all there, or none of it.  The most important thing is to have your swap file be contiguous (not fragmented) and have the min and max size set to the same number. (so it doesn't grow and fragment at that time)

By all means, play with your virtual memory settings and find what works best for you.  Just make sure you always set the min and max size to the same number, put your virtual memory file on a separate physical disk from your OS is possible, and be sure to defrag your disk before and after any changes.

Remember, the OS must expend resources to manage your swap file, so you don't want it to be too large.  If you really want more information, fire up task monitor (cntrl-alt-del in Win2k/NT/XP) and watch your Performance tab for the MEM Usage.  You'll notice that your physical memory total plus your swap file size will equal your Commit Charge Limit.  Close taskman, and fire up AH, and whatever else you often have open, say email and your browser.  Get those programs doing something.  Now cntrl-alt-del and bring Task Man back up and look at your Peak under Commit Charge.  That's how much memory you used peak.  If your peak is well under your Limit, you have plenty of virtual memory.  Ideally, your Peak Commit Charge will be lower than your ammount of Physical memory, so your system won't be touching your swap file at all.  With enough physical RAM, you don't need much of a swap file at all.  :)  Having about 300 around just to be safe is a good idea.  After that, don't increase it unless you run out for some reason... and even then, if you have at least 256 Megs of RAM plus a 300 Meg swap, if you run out of virtual memory it's likely indicative of a problem with a particular application, not a sign your swap file is too small.

Offline qts

  • Nickel Member
  • ***
  • Posts: 782
      • None yet
Virtual Memory
« Reply #10 on: November 26, 2001, 03:23:00 PM »
OK, 1 - partially correct. This has to do witht the way NT uses the paging file. For performance reasons, data read from the disk is typically pre-paged to the pagefile. If the pagefile isn't big enough, NT can't do this, and performance may suffer. Disk space is cheap, so it can't hurt to be generous.

2 For error reporting, NT et al require 2 MB on the boot partition. If you have multiple partitions on the same disk then it is indeed deleterious to performance to spread the pagefile. However, if you have multiple disks, then a performance boost can be obtained by splitting the pagefile. The general rule is 'the most used partition of the least used disks'. You are correct about the sizing. However, a large pagefile does not impose extra overhead on the OS - it's all part of the same 4 GB VM.

Offline Lephturn

  • Silver Member
  • ****
  • Posts: 1200
      • http://lephturn.webhop.net
Virtual Memory
« Reply #11 on: November 28, 2001, 08:47:00 AM »
Quote
Originally posted by qts:
OK, 1 - partially correct. This has to do witht the way NT uses the paging file. For performance reasons, data read from the disk is typically pre-paged to the pagefile. If the pagefile isn't big enough, NT can't do this, and performance may suffer. Disk space is cheap, so it can't hurt to be generous.

That's just my point, it CAN be detrimental to performance to have your swap file be too large.  Yes, it must be large enough, but too large will also hurt you.  Now granted, the penalty will be a small one, but why waste the space if you don't have to?  The OS has to manage that space, and that takes resources, so you only want it to be "big enough", not too big.  Also, data read from disk is typically staged through the disk cache, or v-cache, not the virtual memory file.  That's a different cache, and although you may want to tune that one as well, it has no effect on your virtual memory settings.

 
Quote
Originally posted by qts:
2 For error reporting, NT et al require 2 MB on the boot partition. If you have multiple partitions on the same disk then it is indeed deleterious to performance to spread the pagefile. However, if you have multiple disks, then a performance boost can be obtained by splitting the pagefile. The general rule is 'the most used partition of the least used disks'. You are correct about the sizing. However, a large pagefile does not impose extra overhead on the OS - it's all part of the same 4 GB VM.

Sure, you need more virtual memory for error reporting so it can dump the contents of RAM to a file when it dies... but most users don't need or want that functionality.  I wouldn't turn that on unless I needed it to troubleshoot something, and only if I planned to send the memory block to Microsoft to look at.  Joe home user doesn't need to do that, doesn't want the time-lag in a crash while the OS writes RAM to disk, and wouldn't know what to do with the resulting file if he did.

As far as splitting the page file, yeah that can be good, but honestly unless you are on a SCSI system, it's not normally fast enough IO to help.  The best way to get a bit of benefit for most folks with multiple disks is to move the pagefile to a drive that is as you say, least used.  By definition, the least used drive will be the one the OS is not installed on.  :)  In most situations with IDE drive systems, the best gain can be made by moving the swap off the C: drive where the OS is, and onto the second drive.

But yes, having more swap space DOES cost the OS additional resources, and will be a resource penalty.  Granted, it's a small performance hit.  How much RAM the VM thinks is available as address space is irrellevent to how much space the OS must track and manage in the swap file.  It takes resources, memory and some processing power, to track the contents of the swap file.  The bigger it is, the more resources will be used to manage it.