Clarity

  • 1.  Top 10 SQL Server Counters for Monitoring SQL Server Performance

    Broadcom Employee
    Posted Aug 22, 2013 02:35 PM
    Do you have a list of SQL Server Counters you review when monitoring your SQL Server environment? Counters allow you a method to measure current performance, as well as performance over time. Identifying the metrics you like to use to measure SQL Server performance and collecting them over time gives you a quick and easy way to identify SQL Server problems, as well as graph your performance trend over time.
    Below is my top 10 list of SQL Server counters in no particular order. For each counter I have described what it is, and in some cases I have described the ideal value of these counters. This list should give you a starting point for developing the metrics you want to use to measure database performance in your SQL Server environment.

    1. SQLServer: Buffer Manager: Buffer cache hit ratio
    The buffer cache hit ratio counter represents how often SQL Server is able to find data pages in its buffer cache when a query needs a data page. The higher this number the better, because it means SQL Server was able to get data for queries out of memory instead of reading from disk. You want this number to be as close to 100 as possible. Having this counter at 100 means that 100% of the time SQL Server has found the needed data pages in memory. A low buffer cache hit ratio could indicate a memory problem.

    2. SQLServer: Buffer Manager: Page life expectancy
    The page life expectancy counter measures how long pages stay in the buffer cache in seconds. The longer a page stays in memory, the more likely SQL Server will not need to read from disk to resolve a query. You should watch this counter over time to determine a baseline for what is normal in your database environment. Some say anything below 300 (or 5 minutes) means you might need additional memory.

    3. SQLServer: SQL Statistics: Batch Requests/Sec
    Batch Requests/Sec measures the number of batches SQL Server is receiving per second. This counter is a good indicator of how much activity is being processed by your SQL Server box. The higher the number, the more queries are being executed on your box. Like many counters, there is no single number that can be used universally to indicate your machine is too busy. Today’s machines are getting more and more powerful all the time and therefore can process more batch requests per second. You should review this counter over time to determine a baseline number for your environment.

    4. SQLServer: SQL Statistics: SQL Compilations/Sec
    The SQL Compilations/Sec measure the number of times SQL Server compiles an execution plan per second. Compiling an execution plan is a resource-intensive operation. Compilations/Sec should be compared with the number of Batch Requests/Sec to get an indication of whether or not complications might be hurting your performance. To do that, divide the number of batch requests by the number of compiles per second to give you a ratio of the number of batches executed per compile. Ideally you want to have one compile per every 10 batch requests.

    5. SQLServer: SQL Statistics: SQL Re-Compilations/Sec
    When the execution plan is invalidated due to some significant event, SQL Server will re-compile it. The Re-compilations/Sec counter measures the number of time a re-compile event was triggered per second. Re-compiles, like compiles, are expensive operations so you want to minimize the number of re-compiles. Ideally you want to keep this counter less than 10% of the number of Compilations/Sec.

    6. SQLServer: General Statistics: User Connections
    The user connections counter identifies the number of different users that are connected to SQL Server at the time the sample was taken. You need to watch this counter over time to understand your baseline user connection numbers. Once you have some idea of your high and low water marks during normal usage of your system, you can then look for times when this counter exceeds the high and low marks. If the value of this counter goes down and the load on the system is the same, then you might have a bottleneck that is not allowing your server to handle the normal load. Keep in mind though that this counter value might go down just because less people are using your SQL Server instance.

    7. SQLServer: Locks: Lock Waits / Sec: _Total
    In order for SQL Server to manage concurrent users on the system, SQL Server needs to lock resources from time to time. The lock waits per second counter tracks the number of times per second that SQL Server is not able to retain a lock right away for a resource. Ideally you don't want any request to wait for a lock. Therefore you want to keep this counter at zero, or close to zero at all times.

    8. SQLServer: Access Methods: Page Splits / Sec
    This counter measures the number of times SQL Server had to split a page when updating or inserting data per second. Page splits are expensive, and cause your table to perform more poorly due to fragmentation. Therefore, the fewer page splits you have the better your system will perform. Ideally this counter should be less than 20% of the batch requests per second.

    9. SQLServer: General Statistic: Processes Block
    The processes blocked counter identifies the number of blocked processes. When one process is blocking another process, the blocked process cannot move forward with its execution plan until the resource that is causing it to wait is freed up. Ideally you don't want to see any blocked processes. When processes are being blocked you should investigate.

    10. SQLServer: Buffer Manager: Checkpoint Pages / Sec
    The checkpoint pages per second counter measures the number of pages written to disk by a checkpoint operation. You should watch this counter over time to establish a baseline for your systems. Once a baseline value has been established you can watch this value to see if it is climbing. If this counter is climbing, it might mean you are running into memory pressures that are causing dirty pages to be flushed to disk more frequently than normal.

    Regards
    Suman Pramanik


  • 2.  RE: Top 10 SQL Server Counters for Monitoring SQL Server Performance

     
    Posted Aug 22, 2013 03:39 PM
    Awesome! Thanks for sharing this info Suman!


    prasu09 wrote:

    Do you have a list of SQL Server Counters you review when monitoring your SQL Server environment? Counters allow you a method to measure current performance, as well as performance over time. Identifying the metrics you like to use to measure SQL Server performance and collecting them over time gives you a quick and easy way to identify SQL Server problems, as well as graph your performance trend over time.
    Below is my top 10 list of SQL Server counters in no particular order. For each counter I have described what it is, and in some cases I have described the ideal value of these counters. This list should give you a starting point for developing the metrics you want to use to measure database performance in your SQL Server environment.

    1. SQLServer: Buffer Manager: Buffer cache hit ratio
    The buffer cache hit ratio counter represents how often SQL Server is able to find data pages in its buffer cache when a query needs a data page. The higher this number the better, because it means SQL Server was able to get data for queries out of memory instead of reading from disk. You want this number to be as close to 100 as possible. Having this counter at 100 means that 100% of the time SQL Server has found the needed data pages in memory. A low buffer cache hit ratio could indicate a memory problem.

    2. SQLServer: Buffer Manager: Page life expectancy
    The page life expectancy counter measures how long pages stay in the buffer cache in seconds. The longer a page stays in memory, the more likely SQL Server will not need to read from disk to resolve a query. You should watch this counter over time to determine a baseline for what is normal in your database environment. Some say anything below 300 (or 5 minutes) means you might need additional memory.

    3. SQLServer: SQL Statistics: Batch Requests/Sec
    Batch Requests/Sec measures the number of batches SQL Server is receiving per second. This counter is a good indicator of how much activity is being processed by your SQL Server box. The higher the number, the more queries are being executed on your box. Like many counters, there is no single number that can be used universally to indicate your machine is too busy. Today’s machines are getting more and more powerful all the time and therefore can process more batch requests per second. You should review this counter over time to determine a baseline number for your environment.

    4. SQLServer: SQL Statistics: SQL Compilations/Sec
    The SQL Compilations/Sec measure the number of times SQL Server compiles an execution plan per second. Compiling an execution plan is a resource-intensive operation. Compilations/Sec should be compared with the number of Batch Requests/Sec to get an indication of whether or not complications might be hurting your performance. To do that, divide the number of batch requests by the number of compiles per second to give you a ratio of the number of batches executed per compile. Ideally you want to have one compile per every 10 batch requests.

    5. SQLServer: SQL Statistics: SQL Re-Compilations/Sec
    When the execution plan is invalidated due to some significant event, SQL Server will re-compile it. The Re-compilations/Sec counter measures the number of time a re-compile event was triggered per second. Re-compiles, like compiles, are expensive operations so you want to minimize the number of re-compiles. Ideally you want to keep this counter less than 10% of the number of Compilations/Sec.

    6. SQLServer: General Statistics: User Connections
    The user connections counter identifies the number of different users that are connected to SQL Server at the time the sample was taken. You need to watch this counter over time to understand your baseline user connection numbers. Once you have some idea of your high and low water marks during normal usage of your system, you can then look for times when this counter exceeds the high and low marks. If the value of this counter goes down and the load on the system is the same, then you might have a bottleneck that is not allowing your server to handle the normal load. Keep in mind though that this counter value might go down just because less people are using your SQL Server instance.

    7. SQLServer: Locks: Lock Waits / Sec: _Total
    In order for SQL Server to manage concurrent users on the system, SQL Server needs to lock resources from time to time. The lock waits per second counter tracks the number of times per second that SQL Server is not able to retain a lock right away for a resource. Ideally you don't want any request to wait for a lock. Therefore you want to keep this counter at zero, or close to zero at all times.

    8. SQLServer: Access Methods: Page Splits / Sec
    This counter measures the number of times SQL Server had to split a page when updating or inserting data per second. Page splits are expensive, and cause your table to perform more poorly due to fragmentation. Therefore, the fewer page splits you have the better your system will perform. Ideally this counter should be less than 20% of the batch requests per second.

    9. SQLServer: General Statistic: Processes Block
    The processes blocked counter identifies the number of blocked processes. When one process is blocking another process, the blocked process cannot move forward with its execution plan until the resource that is causing it to wait is freed up. Ideally you don't want to see any blocked processes. When processes are being blocked you should investigate.

    10. SQLServer: Buffer Manager: Checkpoint Pages / Sec
    The checkpoint pages per second counter measures the number of pages written to disk by a checkpoint operation. You should watch this counter over time to establish a baseline for your systems. Once a baseline value has been established you can watch this value to see if it is climbing. If this counter is climbing, it might mean you are running into memory pressures that are causing dirty pages to be flushed to disk more frequently than normal.

    Regards
    Suman Pramanik


  • 3.  RE: [CA Clarity On Demand] Top 10 SQL Server Counters for Monitoring SQL Se

    Posted Aug 23, 2013 03:20 AM
    Wonderful!! Thanks a lot for sharing this Suman.

    Regards,
    Supriya Chakraborty

    From: CA Clarity Global User Community [mailto:CommunityAdmin@communities-mail.ca.com]
    Sent: Friday, August 23, 2013 12:05 AM
    To: mb.97413331.101635458@myca-email.ca.com
    Subject: [CA Clarity On Demand] Top 10 SQL Server Counters for Monitoring SQL Server Performance

    Do you have a list of SQL Server Counters you review when monitoring your SQL Server environment? Counters allow you a method to measure current performance, as well as performance over time. Identifying the metrics you like to use to measure SQL Server performance and collecting them over time gives you a quick and easy way to identify SQL Server problems, as well as graph your performance trend over time.
    Below is my top 10 list of SQL Server counters in no particular order. For each counter I have described what it is, and in some cases I have described the ideal value of these counters. This list should give you a starting point for developing the metrics you want to use to measure database performance in your SQL Server environment.

    1. SQLServer: Buffer Manager: Buffer cache hit ratio
    The buffer cache hit ratio counter represents how often SQL Server is able to find data pages in its buffer cache when a query needs a data page. The higher this number the better, because it means SQL Server was able to get data for queries out of memory instead of reading from disk. You want this number to be as close to 100 as possible. Having this counter at 100 means that 100% of the time SQL Server has found the needed data pages in memory. A low buffer cache hit ratio could indicate a memory problem.

    2. SQLServer: Buffer Manager: Page life expectancy
    The page life expectancy counter measures how long pages stay in the buffer cache in seconds. The longer a page stays in memory, the more likely SQL Server will not need to read from disk to resolve a query. You should watch this counter over time to determine a baseline for what is normal in your database environment. Some say anything below 300 (or 5 minutes) means you might need additional memory.

    3. SQLServer: SQL Statistics: Batch Requests/Sec
    Batch Requests/Sec measures the number of batches SQL Server is receiving per second. This counter is a good indicator of how much activity is being processed by your SQL Server box. The higher the number, the more queries are being executed on your box. Like many counters, there is no single number that can be used universally to indicate your machine is too busy. Today’s machines are getting more and more powerful all the time and therefore can process more batch requests per second. You should review this counter over time to determine a baseline number for your environment.

    4. SQLServer: SQL Statistics: SQL Compilations/Sec
    The SQL Compilations/Sec measure the number of times SQL Server compiles an execution plan per second. Compiling an execution plan is a resource-intensive operation. Compilations/Sec should be compared with the number of Batch Requests/Sec to get an indication of whether or not complications might be hurting your performance. To do that, divide the number of batch requests by the number of compiles per second to give you a ratio of the number of batches executed per compile. Ideally you want to have one compile per every 10 batch requests.

    5. SQLServer: SQL Statistics: SQL Re-Compilations/Sec
    When the execution plan is invalidated due to some significant event, SQL Server will re-compile it. The Re-compilations/Sec counter measures the number of time a re-compile event was triggered per second. Re-compiles, like compiles, are expensive operations so you want to minimize the number of re-compiles. Ideally you want to keep this counter less than 10% of the number of Compilations/Sec.

    6. SQLServer: General Statistics: User Connections
    The user connections counter identifies the number of different users that are connected to SQL Server at the time the sample was taken. You need to watch this counter over time to understand your baseline user connection numbers. Once you have some idea of your high and low water marks during normal usage of your system, you can then look for times when this counter exceeds the high and low marks. If the value of this counter goes down and the load on the system is the same, then you might have a bottleneck that is not allowing your server to handle the normal load. Keep in mind though that this counter value might go down just because less people are using your SQL Server instance.

    7. SQLServer: Locks: Lock Waits / Sec: _Total
    In order for SQL Server to manage concurrent users on the system, SQL Server needs to lock resources from time to time. The lock waits per second counter tracks the number of times per second that SQL Server is not able to retain a lock right away for a resource. Ideally you don't want any request to wait for a lock. Therefore you want to keep this counter at zero, or close to zero at all times.

    8. SQLServer: Access Methods: Page Splits / Sec
    This counter measures the number of times SQL Server had to split a page when updating or inserting data per second. Page splits are expensive, and cause your table to perform more poorly due to fragmentation. Therefore, the fewer page splits you have the better your system will perform. Ideally this counter should be less than 20% of the batch requests per second.

    9. SQLServer: General Statistic: Processes Block
    The processes blocked counter identifies the number of blocked processes. When one process is blocking another process, the blocked process cannot move forward with its execution plan until the resource that is causing it to wait is freed up. Ideally you don't want to see any blocked processes. When processes are being blocked you should investigate.

    10. SQLServer: Buffer Manager: Checkpoint Pages / Sec
    The checkpoint pages per second counter measures the number of pages written to disk by a checkpoint operation. You should watch this counter over time to establish a baseline for your systems. Once a baseline value has been established you can watch this value to see if it is climbing. If this counter is climbing, it might mean you are running into memory pressures that are causing dirty pages to be flushed to disk more frequently than normal.

    Regards
    Suman Pramanik
    Posted by:prasu09
    --
    CA Communities Message Boards
    101637998
    mb.97413331.101635458@myca-email.ca.com<mailto:mb.97413331.101635458@myca-email.ca.com>
    https://communities.ca.com


  • 4.  RE: [CA Clarity On Demand] Top 10 SQL Server Counters for Monitoring SQL Se

    Posted Aug 23, 2013 02:36 PM
    Thank you for sharing. That is true technical expertise.


    I am no quite sure I can utilize them properly.

    So on while you say SQL Server (I take MS SQL Server) these can be used in On demand which I take is Oracle.
    The first might depend on if your application is designed to use the same pages over and over or not and if the users do repeatedly the same thing or always different things.
    1 - 3 sound like they the indicate how adequate your hardware is and while administering Clarity you cannot do much about them.
    4 - 5 and 8 - 9 sound like that they are determined partly when the application is developed , partly on how much customization is done and eventually which functionality the users use.
    10 sounds like depending on all of those.
    6 I was under the impression that there is only one Clarity user to the database though a baseline would be good to know
    7 are those the ones which result in messages about dead locks and suggestion of reruns in the Clarity logs?

    Does a Clarity admin in On demand have access to those and is he able to do do something about them?
    In many of the on premise systems I have seen the Clarity admin don't have such access and ability to do anything about them.
    Databases are managed by db/internal intra departments and there is very little consideration for Clarity specific requirements.

    Martti K.


  • 5.  RE: [CA Clarity On Demand] Top 10 SQL Server Counters for Monitoring SQL Se

    Broadcom Employee
    Posted Aug 23, 2013 02:58 PM
    Hi Martii...

    In ondemand we use Oracle and not SQL Server, and in Ondemand System we also have DBA team but those are well trained and they set up the database based on Clarity Specific requirement and thats how we get the best performance. Yes in many of the company its managed by DBA/Infra team but we do recommend some clarity specific guideline to obtain optimized performance.

    Regards
    Suman Pramanik


  • 6.  RE: [CA Clarity On Demand] Top 10 SQL Server Counters for Monitoring SQL Se

    Posted Aug 26, 2013 04:08 PM
    In ondemand we use Oracle and not SQL Server
    That is why
    while you say SQL Server (I take MS SQL Server) can these be used in On demand
    is not clear
    So are these for MS SQL Server, Oracle or both?

    The question is if the db team does want to
    set up the database based on Clarity Specific requirement and thats how we get the best performance.
    In any case this thread is another piece of evidence that without real dedication to the system you are likely to get better performance from On demand than from On premise.

    Martti K.


  • 7.  This is a great post to be included in Tuesday Tips Category

    Posted Nov 13, 2013 04:30 PM
    Moving this thread to Tuesday Tips for a broader audiance. Thanks Suman for sharing this!!