Home > Memory > How to Check SQL Server is facing Memory Pressure using windows Performance Monitor

How to Check SQL Server is facing Memory Pressure using windows Performance Monitor

 

It is really a good experience to figure out memory change which could be possibly memory pressure SQL Server is facing. I will demonstrate how to figure out memory pressure in SQL Server using Windows Perfmon.

Before I start demonstration on figuring out memory pressure, DBA need to have deep understanding of memory Configuration with SQL Server with Standalone instance and Multiple Instance on the same Machine. Don’t ignore memory configuration for the Operating System (OS).

System can face serious problem if enough memory is not given to the Operating System.

Example: System Shutdown due to not enough memory (unexpected shutdown) which lead to Production hamper.

 

Perfmon Counter to Capture Memory Utilization

SQL Server: Memory Manager: Total Server Memory

SQL Server: Memory Manager: Target Server Memory

Process: Working Set à Instance àSqlservr

Memory: System Cache Resident Bytes

Memory: % Committed Bytes in Use

Memory: Available Mbytes

 

Process: Working Set. This is the current size of the memory area that the process is utilizing for code, threads, and data. The size of the working set will grow and shrink as the VMM can permit. When memory is becoming scarce the working sets of the applications will be trimmed. When memory is plentiful the working sets are allowed to grow. Larger working sets mean more code and data in memory making the overall performance of the applications increase. However, a large working set that does not shrink appropriately is usually an indication of a memory leak.

If you see the values of working set being trimmed it indicates a Memory Pressure or Leak. Look into SQL Server Error Log, SQL server Agent Error Log, In case u did not find anything, check for Jobs if they fail withl Memory Issues (Out of Memory).

 

Externally:

Physical memory (RAM) running low (Memory Trimmed). This causes the system to trim working sets of currently running processes, which can result in overall slowdown.

 

SQL Server detects this condition and, depending on the configuration, it might reduce the commit target of the buffer pool and start clearing internal caches.

Internally:

SQL Server detects high memory consumption internally, causing redistribution of memory between internal components.

 

Internal memory pressure may be a result of:

  • Responding to the external memory pressure (SQL Server sets lower memory usage caps).
  • Changed memory settings (for example, max server memory).
  • Changes in memory distribution of internal components.
Categories: Memory
  1. vinod
    January 20, 2012 at 3:47 pm

    Hi Sufian,
    Nice to see your Blog. I’m also a DBA. good information you kept in you blog. congrats for the knowledge you have.

  2. Gary
    March 9, 2012 at 2:11 pm

    hard to see the counters you’re using for this graph.

  1. September 29, 2014 at 1:17 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: