Enable awe memory for SQL Server.

Source: Internet
Author: User
Tags server error log sql server management studio

Today, I suddenly want to take a closer look at awe, so I checked it on Microsoft's website and put it here by the way.

Address Window Extensions (AWE) Allow 32-bit operating systems to access a large amount of memory. Awe is provided by the operating system and is implemented in a slightly different way on Microsoft Windows 2000 Server and Windows Server 2003. You can use the awe enabled option to enable awe.

Use awe ing memory in Windows 2000 Server

The Microsoft SQL Server 2000 instance running on Windows 2005 allocates memory according to the following sequence of events during SQL server startup:

  • Awe cannot be activated if the available physical memory is smaller than the virtual address space in user mode. In this case, SQL Server runs in non-Awe mode, regardlessAwe EnabledOptions.
  • If the available physical memory is larger than the virtual address space in user mode, awe can be activated.
    • If the available physical memory is greaterMax Server MemoryOption value. The SQL server instance is locked.Max Server MemoryThe amount of memory specified in.
    • If the available physical memory is lessMax Server MemoryOption value or if not setMax Server MemoryOption, the SQL server instance leaves only 256 MB While locking all remaining available memory.
  • Once allocated, the awe ing memory cannot be released unless SQL Server is disabled.
Configure memory options

It is strongly recommended thatMax Server MemorySet a value. IfAwe EnabledSet1(And the available physical memory is greater than the user mode process space), after the server is started, the SQL Server 2000 instance running in Windows 2005 will lock almost all available memory (orMax Server MemoryIf this option is set ). If you have not setMax Server Memory, The available physical memory of other applications or SQL Server instances will be less than 128 MB.

The awe ing Memory Pool cannot be swapped out to paging system files. If you need to use additional physical memory, windows must switch out other applications, which may affect the performance of those applications.

If you do not want to affect the performance of other applications, configureMax Server MemorySet aside additional available memory for the occasional needs of other applications and operating systems. You can determine the amount of memory that can be safely allocated to the SQL server instance by learning how much memory is available after all other applications on the computer start.

Note:
In Windows 2000 Server, SQL Server awe ignoresMin Server Memory.

 

 

Use SQL Server Performance MonitorTotal server memory (KB)The counter can determine the amount of memory allocated by the SQL server instance running in awe mode.SysperfinfoSelect memory usage to determine the amount of memory allocated by the instance.

For more information, see monitor memory usage.

Use awe to run multiple SQL Server instances

If the server is running Windows 2000, you must setMax Server Memory. Since SQL Server 2000 running on Windows 2005 does not support dynamic allocation of AWE ing memory, we recommend that you setMax Server Memory.

All instancesMax Server MemoryThe sum of values should be less than the total physical memory of the computer. If the sum is greater than the total physical memory, some instances may not be started, or the memory used is lessMax Server MemorySet the specified memory size. For example, assume that a computer has 16 GB of physical memory and three SQL Server 2005 instances are installed on the computer. In additionMax Server MemorySet to 8 GB. If you stop and restart all three instances, the memory allocation is as follows:

  1. The first instance uses 8 GB physical memory.
  2. The second instance will start, but the physical memory used will be slightly lower than 8 GB (up to 128 MB ).
  3. The third instance starts in dynamic memory mode and uses 256 MB physical memory or less physical memory.

For more information, see manage memory for large databases.

Use awe ing memory in Windows Server 2003

In Windows Server 2003, SQL Server 2005 supports dynamic allocation of AWE memory. During startup, SQL Server only retains a small part of AWE ing memory. When an additional awe ing memory is required, the operating system dynamically allocates it to SQL Server. Similarly, if less resources are required, SQL Server can return the awe ing memory to the operating system for other processes or applications. RelatedAwe EnabledFor more information about the configuration options, see awe enabled options.

Windows Server 2003 series supports an increase in the amount of physical memory. The physical memory available for awe depends on the operating system you are using. The following list lists the maximum physical memory that can be used by each Windows Server 2003 operating system during write operations.

  • Windows Server 2003 Standard Edition supports up to 4 GB of physical memory.
  • Windows Server 2003 Enterprise Edition supports up to 32 GB physical memory.
  • Windows Server 2003 datacenter edition supports up to 64 GB physical memory.
Configure memory options

When running SQL Server 2005 on any Windows Server 2003 operating system version, awe ing memory is dynamically allocated. In other words, the buffer pool can dynamically manage the awe ing memory (inMin Server MemoryAndMax Server MemoryTo balance the SQL server memory usage according to the overall system requirements.

After awe is enabled, SQL Server 2005 always tries to use the awe ing memory. This applies to all memory configurations, including configurations to computers that are provided to an application in address space less than 3 GB.

  • We recommend that you set awe to the default memory mode of SQL Server 2003 running on Windows Server 2005. The hot memory addition function requires that awe be enabled during SQL server startup. For more information, see add hot memory.
Note:
Awe cannot be configured on a 64-bit operating system.

 

 

  • Because the supported awe ing memory capacity is less than 3 GB, it can be defined within the physical memory range.Min Server MemoryAndMax Server MemoryOr use the default values of these two options.
  • You can consider setting the SQL ServerMax Server MemoryTo ensure that other memory can be used for other applications running on the computer. Although SQL server can dynamically release the awe ing memory, the amount of allocated awe ing memory cannot be swapped out of page files.

To enable awe for an SQL Server 2005 instance, useSp_configureSetAwe EnabledOption1And then restart SQL Server.

RelatedMin Server MemoryAndMax Server MemoryFor more information, see server memory options.

Before enabling awe, you must first configure "lock Memory Page" Policy. For more information, see How to enable the "Lock Pages In Memory" option (Windows ).

Example

The following example shows how to activate awe andMin Server MemoryConfiguration1GB limit, which isMax Server MemoryConfiguration6GB limit.

First, configure awe:

Copy code

sp_configure 'show advanced options', 1            RECONFIGURE            GO            sp_configure 'awe enabled', 1            RECONFIGURE            GO

After you restart SQL Server, the following messages are written to the SQL Server Error Log: "address window extension enabled ."

Then, configure the memory:

Copy code

sp_configure 'min server memory', 1024            RECONFIGURE            GO            sp_configure 'max server memory', 6144            RECONFIGURE            GO

In this example, the memory sets the boot buffer pool to dynamically manage the awe ing memory between 1 GB and 6 GB. If other applications require additional memory, SQL Server can release allocated awe ing memory that is no longer needed. In this example, the awe ing memory can be released at most 1 GB.

If you add additional memory to a computer that supports hot memory addition, SQL Server can also use dynamic awe memory to increase the memory. Hot-added memory can be used for Windows Server 2003 Enterprise Edition and datacenter edition, allowing computers to add memory at runtime. For example, assume that SQL Server 2003 running on Windows Server 2005 Enterprise Edition is started on a computer with 16 GB physical memory. Configure the operating system to restrict applications from using 2 GB of virtual memory address space, and activate awe on SQL Server. Later, the system administrator needs to add 16 GB of memory when the computer is running. SQL Server 2005 immediately recognizes the added memory and can use it if necessary.

For more information about how to use awe, see the Windows Server 2003 documentation.

Use awe to run multiple SQL Server instances

If you run multiple SQL Server 2005 instances on the same computer and each instance uses awe ing memory, ensure that these instances are executed as expected.

If the server is running Windows Server 2003, you must setMin Server Memory. Since SQL Server 2003 running on Windows Server 2005 supports dynamic awe ing memory management, we recommend that you setMin Server Memory. Because the awe ing memory cannot swap out page filesMin Server MemoryThe sum of values should be less than the total physical memory on the computer.

At startup,Min Server MemoryDoes not force SQL Server to obtain the minimum amount of memory. Allocate memory on demand based on database workload. HoweverMin Server MemoryAfter the threshold value, if the memory reserved by SQL Server is less than this amount, SQL server will not release the memory. Therefore, make sure that the memory allocated to each instance is at least equalMin Server MemoryValue. We recommend that you load the database server immediately after startup. When the server runs normally, the available memory of each instance changes at any time, but it is never smallerMin Server MemoryValue.

ConfigurableMax Server MemoryOr leave this option as the default setting. SetMax Server MemoryIf the default value is retained, the SQL server instance will compete for memory.

Use awe and Failover clusters together

If you are using an SQL Server 2005 failover cluster and awe memory, make sure thatMax Server MemoryThe sum of settings is smaller than the minimum physical memory available on any server in the Failover group. If the physical memory of the Failover node is smaller than the memory on the original node, the SQL Server 2005 instance may fail to start, or the instance may start when the memory is smaller than the memory on the original node.

See

Task

How to configure the awe enabled option (SQL Server Management studio)
Concept

Use awe
Memory Management for Large Databases
Memory architecture

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.