Thor Logo dbatools

MaxMemory

Get-DbaMaxMemory

Chrissy LeMaire (@cl), netnerds.net

Get-DbaMaxMemory View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Retrieves SQL Server max memory configuration and compares it to total physical server memory Description This command retrieves the SQL Server ‘Max Server Memory’ configuration setting alongside the total physical memory installed on the server. This comparison helps identify potential memory configuration issues that can impact SQL Server performance. Use this function to audit memory settings across your environment, troubleshoot performance issues related to memory pressure, or verify that SQL Server isn’t configured to use more memory than physically available.

Read more

Set-DbaMaxMemory

Chrissy LeMaire (@cl), netnerds.net

Set-DbaMaxMemory View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Configures SQL Server ‘Max Server Memory’ setting using calculated recommendations or explicit values Description Modifies the SQL Server ‘Max Server Memory’ configuration to prevent SQL Server from consuming all available system memory. This setting controls how much memory SQL Server can allocate for its buffer pool and other memory consumers, leaving adequate memory for the operating system and other applications.

Read more

Test-DbaMaxMemory

Chrissy LeMaire (@cl), netnerds.net

Test-DbaMaxMemory View Source Chrissy LeMaire (@cl), netnerds.net Windows, Linux, macOS Synopsis Calculates recommended SQL Server max memory settings to prevent OS memory pressure and optimize performance. Description Analyzes server memory and SQL Server instances to calculate optimal max memory configuration settings. Uses a tiered algorithm that reserves appropriate memory for the operating system based on total server memory, accounting for multiple SQL instances and other SQL services like SSAS, SSRS, or SSIS.

Read more