Showing posts with label Performance_Tuning. Show all posts
Showing posts with label Performance_Tuning. Show all posts

Saturday, December 10, 2011

How to find out how much CPU a SQL Server process is really using

Have you ever think about kpid in SQL Server when you look into sysprocesses system table.Its very useful coloumn when you are dealing with CPU pressure.When you look into the database server you see CPU utilization is very high and the SQL Server process is consuming most of the CPU. You launch SSMS and run sp_who2 and notice that there are a few SPIDs taking a long time to complete and these queries may be causing the high CPU pressure.
At the server level you can only see the overall SQL Server process, but within SQL Server you can see each individual query that is running. Is there a way to tell how much CPU each SQL Server process is consuming? In this article I explain how this can be done.
Find the below tip to get step by step process to identify a particular sql server process which is responsible for CPU pressure.

Tip: How to find out how much CPU a SQL Server process is really using

Saturday, September 18, 2010

Sql Server Perfmon counters for Memory

Here there are few sql server perfmon counters which will tell you about memory bottleneck for your sql server instance.Monitor these counters and compare your value with below given values.

1- Buffer cache hit ratio--

-Indicates how often sql server can get data from the buffer rather than disk.
-Buffer cache hit ratio > 90% for OLAP
-Buffer cache hit ratio > 95% for OLTP

2-Free list stalls/sec--

-The frequeny that requests for database buffer pages are suspended because there's no buffer available.
-Free list stalls/sec < 2
-if value is high that means memory shoud be increase.

3-Free pages--

-The total no of 8k data pages on all free lists
-Free pages > 640

4-Lazy writes/sec--

-The no of times per second that lazy writer moves dirty pages from buffer to disk to free buffer space.
-Lazy writes/sec < 20
-greater value will indicate memory bottleneck.


5-Page Life Expectancy--

-No of seconds a data page stays in the buffer.
-Page Life Expectancy > 300,otherwise memory pressure is at play.

6-Page Lookups/Sec--

-No of requests to find a page in the buffer.
-Page lookups/sec)/(Batch request/sec)<100

7-Page Reads/sec and Page writes/sec--

-no of physical db page reads and writes issued,respectly
-Value should be < 90