SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Enabling LPIM and AWE


Enabling LPIM and AWE

Author
Message
GilaMonster
GilaMonster
SSC Guru
SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)

Group: General Forum Members
Points: 86352 Visits: 45232
mlwiller2 (4/14/2014)
So is LPIM not a requirement for AWE to function (just a recommendation)?


It is a requirement.

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


mlwiller2
mlwiller2
SSC Rookie
SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)

Group: General Forum Members
Points: 41 Visits: 37
I got "0 rows effected." I'm going to upgrade to SP4 on my test VM to see if that could be the issue. If I'm running SQL using the system account I shouldn't need to adjust the user roles right?
GilaMonster
GilaMonster
SSC Guru
SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)

Group: General Forum Members
Points: 86352 Visits: 45232
sqlbuddy123 (4/14/2014)
I'm not sure why MS interlinked both of these settings.


Because they're very tightly linked.

AWE memory is allocated using the AllocPhysicalMemory API call (I'll get you the actual API function name if you want). Only applications with the locked pages in memory privilege have permission to call the AllocPhysicalMemory API

Hence just enabling AWE tells SQL to please use the AllocPhysicalMemory API call instead of VirtualAlloc, but unless you enable locked pages in memory, the SQL process does not have permission to call that API.

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


sqlbuddy123
sqlbuddy123
SSCrazy
SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)

Group: General Forum Members
Points: 2340 Visits: 2243
GilaMonster (4/14/2014)
sqlbuddy123 (4/14/2014)
I'm not sure why MS interlinked both of these settings.


Because they're very tightly linked.

AWE memory is allocated using the AllocPhysicalMemory API call (I'll get you the actual API function name if you want). Only applications with the locked pages in memory privilege have permission to call the AllocPhysicalMemory API

Hence just enabling AWE tells SQL to please use the AllocPhysicalMemory API call instead of VirtualAlloc, but unless you enable locked pages in memory, the SQL process does not have permission to call that API.


Thanks Gail. It's bit weird bcs they both do different functions and still MS interlinks them.

--
SQLBuddy
GilaMonster
GilaMonster
SSC Guru
SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)

Group: General Forum Members
Points: 86352 Visits: 45232
sqlbuddy123 (4/14/2014)
It's bit weird bcs they both do different functions and still MS interlinks them.


No, they don't do different things. MS interlinks them because they're actually the same thing under the hood.

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


sqlbuddy123
sqlbuddy123
SSCrazy
SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)

Group: General Forum Members
Points: 2340 Visits: 2243
GilaMonster (4/14/2014)
sqlbuddy123 (4/14/2014)
It's bit weird bcs they both do different functions and still MS interlinks them.


No, they don't do different things. MS interlinks them because they're actually the same thing under the hood.


LPIM locks the SQL Server Pages. AWE extends the SQL Server memory. How are they related ?

--
SQLBuddy
GilaMonster
GilaMonster
SSC Guru
SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)

Group: General Forum Members
Points: 86352 Visits: 45232
I just explained that

AWE memory is allocated using the AllocPhysicalMemory API call (I'll get you the actual API function name if you want). Only applications with the locked pages in memory privilege have permission to call the AllocPhysicalMemory API

Hence just enabling AWE tells SQL to please use the AllocPhysicalMemory API call instead of VirtualAlloc, but unless you enable locked pages in memory, the SQL process does not have permission to call that API.


Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


sqlbuddy123
sqlbuddy123
SSCrazy
SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)

Group: General Forum Members
Points: 2340 Visits: 2243
My question was Why is this dependency and how can this be justified ?

GilaMonster (4/14/2014) Only applications with the locked pages in memory privilege have permission to call the AllocPhysicalMemory API


--
SQLBuddy
Perry Whittle
Perry Whittle
SSCoach
SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)

Group: General Forum Members
Points: 19738 Visits: 17239
mlwiller2 (4/14/2014)
But yeah its x86. Both SQL (standard) and windows server 2003 (standard) are 32bit versions.

Unfortunately, with Windows 2003 Standard 32 bit the OS will not support more than 4GB RAM, you would need to upgrade to Windows 2003 Enterprise edition 32 bit or higher.

-----------------------------------------------------------------------------------------------------------

"Ya can't make an omelette without breaking just a few eggs" ;-)
GilaMonster
GilaMonster
SSC Guru
SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)SSC Guru (86K reputation)

Group: General Forum Members
Points: 86352 Visits: 45232
sqlbuddy123 (4/14/2014)
My question was Why is this dependency and how can this be justified ?


When the Windows Engineers were working initially on AWE for 32-bit processes they implemented it with a different API call so that only apps which knew how to handle the higher address spaces could use it, and because it's not going through the virtual memory manager, memory allocated with that API couldn't be paged out. So any memory allocated with the AWE APIs was locked in memory and required a special permission before an app could use it (you're bypassing some of Window's memory management, that's something which has to be explicitly granted to a process)

Later on, that 'can't be paged out' became a feature in itself and so the AWE memory allocation mechanism became use for preventing paging out, rather than it's original usage of allowing access to memory above the 4GB limit of 32-bit process address space and after the switch to 64-bit happened, there was no longer a need to accessing memory above what the process's address space could map (it's a ridiculously large number for a 64-bit process) and so the AWE APIs became solely for allocating memory which can't be paged out.

When you grant a process 'locked pages in memory', it uses the AWE APIs to allocate memory. It's not a dependency, the two are intricately linked. One is the API used, one is a permission required to use that API.

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search