INCREASING ENVIRONMENT SPACE FOR LARGE ENVIRONMENTS
Like all data structures on a computer system, environment variables need a chunk of memory real estate in which they can be stored. When you start an NT Command Prompt session (an instance of the CMD.EXE program), Windows NT automatically allocates a certain amount of memory for the storage of environment variables. This storage pool is known as the environment space available to that session. Occasionally, you may run into situations where there is insufficient environment space available, and either you or an application are unable to create or expand environment variables (this is usually accompanied by an Out of Environment Space error message). To rectify this situation, you can increase the amount of memory the environment has for environment variables by performing these steps:
In Control Panel, click the System icon.
Click the Environment tab.
In the System Environment Variable list, select the ComSpec variable (this dialog is shown in Figure 6-15).
To increase the amount of environment space, change the data in the Value box using this syntax:
where <drive:\windir> is the drive and directory where the Windows NT installation is located.
(Note that the maximum size for the environment is 32768 bytes.)
NOTE: Be aware that changes made to environment variables via the System Control Panels Environment tab take effect immediately and are visible to all new applications and command prompt sessions launched after the change is made. However, any applications already running wont see the change until the next time they are started. In addition, permanent changes to environment variables should always be made via the System Control Panel rather than within an NT Command Prompt session, because changes made in individual command prompt sessions only take effect for that session and are not permanently recorded.
Optimizing the Windows NT Explorer
Using a Windows NT computer as a workstation is really about using Windows NTs shell, the Windows NT Explorer. Explorer is NTs default desktop shell and is used to handle all aspects of desktop management, including:
Presentation of the User Interface (the NT GUI)
Launching and Control of Applications
File and Folder Management
Configuration of File Associations and File Type Definitions
Part and parcel of the Windows NT Explorer (which is an actual application whose filename is EXPLORER.EXE) is the Taskbar, the gray bar which appears by default at the bottom of the Windows NT 4.0 display (although you can also move it to any edge of the screen you like by dragging it). The Taskbar is a part of the Windows NT Explorer interface and is responsible for displaying and switching to running applications, as well as displaying the Start button (which contains program shortcuts and other selections) and the System Tray (that small area on the opposite side of the Start button that displays miniature icons for the clock and other various applications and utilities).
In the following section, we examine some issues surrounding the optimization of Windows NT Explorer interface, and some tips and tweaks that you can employ to improve performance and troubleshoot a variety of problems that can occur.
SOLVING OUT OF MEMORY ERRORS
If you ever receive Out of Memory errors or errors related to USER32.DLL, and are sure that you have plenty of free memory on the system, you may wish to consider making a modification to the Registry which may help to alleviate the problem.
If you are receiving these errors, locate the following Registry value, which configures the Win32 subsystems startup properties:
Scan the values data for the part that says SharedSection=X,Y. Here, X is the size of the desktop heap created by interactive programs (in Kilobytes or K) and Y is the size of the systemwide heap. There is also a third possible value here that isnt enumerated by default. To enumerate (and increase) this value, add ,Zafter the other two numbers listed. Z represents the size of the hidden desktop heap created by noninteractive processes. The recommended value to start with is 512 (Kilobytes); this will probably solve the problem youre experiencing. If not, try increasing the value in increments of 128 until the problem goes away.
When youre finished, the string should appear as follows: ...SharedSection=1024,3072,512.... If youve got a large amount of installed memory on your system you may also want to experiment with increasing the sizes of X and Y. In some situations, this may increase the responsiveness or stability of the desktop environment. Again, it is recommended that you start with only small increases, and that you dont get too carried away. As an example, my own configuration reads: ...SharedSection=1536,4096,512....
CAUTION: Be aware that increasing the values in the SharedSection portion of the Windows value increases the amount of memory used by Windows NT, and more specifically, the Windows NT Explorer application (EXPLORER.EXE). For example, the command line used on my own system (SharedSection=1536,4096,512) causes Explorer to use almost 5MB of RAM (this memory usage can be viewed using the Processes tab of Task Manager). Therefore, you should only increase these values if your system has plenty of memory; in the case of the hidden desktop heap (Z) value addition, you should only add this value if you are experiencing errors or wish to takes proactive steps to help prevent the possibility that this might occur in the future.
SOLVING PROBLEMS RELATED TO THE IRPSTACKSIZE VALUE
Another Registry modification, which is also related to artificial low-memory errors, may help in situations where you receive errors (or Event Viewer notifications) indicating that your system has insufficient resources. Specifically, if you receive any of the following error messages, you may wish to consider making this modification:
Not enough server storage is available to process this command message appears in the Windows NT System Event Log (typically, this occurs after a service or driver is added to the system).
The error The servers configuration parameter irpstacksize is too small for the server to use a local device. Please increase the value of this parameter occurs when printing using the HP Print Monitor over the DLC protocol (e.g., to an HP JetDirect card in a network printer).
The status of a printer managed using the HP Print Monitor over DLC is listed as not available in Print Manager even though the printer itself works fine.
IRPstackSize is a Server service-specific parameter that specifies the number of stack locations in I/O request packets (IRPs) used by the Server service on an NT Server or Workstation. It may be necessary to increase this number for certain transports, MAC drivers, or local file system drivers. You may experience problems related to this value right after adding a device or service to the system, because that driver or service may push this heap past its default size limit.
To increase this value, first locate the following in the Registry:
Change or add the following value within this subkey:
Value Name:
IRPstackSize (note that capitalization should be exactly as listed)
Default Value:
Varies; but most likely will be 6
Type:
REG_DWORD
Range of Values:
0 to 12 (decimal)
If you are experiencing any of the above errors, try setting this value to at least 7, or, if it is already at 7, try increasing it by increments of 1 until the problem disappears. Do not set the value any higher than 12, which is the maximum allowed value.
CAUTION: If you will be installing the Norton NT Tools or Norton Utilities for Windows NT on your system, you must be sure not to set the IRPstackSize value higher than 10 (decimal); otherwise, the utilities are likely to fail to install properly.
ALLOWING NT TO AUTOMATICALLY DETERMINE REGISTRY AND PAGEDPOOL MEMORY SIZES
Another possible cause of the Not enough server storage to process this command Event Viewer message (in the System Event Log), as well as various kinds of Remote Procedure Call (RPC) errors and errors related to paged pool memory, are often related to a special Windows NT configuration value known as the RegistrySizeLimit (RSL). The value set for the RSL limits the total amount of space that may be consumed in paged pool and disk space by Windows NT Registry data (the Registry hives). You can think of the RSL as a sort of global quota for the NT Registry.
NOTE: The Registry Size Limit value doesnt indicate the actual size of the Registry, just the maximum size to which it can grow. Therefore, the Registrys size doesnt grow just because the RSL value does.
By default, Windows NT sets the Registry Size Limit to 25 percent of the current paged pool memory allocation. Because these figures are inherently tied and may be set too low, it is usually beneficial to configure them so that NT dynamically allocates them (e.g., they arent set to specific values, and NT automatically configures them as necessary).
Paged pool memory is configured in this Registry location:
Doesnt exist; however, it may be set to an actual hard-coded number if youve adjusted it via the Virtual Memory dialog in the Performance tab of the System Control Panel or directly via the Registry.
Type:
REG_DWORD
Value Range:
0 or 4 0xFFFFFFFF megabytes (Actual range: 4MB80 percent of paged pool memory)
The RegistrySizeLimit value is not listed by default; however, it may appear if youve ever configured the Maximum Registry Size value in the Performance tab of the System Control Panel (this dialog is shown in Figure 6-16).
The best way to ensure that the paged pool value is always optimal is to simply set its data to 0 (which is also the default, but may have changed at some point). For the RegistrySizeLimit value, the best way to ensure that Windows NT is in control of automatically sizing the value is to verify that the RegistrySizeLimit value doesnt exist. If it does, you can simply delete it.
Note that you will need to reboot to have any changes made to these values take effect.
NOTE: For different versions of Windows NT, the maximum paged pool memory/Registry Size Limits are as follows (the RSL can be up to 80 percent of the paged pool memory size): NT 3.1: 32MB/8MB; NT 3.5x:128MB/102MB; NT 4.0: 192MB/154MB. Among other things, the maximum size of the Registry affects the maximum number of users that can be supported on Windows NT domain. In NT 3.1, this limit was around 5,000 users, in NT 3.5x it was around 20,000 users, and in NT 4.0, it is around 30,000 users (however, other system limitations and real-world factors often limit the maximum number of users to an even lower figure).
Order Your SQL Fundamentals CD Today! Learn how to use SQL Server, understand Office integration techniques and dive into the essentials of SQL Express and Visual Basic with this free SQL Fundamentals CD.
You've Deployed SharePoint...Now What? This one-day free online conference delivers the technical knowledge needed to kick MOSS up a notch. In one information-packed day, independent SharePoint experts will present practical, real-world information and provide take-away, ready-to-use solutions
What Would You Do If You Ran Microsoft? ITTV's 2008 inaugural video contest, "If I Ran Microsoft..." is your chance to tell it like it is. Be goofy or be serious, but don"t miss this chance to have fun, win prizes, and go viral in a major way.
Maximize Your SharePoint Investment This web seminar discusses how true bi-directional replication of SharePoint content from one server to another enables branch offices to maintain access to current SharePoint content.