| System maintenance & setup > Web Server maintenance > Optimizing .NET for Chancery SMS > Tuning memory usage limits

Tuning memory usage limits

Tuning the cache's memory limit leads to optimal Web Server performance.

The Web Server DRAM capacity recommended for a Chancery SMS system is 2 GB. By default, Microsoft .NET is not configured to use all the allocated memory. The ASP . NET cache starts trimming the cache based on an LRU algorithm and the CacheItemPriority enumerated value assigned to the item after memory consumption is within 20 percent of the configured memory limit. If the memory limit is set too high, it is possible for the process to be recycled unexpectedly. Your application might also experience out‑of‑memory exceptions. If the memory limit is set too low, it could increase the amount of time spent performing garbage collections, which decreases overall performance.

Empirical testing shows that the likelihood of receiving out-of-memory exceptions increases when private bytes exceed 800 megabytes (MB). A good rule to follow when determining when to increase or decrease this number is that 800 MB is only relevant for .NET Framework 1.0. If you have .NET Framework 1.1 and if you use the /3 GB switch, you can go up to 1800 MB. On Web and Application Servers, the /3 GB switch is set in the C:\boot.ini file. Before editing the boot.ini file, read Microsoft Article 323427 available at http://support.microsoft.com/kb/323427/en-us.

The following example shows what the modified entry would look like:

multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows Server 2003, Enterprise" /fastdetect /3GB

After configuring the /3GB switch, we recommend that the administrator also configure the ASP .NET process model memory limit in the "machine.config" file (typically found typically found in the .NET directory tree, for example C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\CONFIG\) as follows:

<process Model memoryLimit="50">

This value controls the percentage of physical memory the worker process is allowed to use. If this value is exceeded, the process is recycled. For example, if the memory limit is set to 50 and your server has 2 GB of RAM, the process recycles when the memory used by the worker process goes beyond 1 GB and the total available physical RAM falls below 50 percent of the RAM (that is, 1 GB).

You can use the process performance counter object and the private bytes counter to monitor the worker process memory.

Pearson
Always Learning
www.pearsonschoolsystems.com 
Tel: 866-434-6276
Email: psstechsupp@pearson.com