Understanding AWE

  • 16 GB RAM. We use /3GB. Then how much is remaining for OS? I think that this should be 13 GB. Some ppl say that OS has 1 GB now.

    If AWE is enabled when there is 16 GB RAM. Then how much is there for OS. This should be seen from max server memory. If max server memory is set up as 12.5 GB then 3.5GB(16-12.5) is remained for OS.

    -MJ
    Please do not print mails and docx unless it is absolutely necessary. Spread environmental awareness.

  • You are probably better turning off /3Gb switch with that much memory. Why force the OS to only 1Gb?

    ps. Every Microsoft SQL Server engineer I have spoken to has recommended against using /3Gb (unless you are running Windows 2000 or have a server that needs very few drivers to run). Operating systems can experience memory pressure also, and 1Gb is not much RAM to run any operating system...

  • If your limiting the SQL instance to only use X amount of memory though then the OS will happily take more than 1gb RAM.

  • David,

    Do you mean irrespective of how much RAM we have available, if we turn /3GB on then only 1 GB would be available for OS?

    I have two questions in my post. Can anyone of you answer me in numbers as how much memory? I just want to brush up my understanding that as how much amount of memory would be available for OS. Thanks in advance.

    -MJ
    Please do not print mails and docx unless it is absolutely necessary. Spread environmental awareness.

  • Michael,

    It may not be the case if you have that much memory...but most people only enable /3GB if they have 4Gb RAM and want SQL to address more than the typical 1.7Gb SQL Server consumes. This has to do with maximum 2Gb addressable by 32 bit windows applications.

    In your case, with 16Gb- there is no need for 3Gb as I understand it. Better of googling it- there are plenty of Microsoft KBs that go into technical detail.

    Just look at the total server memory and target server memory in perfmon as well as DBCC MEMORYSTATUS to see how much memory SQL is actually using. It does get complex when you throw virtual memory into the equation, but I would just set the maximum memory in SQL (to around 13Gb) and let Windows take care of how much memory it needs.

  • David,

    The catch is that 32 bit sql server would be able to address 4 GB at the max irrespective of whatever 13 or 14 GB we allot to this. Then why we really bother to allot > 4GB memory to sql server by using AWE etc.:cool:

    -MJ
    Please do not print mails and docx unless it is absolutely necessary. Spread environmental awareness.

  • David,

    The catch is that 32 bit sql server would be able to address 4 GB at the max irrespective of whatever 13 or 14 GB we allot to this. Then why we really bother to allot > 4GB memory to sql server by using AWE etc.:cool:

    -MJ
    Please do not print mails and docx unless it is absolutely necessary. Spread environmental awareness.

  • I'm not sure what you mean...SQL can address more than 4Gb with AWE (not without caveats).

    My point is, most people will only run SQL on the server. If you have 16Gb RAM, set the SQL max memory to 13 or 14Gb and you will see SQL use around 13Gb (mainly via AWE).

    If that is the case, there will be a couple of Gb available for the operating system etc and you don't need to worry about managing memory.

  • Good. Read my post again pls. 32 bit => 4 GB. This can't address more than 4 GB.

    Yes 64 GB can address 4 GB. Did you get my point. This is simple mathematics. I want to discuss on this point only.

    -MJ
    Please do not print mails and docx unless it is absolutely necessary. Spread environmental awareness.

  • If you have AWE enabled, then set min and max, the amount of memory remaining for the OS would be the remaining after the max. When SQL starts up it will not grab the max amount of memory at startup, this is simply the most memory SQL will take for itself as the workload increases. If SQL gets to the max amount then the OS has what is left (Total - Max = remaining memory for OS). If the OS needs more RAM however it will request SQL to relinquish memory from its control so the OS can use it. It will release memory till it reaches the min set in AWE.

    So if I enable AWE with 16GB total RAM in the physical server. Max = 12.5GB, Min = 1GB. Then you would have 3.5GB remaining reserved for OS and/or other applications running on the server. However if the OS needs more RAM it request SQL to release memory. SQL will release memory till it reaches the 1GB minimum. Again SQL will only use the amount of RAM it needs to operate in with the min and max setting.

    This is a good article that gives a brief overview of configuring memory that may be easier to read that how I put it: http://searchsqlserver.techtarget.com/tip/0,289483,sid87_gci1299068_tax301238_mem1,00.html

    Shawn Melton
    Twitter: @wsmelton
    Blog: wsmelton.github.com
    Github: wsmelton

  • By default AWE will be allocated with complete amount of Ram in MB's. If we restrict that much it will usew for sql server and remaining it will allow for OS.

    Artical :- http://support.microsoft.com/kb/274750

  • I'm not sure I get your point Michael.

    I guess, in simplicity SQL cannot address more than 2Gb memory (in 32 bit OS). AWE is in effect tricking SQL Server to use multiple chunks of 2Gb allocations...

  • What you need to determine is what operating system you're running. If you're running a 64-bit OS then that will be able to address all of the 16GB of RAM (assuming you're running on Windows Server 2003), and you wont need the /3GB switch.

    However, if your OS is only 32-bit, then if you're running a Standard edition of Windows it wont matter how much memory you put in your server, the OS (and for that matter any applications on the server, including SQL) will not be able to access the additional memory.

    If your OS is at least Windows Server 2003 Enterprise Edition 32-bit then you can address up to 32GB of RAM, and then we can look at configuring SQL to access more memory.

    See this link for more details (which probably explains it a bit better):

    http://msdn.microsoft.com/en-us/library/aa366778(VS.85).aspx#physical_memory_limits_windows_server_2003

    Can you let us know what operating system your server is running and then we can advise on how you can configure SQL to access more memory.

    For reference, the /3GB switch is only useful in 32-bit systems with 4GB RAM. By default the virtual address space for applications is 2GB. The /3GB switch enables such applictions to address up to 3GB, leaving the OS with the remaining 1GB (which should be enough). Here's a good explanation:

    http://blogs.msdn.com/oldnewthing/archive/2004/08/05/208908.aspx

  • Simple Formula: 32 Bit OS

    If your system has 4 GB and 16 GB - use /PAE + AWE

    Check out this link

    http://blogs.technet.com/vipulshah/archive/2007/05/10/3gb-pae-and-awe-on-32-bit-systems.aspx

  • One great confusion guys. Take a scenario where we have 8 GB memory. My OS is 32 bit and sql server application is also 32 bit.

    Sql server application will be able to address 4 GB and OS will be able to address 4 GB. So if we have 8GB and then both can address complete memory.

    Infact 32 bit CPU can address 4 GB at the max. If there are dual processor then OS can use 1 CPU and another application can use another CPU. This goes like this:

    Sql server Application: CPU1

    Operating System : CPU2

    CPU1 addresses 4 GB and CPU2 will also address 4 GB. Now if I make sure that the /3GB switch is on then SQL can address 3 GB as this is 32 bit while OS will be able to take advantage of 5 GB where it can address 4 GB RAM.

    Am I confused or my concepts are perfect? Request you to please read this completely before you shoot any reply.

    -MJ
    Please do not print mails and docx unless it is absolutely necessary. Spread environmental awareness.

Viewing 15 posts - 1 through 15 (of 17 total)

You must be logged in to reply to this topic. Login to reply