You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use the two server memory options, **min server memory** and **max server memory**, to reconfigure the amount of memory (in megabytes) that is managed by the SQL Server Memory Manager for a SQL Server process used by an instance of [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)].
@@ -48,16 +48,15 @@ The server options **min server memory** and **max server memory** can be set to
48
48
> [!NOTE]
49
49
> [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] is not guaranteed to allocate the amount of memory specified in **min server memory**. If the load on the server never requires allocating the amount of memory specified in **min server memory**, [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] will run with less memory.
50
50
51
-
<aname="max_server_memory"></a> Use **max_server_memory** to guarantee the OS does not experience detrimental memory pressure. To set max server memory configuration, monitor overall consumption of the [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] process in order to determine memory requirements. To be more accurate with these calculations for a single instance:
52
-
- From the total OS memory, reserve 1GB-4GB to the OS itself.
53
-
- Then subtract the equivalent of potential [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] memory allocations outside the **max server memory** control, which is comprised of **_stack size <sup>1</sup> \* calculated max worker threads <sup>2</sup> + -g startup parameter <sup>3</sup>_** (or 256MB by default if *-g* is not set). What remains should be the max_server_memory setting for a single instance setup.
54
-
51
+
<aname="max_server_memory"></a> Use **max_server_memory** to guarantee the OS does not experience detrimental memory pressure. To set max server memory configuration, monitor overall consumption of the [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] process in order to determine memory requirements.
52
+
53
+
- From the total OS memory, reserve sufficient for the OS itself.
54
+
- Then subtract the equivalent of potential [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] memory allocations outside the **max server memory** control, which is comprised of **_stack size <sup>1</sup> \* calculated max worker threads <sup>2</sup>. What remains should be the max_server_memory setting for a single instance setup.
55
+
55
56
<sup>1</sup> Refer to the [Memory Management Architecture guide](../../relational-databases/memory-management-architecture-guide.md#stacksizes) for information on thread stack sizes per architecture.
56
57
57
58
<sup>2</sup> Refer to the documentation page on how to [Configure the max worker threads Server Configuration Option](../../database-engine/configure-windows/configure-the-max-worker-threads-server-configuration-option.md), for information on the calculated default worker threads for a given number of affinitized CPUs in the current host.
58
59
59
-
<sup>3</sup> Refer to the documentation page on [Database Engine Service Startup Options](../../database-engine/configure-windows/database-engine-service-startup-options.md) for information on the *-g* startup parameter. Aplicable only to 32-bit [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] ([!INCLUDE[ssVersion2005](../../includes/ssversion2005-md.md)] through [!INCLUDE[ssSQL14](../../includes/sssql14-md.md)]).
60
-
61
60
## How to configure memory options using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)]
62
61
Use the two server memory options, **min server memory** and **max server memory**, to reconfigure the amount of memory (in megabytes) managed by the [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] Memory Manager for an instance of [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)]. By default, [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] can change its memory requirements dynamically based on available system resources.
Copy file name to clipboardExpand all lines: docs/tools/sqlservr-application.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -91,7 +91,7 @@ The following parameters are obsolete and not supported in [!INCLUDE[ssCurrent](
91
91
|Parameter | More information|
92
92
|:-----|:-----|
93
93
|**-h**| In earlier versions of 32-bit instances of [!INCLUDE[ssNoVersion](../includes/ssnoversion-md.md)] to reserve virtual memory address space for Hot Add memory metadata when AWE is enabled. Supported through [!INCLUDE[sssql14](../includes/sssql14-md.md)]. For more information, see [Discontinued SQL Server Features in SQL Server 2016](https://msdn.microsoft.com/library/0678bfbc-5d3f-44f4-89c0-13e8e52404da).|
94
-
|**-g** | *memory_to_reserve*<br/><br>Applies to earlier versions of 32-bit instances of [!INCLUDE[ssNoVersion](../includes/ssnoversion-md.md)]. Supported through [!INCLUDE[sssql14](../includes/sssql14-md.md)]. Specifies an integer number of megabytes (MB) of memory that [!INCLUDE[ssNoVersion](../includes/ssnoversion-md.md)] leaves available for memory allocations within the [!INCLUDE[ssNoVersion](../includes/ssnoversion-md.md)] process, but outside the [!INCLUDE[ssNoVersion](../includes/ssnoversion-md.md)] memory pool. The memory outside of the memory pool is the area used by [!INCLUDE[ssNoVersion](../includes/ssnoversion-md.md)] for loading items such as extended procedure `.dll` files, the OLE DB providers referenced by distributed queries, and automation objects referenced in [!INCLUDE[tsql](../includes/tsql-md.md)] statements. The default is 256 MB.<br/><br>Use of this option may help tune memory allocation, but only when physical memory exceeds the configured limit set by the operating system on virtual memory available to applications. Use of this option may be appropriate in large memory configurations in which the memory usage requirements of [!INCLUDE[ssNoVersion](../includes/ssnoversion-md.md)] are atypical and the virtual address space of the [!INCLUDE[ssNoVersion](../includes/ssnoversion-md.md)] process is totally in use. Incorrect use of this option can lead to conditions under which an instance of [!INCLUDE[ssNoVersion](../includes/ssnoversion-md.md)] may not start or may encounter run-time errors.<br/><br>Use the default for the **-g** parameter unless you see any of the following warnings in the [!INCLUDE[ssNoVersion](../includes/ssnoversion-md.md)] error log:<br/><br>`Failed Virtual Allocate Bytes: FAIL_VIRTUAL_RESERVE \<size>`"<br/><br>`Failed Virtual Allocate Bytes: FAIL_VIRTUAL_COMMIT \<size>`<br/><br>These messages may indicate that [!INCLUDE[ssNoVersion](../includes/ssnoversion-md.md)] is trying to free parts of the [!INCLUDE[ssNoVersion](../includes/ssnoversion-md.md)] memory pool in order to find space for items such as extended stored procedure .dll files or automation objects. In this case, consider increasing the amount of memory reserved by the **-g** switch. <br/><br>Using a value lower than the default increases the amount of memory available to the buffer pool and thread stacks; this may, in turn, provide some performance benefit to memory-intensive workloads in systems that do not use many extended stored procedures, distributed queries, or automation objects.|
94
+
|**-g**|*memory_to_reserve*<br/><br>Applies to earlier versions of 32-bit instances of [!INCLUDE[ssNoVersion](../includes/ssnoversion-md.md)]. Supported through [!INCLUDE[sssql14](../includes/sssql14-md.md)]. Specifies an integer number of megabytes (MB) of memory that [!INCLUDE[ssNoVersion](../includes/ssnoversion-md.md)] leaves available for memory allocations within the [!INCLUDE[ssNoVersion](../includes/ssnoversion-md.md)] process, but outside the [!INCLUDE[ssNoVersion](../includes/ssnoversion-md.md)] memory pool.|
0 commit comments