Evaluating Memory and Cache Usage
|
|
Resolving Memory and Cache Bottlenecks
While monitoring your memory and cache resources, you might discover memory and cache bottlenecks in your system. As a result, you might need to optimize cache usage, replace applications, or even add new memory. The following tips can assist you with your decision-making process.
Optimizing Cache Usage
Even though you cannot change the cache itself, there are a few things you can do to make the most of the cache.
- For applications that you develop or maintain, improve the locality of reference in your application's data structures. This improves its cache performance and minimizes its working set so that it uses less space in memory. In addition, it reduces disk access that can slow performance systemwide.
- If you are running Windows 2000 Server, you can direct the Virtual Memory Manager to give the cache higher priority for space than the working sets of processes. See "To adjust Server Optimization settings" earlier in this chapter to change memory management settings. To favor the cache, choose Maximize Data Throughput for File Sharing. To favor working sets, choose Maximize Data Throughput for Network Applications.
- Change the way work is distributed among workstations. Try dedicating a single computer to memory-intensive applications such as CAD/CAM and large database processors.
- Add memory. When memory is scarce, the cache is diminished and cannot do its job. After the new memory is installed, the Virtual Memory Manager expands the cache to use the new memory.
Resolving a Memory Bottleneck
Although adding memory is the easy solution to a memory bottleneck, it should not be the first solution you undertake. Try the following, more cost-effective alternatives before spending money on additional memory. If you ultimately decide to add memory, note that the maximum amount of memory recommended for a computer running Windows 2000 Server is 4 GB.
- Monitor your applications and replace or correct those that leak memory or use it inefficiently.
- Modify your application to improve the locality of reference. The Working Set Tuner, included in the Platform SDK, recommends an optimal organization of code functions. For more information, see the MSDN link on the Web Resources page at http://windows.microsoft.com/windows2000/reskit/webresources.
- Increase the size of the paging file. In general, the bigger you can make it, the better it is. You can also have multiple paging files, though you should only have multiple paging files per physical drive when the drive is not partitioned into logical drives. Striped volumes can be used. This improves the read-write rates for the paging file because the work is distributed over multiple disks.
- Check the available space on your disks. If you are using a large paging file and space is not available, this can produce the symptoms of a memory bottleneck.
- To conserve memory, avoid using some display and sound features. Features that can drain memory include animated cursors, desktop icons, large-bitmap wallpaper, and some screen saver programs; removing or disabling them can offer some benefit on a memory-constrained system. Reducing display color depth and screen resolution can also save memory but to a lesser degree.
- To free memory, turn off services you do not use. Stopping services that you do not use regularly saves memory and improves system performance. However, make sure you understand the ramifications of stopping a service before you do so.
- Remove unnecessary protocols and drivers. Even idle protocols use space in the paged and nonpaged memory pools. Drivers also use memory. You can see how a driver uses memory with Pool Monitor (Poolmon.exe).
- Replace 16-bit systems with 32-bit systems for better reliability and performance.
- If you have other computers that are underutilized, move memory-intensive applications to those computers.
© 1985-2000 Microsoft Corporation. All rights reserved.