System Resources
There
are a great deal of misconceptions surrounding the definition of system
resources and this article should help give a clearer understanding of this
issue.
GDI
and User Resources explained
If
you've ever looked at your Resource Meter,
as shown below, (and found here: Start
> Programs > Accessories > System Tools
> Resource Meter), you might have
asked yourself what the difference is between System, User and GDI
Resources. Before I can answer that, you first have to understand exactly
what resources are. To most people, the word "resources" probably
conjures up images of hardware such as RAM, or disk space, or printers, etc.
While those are certainly resources, where Windows is concerned, System
Resources has a very specific meaning: they are the "objects"
(windows, brushes, pens, fonts, menus, etc) Windows uses. Windows 9x keeps track
of resources via 5 fixed heaps, 2 of 16-bit and 3 of 32-bit.
The
USER.EXE heap contains information about all the windows being used by each
active application. The data structure for each window, including any minimized
windows, is stored in this heap. Examples of windows include the application
windows themselves, their dialog boxes, and controls (such as buttons and check
boxes). The more complicated the window is, the more it will pull from the User
Pool. Programs such as Word and Access pull a lot from the User Pool.
The
GDI.EXE heap contains information about the current graphical objects, such as
pens, brushes, cursors, fonts, and icons. GDI = Graphical Device Interface.
Apart from the 16-bit heaps, the objects themselves are stored in virtual memory
(which is about as large as physical RAM plus the Swapfile size). The more
graphically oriented a program is, the more it will pull from the GDI Pool.
Programs such as PowerPoint and PhotoShop pull more from GDI than from the User
Pool.
Under
Windows 3.1, resource objects were
stored in two 64K areas of memory (called User and GDI resource heaps) and
became known as the 16-bit resource heaps. Under Windows 9x and ME, however,
three 32-bit heaps were added, with capacity for 2MB worth of objects each. The
five individual heaps are shown on the following list.
1.
16-bit User heap (64K)
2.
32-bit User window heap (2MB)
3.
32-bit User menu heap (2MB)
4.
16-bit GDI heap (64K)
5.
32-bit GDI heap (2MB)
When
you look at System Resources, the
16-bit GDI and User heaps are treated separately. The System Resources percentage figure always represents the lower
figure of the two (User and GDI).
In other words, if only one percentage figure can be seen - such as when looking
at System Properties (right-click the Desktop and select Properties)
- then the figure represents System
Resources. The Resource Meter
will tell you which of the two heaps is the lowest.
As the above snapshot shows, free User
Resources are lower than GDI
Resources, so System Resources
represents the available User Resources.
In
addition, Windows 9x and ME also increased the number of timers, COM and LPT
ports, menu handles, and other "resources" available to applications.
All of these "resources" are shown in the following table.
No
matter how much RAM is installed, you are always going to be hindered by the 64K
and 2MB "resource limits". A computer that has 32MB of RAM has exactly
the same amount of System Resources as one with 128MB! Adding additional RAM
will not give you more resources, period, only Windows NT/2K/XP can do that.
However, closing unnecessary programs certainly will free up resources. The only
exception is when the program(s) have a "memory leak" (where a
misbehaving program doesn't release the resources it used) or you have shared
resources being used by more than one 16-bit program (all must be closed to
restore the resources).
You
should be aware; many applications will remain in memory long after they are
required, just in case you need them again shortly after you've finished with
them. A good example of this is RNAAPP.EXE (the Remote
Network Access Application Program), which loads when you logon to the 'net,
and remains in memory long after you logoff - just in case you were disconnected
and need to reconnect again, for example.
Note
also that there is absolutely no performance penalty involved in using
resources. That's what they're there for after all - to be used when needed.
However, if the percentage of available resources in either the User or GDI heaps falls
below 10%, then you will receive the statutory "90% or more resources are in use!" warning (I'd love to show a
snapshot, but it's impossible to take one when resources are so low). When you
receive this warning, close down all unnecessary applications. Otherwise you'll
simply run out completely sooner or later. In fact, the very act of closing
applications may actually increase resource usage momentarily, to the point of
no return, so try closing smaller applications first.
The
inevitable outcome of letting resources fall below 10% is that a program won't
load, or you'll simply crash. If you're lucky, you can recover the system
sufficiently enough to save your data, and continue working, however there are
no guarantees. Note, also, that monitoring resources with the Resource Meter will use resources itself, so you'll never see 100%
free resources - even from the System
Properties dialogue (because it, too, uses resources).
Obviously,
the fewer programs you launch, the more resources you'll have available.
However, any perceived improvement in performance is purely due to running fewer
programs - and nothing at all to do with free resources. Similarly, any loss of
performance perceived when resource usage is high is purely down to the number
of applications running (forcing the Swapfile into over-drive). Resource usage
seems to affect performance, but it is merely a symptom of the underlying cause
- the programs that are using the resourcess!
So,
if you get a customer calling you because their ISP told them the reason they
couldn't connect was because they "only" have 75% System Resources
free (MSN does this), please be aware that this is a totally bogus claim... : )