Virtual Memory Use

Hi
I'm running Windows NT4 SP5 on a Thinkpad 600, 366 MHz, 6.4 GB, 288 MB RAM system.  I keep getting "System Low on Virtual Memory...close some applications..."
I have allocated 75MB of virtual memory.  Looking at Performance in Task Manager, typical figures are:

Physical Memory - Total 294,000
                          Available 227,000
                         File Cache 20,000

Commit Charge - Total 118,000
                         Limit 354,000
                         Peak 351,000

Kernel Memory - Total 26,000
                        Paged 23,000
                        Nonpaged 3,000

There are now excessive processes running.

Why does my system have to use virtual memory at all when there is plenty of physical memory? I thought that virtual memory was used when you started running out of physical - am I completely wrong?
Can my system be optimised in some way - other than adding more virtual memory. Recommended size for this is 299MB which would give me approx 590MB - which is ludicrous for most applications?!

Regards
Dan
LVL 2
936113311Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

sprioloCommented:
Virtual Memory is not the same as Physical Memory.  The swap file on NT is used instead of directly accessing the physical memory (actually, NT doesn't access the Hardware directly at all).

Although it seems like the system is using the physical memory it is not.  It is using your swap file (virtual memory).  Increasing your swap file size will solve some problems, but you'll have to becareful, because it uses your hard drive space.

Cheers
0
Gandalf32Commented:
Microsoft recommends that your swapfile size must be the amount of physical memory plus 11Mb. So your swapfile must be at least 299Mb (minimum size).
0
936113311Author Commented:
Increasing the swap file may solve the problems, I agree. But with so much physical memory to spare can this not be used instead, thus not having constant hard drive access?
0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

sprioloCommented:
The swapfile doesn't completely reside on the hard drive (this is why they call it virtual memory).  The system has it suspended inside the physical and on the hard drive at the same time.  Too complicated to get into.  I'm sure Microsoft has plenty of documentation on the subject though.
0
fibdevCommented:
Also,

You never said if you are running NT as a workstation or if you are running NT server on this machine.

This makes a difference because NT server is designed for background proccessing and therefore may cause your system to require a larger page file for running desktop applications.  If you are not using your machine in a network to authenticate users (pdc) or serve printers or applications (member/print server) then Workstation is your best choice.
0
jstouteCommented:
I'm with gandalf32, it is a standard to make the minimum RAM + 12Meg.  As much as you want to fight it, the OS will continually look for a place to move and clear up to all of it's physical RAM at any time plus 12 Meg workspace for itself in the VM.

0
jstouteCommented:
One of the numerous articles where the RAM+12 comes up.

http://support.microsoft.com/support/kb/articles/Q242/0/77.ASP
0
NenadicCTOCommented:
936113311,

I appreciate your thoughts on the aparent lack of need for the pagefile. However, when NT was designed they didn't really expect RAM to be so easily available, so NT is designed in such a way that it uses pagefile even if there is loads of RAM available, as in your case.
Data from applications that are 'inactive' is places on the pagefile even if there is room in the RAM.

I don't still think that you need the 300MB pagefile, but you should definitely increase it to maybe 150 and see if that helps.

Also, NT does access hardware directly. There is nothing between NT and the hardware that can be used as a 'translator'. I think what Spriolo was referring to is that applications never access hardware directly, but rather through NT (that is where NT's higher rate of stability over W9x comes in).
0
aioudineCommented:
Possibly one of youre application caused memory leak,
For example old MDAC may caused this after appling SP5
so if some of youre application use ODBC, try update MDAC (v2.1SP2 solve my problem http://www.microsoft.com/data/mdac2.htm)
0
jgagneCommented:
A good sys admin knows that swap should always be at least double the ram.  There are several comments that are correct - ram amounts today compared to a few years ago, apps being pigs, etc.  If you are running the server edition, it requires you to have a minimum 512.
0
Gandalf32Commented:
I don't agree that you need 512Mb of swap. You do need at least 300Mb though. This is because of the way NT handles memory, as many have pointed out. Application data is usually mapped out to the swap file, so you need plenty of space for this. Jstoute is right (in the RAM+12 instead of +11 - my mistake), as well as the explanation for this amount. This is especially true if you have the crash debug options set to dump the physical memory on crash.
0
jgagneCommented:
Go to your server and try lowering the amount below 512 and read the message that you get.  MICROSOFT wants 512 on a server.  Of course I don't think 936113311 has a server.......
0
benstockCommented:
Making the size of Virtual Memory too large CAN increase problems.

All memory used by applications is Virtual Memory.  Whilst the system uses demand paging to bring the pages back in to RAM, process De-Scheduling tends to be the major factor in having pages swapped OUT to disk.  

I Believe (IMHO) that you have another problem completely unrelated to memory and that all of these discussions about page file sizes are pretty academic.

The "System Low on Virtual Memory...close some applications..." could be caused by many things, do you have any more info on the applications that are running and the purpose and loading of this server?

Anecdote
I recently had a Compaq 6500 with a GIG of RAM just as a BDC exhibit this error with no other programs running, found out that it was a problem with NETLOGON.

Too many assumptions here me thinks...

;-)
0
jstouteCommented:
Because it is a laptop running NT, I assume you have an office suite installed.  Most of the major brands, Microsoft included, have problems relenquishing used memory space.  Last time I read about it it was 5Megs gone for each instance of an office app being opened.  (+1 instance for the shortcut bar) Think about how many times can you open and close documents in office applications before weird things begin to happen... Which is why you have to reboot you machine soo many times, and that's why we don't put those products on our NT servers. ;-)
0
jgagneCommented:
It's not a server.  A Thinkpad (laptop) running as a server?  That'd be something new!
0
aioudineCommented:
Run task manager (CTRL-ALT-DEL) and try to discover in process page what application eat memory
0
fciiiCommented:
Physical Memory - Total 294,000
                                                Available 227,000
                                               File Cache 20,000

                      Commit Charge - Total 118,000
                                               Limit 354,000
                                               Peak 351,000

The last line above indicates that the maximum memory committed by all of the applications you are running at any time during your current session is 57 Mb over your physical memory, leaving only 18 Mb free or 0.487% of memory free.  Without knowing what your setup is, I can't comment on how to reduce memory usage.  In view of the fact that 99.5% of your available memory is in use, it is understandable that the system would like more virtual memory.

Your comment that increasing the swap file to 299Mb seemed ludicrous is well taken.  The facts above however are indisputable, you are running out of memory.  If you are determined not to increase your swap allocation, try using the performance monitor in the administrative tools menu to examine your system's allocation and usage of memory.  Keep in mind that your swap file needs to be as large as your physical memory in order to save the debug information from a system crash.

In a later comment you stated, in effect, that it didn't seem necessary to increase the size of the swap file with so much physical memory to spare.  It appears that you need to do some diagnosing of your system's use of memory.  The below link may be of interest to you.  Good luck.

http://technet.microsoft.com/cdonline/default-f.asp?target=http://technet.microsoft.com/cdonline/Content/Complete/windows/winnt/Winntas/Tips/nt301.htm
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jgagneCommented:
I'll stand on my original comment about swap.  In all the years of working on Unix AND NT boxes, the more swap you have the better.  Apps are pigs and will kill your NT box if it's not optimized.  If you cannot find the "pig" or cannot get it to reduce it's need, add more memory.  If this is not an option, and you have plenty of hard drive space, add more swap.  I have found you get better efficiency if you have swap on more than one drive AND it's 1.5 to 2X RAM.  Try it temporarily and see what happens.  It will at least give you more time to research the problem to find out what is eating up your memory.
0
benstockCommented:
I think some of your Suffering is down to masking problems rather than solving them.
0
jgagneCommented:
If Microsoft would build an OS that was stable, we wouldn't be having all of these issues.  Everyone here is correct in their own way in trying to solve this issue.  Until software companies put out software that is written correctly, you have to do whatever you can to solve problems.  I highly doubt that in the 12+ years that I've been working on systems, that my "masking" has been that successful.  If your car radio won't pick up your favorite radio station, do you change stations? No - you improve the antennae or tweek the radio.
0
936113311Author Commented:
Thanks for all your comments! fciii, an excellent reference for optimising NT, thanks

Dan
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows OS

From novice to tech pro — start learning today.