Tuning Directory Cache

The following information applies only to NetWare running the traditional NetWare file system. Directory cache is not used by the NSS file system.

As directory entries are read and operated upon by a user, NetWare caches the entries to make repeated use of an entry more efficient. In a default configuration, NetWare allocates 20 cache buffers of 4 KB each. Each block read into a cache buffer contains 32 entries.

The default number of buffers is appropriate for only a small number of users. The tuning strategies in this section will help you tune the directory cache to meet your network's requirements.


Three Directory Cache Tuning Strategies

Sizing the directory cache depends largely on the characteristics of the workload the server supports. The key is the frequency and breadth of directory searches, file opens, closes, and creations.


Strategy 1: Tuning for Low Use

To handle low memory use, you probably won't need to allocate any more cache than NetWare's default. By default, NetWare allocates 20 buffers immediately upon request, followed by a maximum allocation of up to 500 buffers (about 2 MB). This is sufficient for the majority of low-use scenarios.


Strategy 2: Tuning for High Use

To tune for very high use, use the SET command at the server console prompt or the MONITOR utility (MONITOR > Available Options > Server Parameters > Directory Caching) to change the directory cache buffer server parameters as follows:

MINIMUM DIRECTORY CACHE BUFFERS = 2000

MAXIMUM DIRECTORY CACHE BUFFERS = 4000


Strategy 3: Tuning for Name Spaces

When a name space is installed on a traditional NetWare volume, the volume's DET must include an additional directory entry for each file. So, for example, if a volume supports DOS, NFS, and LONG name spaces, there are three directory entries in the DET for each file, instead of just one.

In such a case, a directory cache buffer with 32 directory entries no longer represents 32 files, it only represents 10 files, since each file now requires three directory entries.

This means the efficiency of your directory cache is decreased by a factor equal to the number of name spaces loaded. Therefore, you might need to add more memory if you load multiple name spaces. By carefully tuning the directory cache, you can maintain high performance even under these conditions.

Before adding name spaces, allow your server to operate in its production environment for several weeks. This lets NetWare allocate the appropriate number of directory cache buffers for the native DOS environment.

After this settling-in period, look at the MONITOR General Information window to see the value for Directory Cache Buffers. This value is a high watermark: it is the highest number of directory cache buffers allocated since the server was last started.

Use the following formulas to determine the optimum minimum and maximum number of directory cache buffers.

(# of names spaces, including DOS) x watermark = minimum cache buffers

(minimum cache buffers) + 100 = maximum cache buffers

For example, if your server's directory cache buffer watermark is 250, and you want to load one additional name space, you would calculate the minimum and maximum values of directory cache buffers as follows:

2 x 250 = 500

500 + 100 = 600

Before loading the additional name space, use the SET command or MONITOR to change the minimum and maximum directory cache buffer parameters (MONITOR > Available Options > Server Parameters > Directory Caching).

These settings increase the likelihood that repeatedly used directory cache buffers will remain in cache and that those buffers will remain in cache longer, providing the best possible read response times.


Monitoring the New Settings

After you tune the directory cache, let the server operate for a few weeks to settle in. Then check to see whether the server allocates the additional directory cache buffers that the new settings allow. If the allocated buffers do not increase to near the level allowed, then you know that your users' directory access patterns don't require the additional cache. On the other hand, if your server uses all the cache you made available, your user community's directory access patterns may be more intensive than you anticipated.