Previous Page | Next Page

Using Configuration Settings to Optimize Metadata Server Performance

Configuring the Number of Threads Used by the Metadata Server


About the MAXACTIVETHREADS, THREADSMIN, and THREADSMAX Options

When the metadata server is initialized, the server creates a pool of available threads to run client requests. The metadata server's configuration settings control the minimum and maximum number of threads in the pool.

When a client request is received, one of the available threads is used to process the request. If no threads are available, the server creates a new thread. If the thread pool has reached the maximum size, the request waits until a thread is returned to the pool.

The client request is then executed in the thread as resources become available. The server's configuration settings control the maximum number of threads that can be executed concurrently. When processing is complete, the thread is returned to the pool. If the number of available threads exceeds the minimum thread pool size, unused threads are destroyed after a period of time to conserve system resources.

The management and use of threads is controlled by the following configuration settings:

minimum number of threads

determines the minimum number of threads that are maintained in the server's thread pool, regardless of the number of client requests that are received or accepted. If the number of available threads exceeds this minimum, then the excess unused threads are destroyed after a period of time to conserve system resources.

By default, the server uses this formula to compute the minimum number of threads:

MAX(5,((number-of-processors * 2) + 1)) 

This means that the value is set to either 5 or to ((number-of-processors * 2) + 1), whichever is greater.

For example:

  • If the host machine has eight processors, then the minimum number of threads is set to 17.

  • If the host machine has two processors, then the minimum number of threads is set to 5.

  • If the host machine has one processor, then the minimum number of threads is set to 5.

If the metadata server's invocation options include a value for THREADSMIN, then that value is used instead of the default.

maximum number of threads

determines the maximum number of threads that are maintained in the server's thread pool, regardless of the number of client requests that are received or accepted. If no threads are available when a client request is received, then a new thread is created only if the number of the threads in the thread pool is less than the maximum. If the maximum has already been reached, the client request waits for a thread to be returned to the pool.

As a best practice for the metadata server, THREADSMAX and THREADSMIN should be set to the same value to avoid thread resource thrashing.

By default, if no value is specified for maximum number of threads, it is set to the computed value of THREADSMIN.

maximum number of active threads

determines the number of threads that are allowed to run concurrently on the metadata server. This number controls the number of queries that can be active on the server at any one time.

By default, the server sets the maximum number of active threads as follows:

  • If the host machine has one processor, then the maximum active number of threads is set to 2.

  • If the host machine has two or more processors, then the maximum active number of threads is set to the number of processors.

If the metadata server's configuration file includes a value for MAXACTIVETHREADS, then that value is used instead of the default.
The default settings that are described in the preceding list provide a good starting point for most sites. To fine-tune the configuration to meet your specific workload and performance requirements, you can set different values in your configuration files. For instructions and guidance, see the next topic.

Specify Values for the MAXACTIVETHREADS, THREADSMIN, and THREADSMAX Options

To fine-tune the performance of the metadata server, you can specify values for the following:

The values that you specify override the default configuration settings that are described in About the MAXACTIVETHREADS, THREADSMIN, and THREADSMAX Options.

The following are some examples of situations in which you might want to adjust these settings. You might encounter other situations in which changes are beneficial.

To specify a value for MAXACTIVETHREADS, update the metadata configuration file omaconfig.xml (see Reference Information for omaconfig.xml). To specify values for THREADSMAX and THREADSMIN, update the metadata server's sasv9_usermods.cfg file (see Modifying the Metadata Server Invocation Options). Both of these files are located in the following path:

SAS-configuration-directory\Lev1\SASMeta\MetadataServer

After modifying the configuration files, you must restart the metadata server to enable the changes. The server reads the configuration settings only during initialization.

Previous Page | Next Page | Top of Page