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


Sudden PLE Drop Possible Without Memory Pressure?


Sudden PLE Drop Possible Without Memory Pressure?

Author
Message
timothy.lazarus
timothy.lazarus
Forum Newbie
Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: General Forum Members
Points: 3 Visits: 10
My SQL Server is a virtual machine, running on ESX 4.1 and configured as follows:

- 28GB of Memory, 21500 configured in Max Server Memory
- Reservation is set in vcenter to 28GB, so there should be no balloon driver issues
- SQL Service is configured for lock pages in memory
- According to sys.dm_os_performance_counters, Target Server Memory and Total Server Memory are equal, at 537600KB, i.e. approximately 5GB
- Optimize for Ad Hoc Workflows is enabled

I know that the Page Life Expectancy value itself isn't necessarily important, but rather the overall PLE trend. We've had sudden drops in it lately during periods of heavy use of one of our web sites using the server as a backend. During the drops, performance in one of our critical web applications slows to a crawl. What I don't understand, is why SQL is only using 5GB of memory if it has 21.5GB available to it. Shouldn't it be caching as much as possible in the buffer pool? It was my understanding that SQL would take as much memory as it could, but this doesn't seem to be the case. The general consensus on the net seems to be that adding memory to a server is a quick and dirty way of working around PLE issues caused by poorly written queries, but if the server is only using a fraction of the memory available to it, why would increasing the memory help?

Thanks,
Tim
timothy.lazarus
timothy.lazarus
Forum Newbie
Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: General Forum Members
Points: 3 Visits: 10
Okay, after reading through everything I could get my hands on regarding SQL memory, I think I've identified the culprit. Per VMware's recommendation, I had enabled large page allocation. However, what they fail to mention is that one very large consequence of this is that dynamic allocation of memory to the buffer pool is disabled, and that what SQL can allocate at startup is what you get. It looks like my instance of SQL Server was only able to grab enough memory to allocate 5GB to the buffer pool, hence the odd looking values in the DMVs. When I disabled Large Page Allocation and restarted SQL, the amount of memory being used by SQL climbed to the max, and the buffer pool almost tripled in size.

Guess I learned a lot today Smile
Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (114K reputation)SSC Guru (114K reputation)SSC Guru (114K reputation)SSC Guru (114K reputation)SSC Guru (114K reputation)SSC Guru (114K reputation)SSC Guru (114K reputation)SSC Guru (114K reputation)

Group: General Forum Members
Points: 114945 Visits: 41399
timothy.lazarus (3/9/2014)
Okay, after reading through everything I could get my hands on regarding SQL memory, I think I've identified the culprit. Per VMware's recommendation, I had enabled large page allocation. However, what they fail to mention is that one very large consequence of this is that dynamic allocation of memory to the buffer pool is disabled, and that what SQL can allocate at startup is what you get. It looks like my instance of SQL Server was only able to grab enough memory to allocate 5GB to the buffer pool, hence the odd looking values in the DMVs. When I disabled Large Page Allocation and restarted SQL, the amount of memory being used by SQL climbed to the max, and the buffer pool almost tripled in size.

Guess I learned a lot today Smile


Thanks to your post, I did, too! Thank you for taking the time. I really appreciate it.

--Jeff Moden

RBAR is pronounced ree-bar and is a Modenism for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
GilaMonster
GilaMonster
SSC Guru
SSC Guru (114K reputation)SSC Guru (114K reputation)SSC Guru (114K reputation)SSC Guru (114K reputation)SSC Guru (114K reputation)SSC Guru (114K reputation)SSC Guru (114K reputation)SSC Guru (114K reputation)

Group: General Forum Members
Points: 114680 Visits: 45506
The technical details on large page allocation: http://blogs.msdn.com/b/psssql/archive/2009/06/05/sql-server-and-large-pages-explained.aspx

The two limitations with large page allocations are that the memory must be contiguous and that the memory allocation is static once allocated (no more memory can be allocated or released). If there are other things allocating memory you can easily end up with multiple chunks of memory that combined exceed SQL's max server memory, but are each much smaller. This is almost expected with later OSs, because they randomise the memory addresses for apps and kernal code to avoid some overflow attacks.

The contiguous requirement can mean that SQL takes quite some time to start and once it has, it's got much less memory than it's allowed to use.

To be honest, large page allocations is not something I would generally recommend.

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


timothy.lazarus
timothy.lazarus
Forum Newbie
Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: General Forum Members
Points: 3 Visits: 10
Thanks - after I read that yesterday, I had a sudden ah ha moment. I would definitely agree that if asked now, I wouldn't recommend it either.
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