Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Average Page Life Expectancy


Average Page Life Expectancy

Author
Message
Tim Parker
Tim Parker
Old Hand
Old Hand (342 reputation)Old Hand (342 reputation)Old Hand (342 reputation)Old Hand (342 reputation)Old Hand (342 reputation)Old Hand (342 reputation)Old Hand (342 reputation)Old Hand (342 reputation)

Group: General Forum Members
Points: 342 Visits: 460
Comments posted to this topic are about the item Average Page Life Expectancy

:-D
Keith Browning
Keith Browning
Forum Newbie
Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: General Forum Members
Points: 4 Visits: 118
...or you could use perfmon to get the same.
Tim Parker
Tim Parker
Old Hand
Old Hand (342 reputation)Old Hand (342 reputation)Old Hand (342 reputation)Old Hand (342 reputation)Old Hand (342 reputation)Old Hand (342 reputation)Old Hand (342 reputation)Old Hand (342 reputation)

Group: General Forum Members
Points: 342 Visits: 460
Please don't laugh at me, but in my current environment our Network Admin does not allow the DBA's to view Perfmon on our servers. I know in most cases this is not the norm, so this script is redundant for those who have access to Perfmon. Although, for those poor souls who do not have access to Perfmon, then this script will fill the gap.

Thanks for the reply.

:-D
LSCIV
LSCIV
SSC Rookie
SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)

Group: General Forum Members
Points: 25 Visits: 154
Keith Browning (12/1/2010)
...or you could use perfmon to get the same.


True, but there's some overhead with constantly running a perfmon. Just scraping the already collected data from the DMV's is less overhead. We do something similar to this with the Memory Grants Pending metric. That's usually an indicator of memory saturation (ie we're dead in the water), but by itself is not that useful because it's not a predictive metric. It only tells me my server is dead, it doesn't tell me anything prior to the server becoming saturated.

Page Life Expectancy is a decent predictive metric. It's not the end-all-be-all metric for memory consumption, but at least it'll start an investigation which is usually all we need.
alex lam-402929
alex lam-402929
Valued Member
Valued Member (51 reputation)Valued Member (51 reputation)Valued Member (51 reputation)Valued Member (51 reputation)Valued Member (51 reputation)Valued Member (51 reputation)Valued Member (51 reputation)Valued Member (51 reputation)

Group: General Forum Members
Points: 51 Visits: 126
The script did not work on my PC. I found the object_name is 'MSSQL$INST01:Buffer Manager' instead in my PC.
henrik staun poulsen
henrik staun poulsen
SSCommitted
SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)

Group: General Forum Members
Points: 1831 Visits: 1210
The code does not take the instance name into account.
Here is a solution that does.

/******************************************************************************

http://www.sqlservercentral.com/scripts/Performance+Monitoring/71677/

NOTES:
This script provides a sampling of PLE based on (1) minute intervals from
sys.dm_os_performance_counters. Originally written on November 11, 2010
by Tim Parker.
*******************************************************************************/

SET NOCOUNT ON
DECLARE @counter INT --This will be used to iterate the sampling loop for the PLE measure.

SET @counter = 0

BEGIN TRY
DROP TABLE #pleSample
END TRY
begin CATCH
END CATCH

CREATE TABLE #pleSample
(
CaptureTime DATETIME,
PageLifeExpectancy BIGINT
)

WHILE @counter < 30 --Sampling will run approximately 1 minute.
BEGIN
--Captures Page Life Expectancy from sys.dm_os_performance_counters
INSERT INTO #pleSample
(
CaptureTime,
PageLifeExpectancy
)

SELECT CURRENT_TIMESTAMP,
cntr_value
FROM sys.dm_os_performance_counters
WHERE [object_name] LIKE N'%:Buffer Manager%'
AND counter_name = N'Page life expectancy'

SET @counter = @counter + 1
RAISERROR('loop number %i ', 10, 1, @counter) WITH NOWAIT
WAITFOR DELAY '000:00:02'

END

--This query will return the average PLE based on a 1 minute sample.
SELECT RIGHT(CONVERT(VARCHAR(24), DATEADD(SECOND, AVG(PageLifeExpectancy), 0), 113),12) AS 'Average Page Life Expectancy'
FROM #pleSample

DROP TABLE #pleSample







kwiso
kwiso
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
Points: 1 Visits: 13
Tell the adimins that they are aholes as you need to be able to view the perfomance in order to discern the effectiviness of your schema/queries/indexes
if they will not budge go to the upper guys and advise them you need the idera suite for monitoring this will cost quite a bit... If they give it to you you are golden if not then advise you will not be responsible for tuning as the power hungry sys admins are doing their bs power grab again. I was ready for this type of situation and when my network admin replied so what do you want admin rights on the whole system then respond YES I did and having such rights have saved me on several occasions. If that does not work when stuff goes down say you have no access to be able to fix as you are not allowed to view the perfomance as all dbas are.. Then flat out blame the network admin it worked for me



Iwas Bornready
Iwas Bornready
SSCrazy Eights
SSCrazy Eights (8.7K reputation)SSCrazy Eights (8.7K reputation)SSCrazy Eights (8.7K reputation)SSCrazy Eights (8.7K reputation)SSCrazy Eights (8.7K reputation)SSCrazy Eights (8.7K reputation)SSCrazy Eights (8.7K reputation)SSCrazy Eights (8.7K reputation)

Group: General Forum Members
Points: 8664 Visits: 885
Thanks for the script.
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