Edit

Server configuration: max lock manager cache memory (%)

Applies to: SQL Server 2025 (17.x) and later versions

The max lock manager cache memory (%) server configuration option limits the amount of memory that the lock manager cache can use, as a percentage of the total SQLOS committed memory. By default, the configuration is set to 20 percent.

Availability

This configuration option is available in the following SQL platforms and versions:

  • SQL Server 2025 (17.x) Cumulative Update (CU) 5 and later versions

Remarks

Before SQL Server 2025 (17.x) CU 5 and in previous versions of SQL Server, the lock manager cache can use up to 60 percent of the total SQLOS committed memory. In rare cases, a workload can grow the size of the lock manager cache up to the limit, which reduces buffer pool memory. For example, this situation can occur in large concurrent query workloads when lock escalation is disabled for the Database Engine instance.

In SQL Server 2025 (17.x) CU 5 and later versions, the maximum size of lock manager cache is limited to 20 percent by default. Setting this configuration to a larger value isn't recommended, but is supported for backward compatibility. You can set the value in the 20-60 percent range.

You can monitor the memory consumption by the lock manager cache using sys.dm_os_memory_clerks, with OBJECTSTORE_LOCK_MANAGER as the memory clerk type.

Examples

A. Set the maximum size of the lock manager cache memory

The following example sets the max lock manager cache memory to 25 percent:

EXECUTE sp_configure 'show advanced options', 1;
RECONFIGURE;

EXECUTE sp_configure 'max lock manager cache memory (%)', 25;
RECONFIGURE;

B. Monitor the current size of the lock manager cache

The following example shows the current size of the lock manager cache:

SELECT SUM(pages_kb) / 1024. AS lock_manager_cache_memory_mb
FROM sys.dm_os_memory_clerks
WHERE type = 'OBJECTSTORE_LOCK_MANAGER';