Configuration Flags

Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2

HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib

Data type Range Default value

REG_DWORD

0x0–0x1F

0x10

Description

Regulates the run-time test feature of the performance counter dynamic-link library (DLL).

The Performance Library (Perflib) tests performance counter DLLs whenever you select a performance counter in System Monitor or in a similar performance tool. It performs these reliability tests to identify and eliminate defective counter DLLs. A defective counter DLL can harm your Windows Server 2003 performance tools, preventing them from displaying any performance data and, in some cases, causing errors that shut down the system and start Dr. Watson for Windows.

Perflib can perform tests to detect the following errors:

  • Slow procedure calls (non-trusted counter DLLs only).

  • Data buffer alignment errors.

  • Buffer integrity errors.

  • Function errors.

  • Program exceptions (critical).

The value of this entry determines which tests Perflib runs on trusted and non-trusted performance counter DLLs. It also determines how Perflib responds when a counter DLL fails a test. Perflib always records an error in the Application Log in Event Viewer (Source = Perflib). However, it can also disable the counter DLL so that the counters are not displayed in any performance tool until you manually re-enable the DLL.

By default, Perflib uses these test guidelines:

  • Time the procedure calls of non-trusted counter DLLs. If a procedure call is slow, then record a message in the Application Log.

  • Test trusted and non-trusted counter DLLs for data buffer alignment errors. If a counter DLL fails the test, then record a message in the Application Log.

  • Thoroughly test the integrity of buffers that non-trusted counter DLLs return. If a counter fails the test, then disable the counter.

  • Do not test the integrity of buffers that trusted counter DLLs return, unless the value of the ExtCounterTestLevel entry specifies otherwise. If a counter DLL fails a test that the ExtCounterTestLevel entry requires, then disable the counter.

  • Detect errors in the function calls of trusted and non-trusted counter DLLs. If an error is detected, then record a message in the Application Log.

  • Detect program exceptions in the function calls of trusted and non-trusted counter DLLs. If a DLL generates an exception, then disable the counters.

The value of this entry is a bitmask that you can use to change the default behavior. By default, only bit 0x10 (10000) is set. To select a behavior, either set the bit representing that behavior to 1, or sum the values of all desired bits. For example, to prevent Perflib from testing for data buffer alignment (1 binary) and from disabling counters (10 binary), set the value of this entry to 0x3 (11 binary).

Bit value Test setting

0x0

Use default test behavior.

0x1 (1 binary)

Do not test for data buffer alignment errors. (These are common errors that are not usually critical.) Perform all other tests.

0x2 (10 binary)

Do not disable counters. Perform all tests, but if a counter generates a function error or a program exception, record a message in the Application Log.

0x4 (100 binary)

Do not time procedure calls or perform buffer integrity tests. When set, the ExtCounterTestLevel entry and the entries that define a slow procedure call (see Notes below) are ignored.

0x8 (1000 binary)

Disable counters if their procedure calls are slow. (Non-trusted counter DLLs only.)

0x10 (10000 binary)

Collect debugging data.

This entry does not exist in the registry by default. You can add it by using the registry editor Regedit.exe.

Activation Method

To make changes to this entry effective, either restart the Remote Registry Service or restart Windows.

Notes

  • Bit 0x2 (10) takes precedence over bit 0x8 (1000). If bit 0x2 is set, then Perflib does not disable performance counters.

  • Perflib disables a counter by setting the value of the Disable Performance Counters entry for that service to 1. After you have repaired or replaced the counter DLL, you must re-enable it manually by changing the value of Disable Performance Counters to 1.

  • Perflib does not time the procedure calls of trusted counters. To determine whether the procedure call of a non-trusted counter is abnormally slow, Perflib uses the standards established by the values of the OpenProcedureWaitTime, Open Timeout, and Collect Timeout entries.

Tip

  • If particular performance counters do not appear in your performance counter display tool, check the Application Log in Event Viewer for events recorded by Perflib.

Caution

  • Run-time tests can perceptibly delay the appearance of performance data, but they protect the system's monitoring capability.

See Also

Concepts

EventLogLevel Entry
Disable Performance Counters
ExtCounterTestLevel