<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Perfmon Counters - Techyaz.com</title>
	<atom:link href="https://techyaz.com/tag/perfmon-counters/feed/" rel="self" type="application/rss+xml" />
	<link></link>
	<description>Tips, Tutorials and How-to Topics</description>
	<lastBuildDate>Thu, 28 Jun 2018 07:55:52 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.1</generator>

<image>
	<url>https://techyaz.com/wp-content/uploads/2017/11/cropped-Site-icon-150x150.png</url>
	<title>Perfmon Counters - Techyaz.com</title>
	<link></link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Top Perfmon Counters to Identify SQL Server CPU Bottleneck</title>
		<link>https://techyaz.com/sql-server/performance-tuning/top-perfmon-counters-to-identify-sql-server-cpu-bottleneck/</link>
					<comments>https://techyaz.com/sql-server/performance-tuning/top-perfmon-counters-to-identify-sql-server-cpu-bottleneck/#respond</comments>
		
		<dc:creator><![CDATA[Manvendra Deo Singh]]></dc:creator>
		<pubDate>Tue, 01 May 2018 13:39:32 +0000</pubDate>
				<category><![CDATA[Performance Tuning]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server Administration]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[bulk import performance]]></category>
		<category><![CDATA[Perfmon Counters]]></category>
		<category><![CDATA[Perfmon CPU Counters]]></category>
		<category><![CDATA[performance tuning]]></category>
		<guid isPermaLink="false">http://techyaz.com/?p=2203</guid>

					<description><![CDATA[<p>We should always monitor system resource utilization of our database servers and make sure that these utilizations should not exceed the benchmark ranges of our environment. Today, I will explain about monitoring top perfmon counters for CPU usage. If your&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/sql-server/performance-tuning/top-perfmon-counters-to-identify-sql-server-cpu-bottleneck/">Top Perfmon Counters to Identify SQL Server CPU Bottleneck</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>We should always monitor system resource utilization of our database servers and make sure that these utilizations should not exceed the benchmark ranges of our environment. Today, I will explain about monitoring top perfmon counters for CPU usage. If your database server is continuously showing high CPU usage that means you need to look in to top perfmon counters to identify SQL Server CPU bottleneck. You can monitor these performance counter values to detect the CPU pressure.</p>
<p>I have already explained top performance counters to detect Memory and Disk IO bottlenecks in SQL Server in my last articles. Have a look at them (attached below) to get Memory and Disk IO related performance counters and their ideal values for healthy system.</p>
<ul>
<li><strong><a href="http://techyaz.com/sql-server/troubleshooting/top-10-performance-counters-to-identify-sql-server-memory-pressure/" target="_blank" rel="noopener">Top 10 Performance Counters to Identify SQL Server Memory Pressure</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/identify-disk-bottleneck-using-perfmon-counters/" target="_blank" rel="noopener">Identify Disk Bottleneck in SQL Server using Perfmon Disk Counters</a></strong></li>
</ul>
<p>Generally, CPU bottleneck arises because of either your system has not enough CPUs to process current workload or your transactions or applications are poorly designed that causes the high CPU. To deal with SQL Server CPU pressure, we need to either find the high CPU intensive queries and optimize them or increase the total CPU counts of the database server to handle current workload. There can be multiple reasons for high CPU usage like high recompilations of SQL Queries, OS issues, Query design issues: Sorting Joins, Poor Indexes, Condition Clauses etc. Here, I am going to explain about top perfmon counters to identify SQL Server CPU bottleneck.</p>
<h3><span style="color: #333399;">Perfmon Counters for CPU Usage</span></h3>
<p><img fetchpriority="high" decoding="async" class="size-full wp-image-2204 alignright" src="http://techyaz.com/wp-content/uploads/2018/05/Top-Perfmon-Counters-for-CPU-Usage.png" alt="Top Perfmon Counters for CPU Usage" width="300" height="300" srcset="https://techyaz.com/wp-content/uploads/2018/05/Top-Perfmon-Counters-for-CPU-Usage.png 300w, https://techyaz.com/wp-content/uploads/2018/05/Top-Perfmon-Counters-for-CPU-Usage-150x150.png 150w, https://techyaz.com/wp-content/uploads/2018/05/Top-Perfmon-Counters-for-CPU-Usage-160x160.png 160w, https://techyaz.com/wp-content/uploads/2018/05/Top-Perfmon-Counters-for-CPU-Usage-320x320.png 320w" sizes="(max-width: 300px) 100vw, 300px" /></p>
<p>Here, I am going to describe about perfmon counters for CPU usage in SQL Server. Ideally, first we should start with looking at CPU usage in Windows Task Manager. If the CPU utilization is continuously going beyond 85%, it means your system is facing CPU bottleneck. Find the list of performance counters to identify SQL Server CPU bottleneck.</p>
<h5><span style="color: #993300;">Processor: % Processor Time </span></h5>
<p>One of the very useful CPU perfmon counter for SQL Server is <em>Processor: % Processor Time.</em> This counter displays the percentage of time CPU spends executing a thread that is not idle. If your system is frequently reaching beyond 85% then it means your system is facing CPU bottleneck. The acceptable value for this counter should be less than 50%.</p>
<h5><span style="color: #993300;">Processor: % User Time</span></h5>
<p>Windows operating system has two modes of processing for any process. One is Kernel mode another one is user mode. This counter shows the percentage of time a process spends executing user processes like SQL Server. If this counter is high it means CPU pressure is because of SQL Server or because of user applications. You should focus to retrieve CPU intensive queries to get the culprit transactions that are causing high CPU pressure. There is no idle value for this counter. You should benchmark each system based on your workload.</p>
<h5><span style="color: #993300;">Processor: % Privilege Time</span></h5>
<p>This counter shows the percentage of time the processor spends on execution of Microsoft Windows kernel commands, such as processing of SQL Server I/O requests. This counter captures the information about kernel mode and indicates towards poor performance of disk subsystems. Monitor DISK IO related performance counters to identify DISK IO bottleneck and if possible, consider installing a faster or more efficient disk subsystem.</p>
<h5><span style="color: #993300;">Processor: % Interrupt Time</span></h5>
<p>This counter <em>Processor: % Interrupt Time </em>tells about the time a processor spends receiving and servicing hardware interruptions during specific sample intervals. This counter indicates a possible hardware issue if the value is greater than 15 percent.</p>
<h5><span style="color: #993300;">System: Processor Queue Length</span></h5>
<p>This is an important perfmon counter to detect CPU bottleneck. This counter gives information about the number of threads waiting for processor time. If value of this counter is greater than zero then this is a sign of CPU bottleneck. We can further check <em>Compilations/sec</em> and <em>Re-Compilations/sec</em>. A high number of compilations and recompilations usually indicates poor reuse of the query plans. This can be fixed by optimizing your queries and stored procedures.</p>
<h5><span style="color: #993300;">System: Calls/sec</span></h5>
<p>Any system would have either software calls or application related calls or hardware related calls. This counter<em> System: Calls/sec</em> metric shows the number of software calls to the operating system service routines per second. Similarly, another CPU perform counter <em>Processor: Interrupts/Sec</em> shows the number of hardware calls to the processor. Both perfmon counters can be used to determine the source of the performance issues. The acceptable values for <em>System: Calls/sec</em> are under 20,000. Higher values might indicate excessive operating system activity caused by software applications.</p>
<h5><span style="color: #993300;">Context Switches/sec</span></h5>
<p>Context Switches occurs when kernel switches processor from one thread to another<em>. </em>The acceptable <em>Context Switches/sec</em> value should be less than 2,000 per processor. If you are observing constant high values of <em>Context Switches/sec</em> and <em>Processor: % Processor Time</em> on your system then this would be a clear sign of processor bottlenecks. Permanent solution to reduce CPU bottleneck is to change the processor to a more powerful one, or add an additional to existing ones.</p>
<p>You might have seen high <em>Context Switches/sec</em> values for systems that are running with multiple SQL Server instances or a system that is hosted other applications along with SQL Server.</p>
<p>Here I have described top perfmon counters for CPU usage on your database server. I hope you like this article. Please follow our <a href="https://www.facebook.com/Techyaz/">Facebook</a> page and <a href="https://twitter.com/Tech_yaz">Twitter</a> handle to get latest updates.</p>
<p><em><strong><span style="color: #800000;">Read More:</span></strong></em></p>
<ul>
<li><strong><a href="http://techyaz.com/sql-server/performing-online-index-rebuild-operation/" target="_blank" rel="noopener">Disk and Performance Impact of running Online Index Rebuild Operation</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/avoid-database-shrink-operation/" target="_blank" rel="noopener">Understanding Database Shrink Operation and Why should you Avoid it?</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/troubleshooting/sql-server-error-701-there-is-insufficient-system-memory-to-run-this-query/" target="_blank" rel="noopener">Fix Error 701: There is Insufficient System Memory to Run this Query</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/improve-sql-server-bulk-data-import-performance/" target="_blank" rel="noopener">How to Improve Bulk Data Load Performance?</a></strong></li>
</ul>
<p>&nbsp;</p>
<p>The post <a href="https://techyaz.com/sql-server/performance-tuning/top-perfmon-counters-to-identify-sql-server-cpu-bottleneck/">Top Perfmon Counters to Identify SQL Server CPU Bottleneck</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/sql-server/performance-tuning/top-perfmon-counters-to-identify-sql-server-cpu-bottleneck/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Top 10 Performance Counters to Identify SQL Server Memory Pressure</title>
		<link>https://techyaz.com/sql-server/performance-tuning/top-10-performance-counters-to-identify-sql-server-memory-pressure/</link>
					<comments>https://techyaz.com/sql-server/performance-tuning/top-10-performance-counters-to-identify-sql-server-memory-pressure/#respond</comments>
		
		<dc:creator><![CDATA[Manvendra Deo Singh]]></dc:creator>
		<pubDate>Mon, 30 Apr 2018 11:52:11 +0000</pubDate>
				<category><![CDATA[Performance Tuning]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server Administration]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[Wait Types]]></category>
		<category><![CDATA[Memory Issues]]></category>
		<category><![CDATA[Perfmon Counters]]></category>
		<category><![CDATA[Perfmon Memory Counters]]></category>
		<category><![CDATA[performance tuning]]></category>
		<category><![CDATA[SQL_Server_Memory_Management]]></category>
		<guid isPermaLink="false">http://techyaz.com/?p=2196</guid>

					<description><![CDATA[<p>Memory is one of the important system resource that SQL Server uses to process their transactions. Sometimes, your server might face memory bottleneck that reduces the performance of running transactions. Here, I will explain top 10 performance counters to identify&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/sql-server/performance-tuning/top-10-performance-counters-to-identify-sql-server-memory-pressure/">Top 10 Performance Counters to Identify SQL Server Memory Pressure</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Memory is one of the important system resource that SQL Server uses to process their transactions. Sometimes, your server might face memory bottleneck that reduces the performance of running transactions. Here, I will explain top 10 performance counters to identify SQL Server memory pressure or memory bottleneck. If your system is facing insufficient system memory then i would recommend you to read below article.</p>
<ul>
<li><strong><a href="http://techyaz.com/sql-server/troubleshooting/sql-server-error-701-there-is-insufficient-system-memory-to-run-this-query/" target="_blank" rel="noopener">Fix SQL Server Error 701: There is Insufficient System Memory to Run this Query</a></strong></li>
</ul>
<p>We can use Windows PerfMon utility to gather current values of all given performance counters. Just type <em>perfmon</em> in <em>run</em> prompt to launch perfmon tool to gather memory related performance counters. Although, Microsoft has also given a DMV related to performance counters that is very useful in collecting data and detecting CPU, IO or memory bottleneck in SQL Server. You can run below command to get all performance counters and their respective values using DMV <em>sys.dm_os_performance_counters</em>. You can also use this DMV to get performance counter values to identify memory pressure in SQL Server.</p>
<pre><strong><span style="color: #0000ff;">Select * from sys.dm_os_performance_counters</span></strong></pre>
<p>By default, SQL Server changes its memory requirements dynamically, on the basis of available system resources. I have explained SQL Server Memory Management and how SQL Server allocated memory to their transactions in below attached article.</p>
<ul>
<li><strong><a href="http://techyaz.com/sql-server/sql-server-memory-allocation-min-max-server-memory-configuration/" target="_blank" rel="noopener">SQL Server Memory Allocation &amp; Role of MIN/MAX Server Memory Configuration</a></strong></li>
</ul>
<h3><span style="color: #333399;">Performance Counters to Identify SQL Server Memory Pressure</span></h3>
<p>Let’s discuss top perfmon counters for memory usages to identify its bottleneck. Below is the list of top 10 performance counters to identify SQL Server Memory pressure. If you want to read CPU and Disk IO related perfmon counters then i would suggest you to read below attached articles.</p>
<ul>
<li><strong><a href="http://techyaz.com/sql-server/troubleshooting/top-perfmon-counters-to-identify-sql-server-cpu-bottleneck/" target="_blank" rel="noopener">Top Perfmon Counters to Identify SQL Server CPU Bottleneck</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/identify-disk-bottleneck-using-perfmon-counters/" target="_blank" rel="noopener">Identify Disk Bottleneck in SQL Server using Perfmon Disk Counters</a></strong></li>
</ul>
<h5><span style="color: #993300;">Memory: Available Bytes</span></h5>
<p>First thing you should look at in case of memory bottleneck in SQL Server is the available memory that can be used by processes. You can get this value by looking at the counter <em>Available Bytes</em> under object <em>Memory</em>. Low value of this counter shows the memory shortage on this server.  Now, you should focus behind the reason of this memory shortage. There might be possibility that some of your applications running on your server are not releasing memory or your system has not enough memory to perform current workload that leads to the memory bottleneck in SQL Server.</p>
<h5><span style="color: #993300;">Memory: Pages/sec</span></h5>
<p>This counter indicates the total number of pages that are either read from disk or written to the disk due to page fault. When a process requests a data page that is not in memory then it will be retrieved from disk to memory. This process is known is page fault. High value of this counter could indicate the excessive paging. We should further monitor Memory: Page Faults/sec counter to go indepth information. The average <em>Pages/sec</em> value should be below 50. A high value of <em>Pages/sec</em> indicates intensive memory activities like read from and write to disk. It means transactions are getting enough memory that is why they are using disk to process their requests.</p>
<h5><span style="color: #993300;">Memory: Page Faults/sec</span></h5>
<p>High value of counter <em>Memory: Pages/sec</em> could indicate the excessive paging. Next, we should monitor the <em>Memory: Page Faults/sec</em> counter to make sure that the disk activity is not caused by paging. If you want to determine whether SQL Server or another process is causing excessive paging then we should monitor the <em>Process: Page Faults/sec</em> counter for the SQL Server process instance. This will give an exact picture whether SQL Server is causing this paging issue or not.</p>
<h5><span style="color: #993300;">Process: Working Set</span></h5>
<p>This counter shows the amount of memory a process can use. This counter value shows whether you have set optimum value in <em>min server memory</em> and <em>max server memory</em> configuration or not. If this value shows constantly below <em>min server memory</em> and <em>max server memory</em> then you have configured too much memory for your SQL Server.</p>
<h5><span style="color: #993300;">SQL Server: Buffer Manager: Buffer Cache Hit Ratio</span></h5>
<p>This is very important counter and this counter shows the number of percentage that has been satisfied using data cache. Suppose the value of buffer cache hit ratio for your server is 94 it means 94% of total requests for data have been processed using data cache.</p>
<p>The ideal value for this counter is more than 90. Higher the value better the memory health.</p>
<h5><span style="color: #993300;">SQL Server: Buffer Manager: Page Life Expectancy</span></h5>
<p>Page Life Expectancy is very important counter to measure memory pressure for your system. THis counter indicates the average number of seconds a data page to remain in cache. Ideally, we have read multiple blogs to consider 300 or more as acceptable value but this value varies depending on your system configuration.</p>
<p>The ideal value is more than 300 but always compare this value with your system configuration. Higher the better concept is also applying here.</p>
<h5><span style="color: #993300;">SQL Server: Buffer Manager: Free List Stalls/sec</span></h5>
<p>This counter also shows a sign of memory pressure or insufficient memory on your server. This displays the number of requests per second where data requests stall because there are no buffers available. Any value greater than two indicates that SQL Server needs more memory.</p>
<h5><span style="color: #993300;">SQL Server: Buffer Manager: Lazy Writes/sec</span></h5>
<p>This counter tells about total number of Lazy writer performed in a second.  It means total number of times Lazy Writer process moves dirty pages from the buffer to disk. A lower number is better than a higher number. If value of this counter shows higher value continuously more than 20, then we need to add more memory to the system or we should think about optimizing memory intensive operations.</p>
<h5><span style="color: #993300;">SQL Server: Buffer Manager: Checkpoint Pages/sec</span></h5>
<p>This counter monitors the number of dirty pages per second, which are flushed to disk when SQL Server invokes the checkpoint process. High values for this counter may indicate memory pressure or insufficient memory.</p>
<h5><span style="color: #993300;">SQL Server: Memory Manager: Memory Grants Pending</span></h5>
<p>This counter shows the number of processes waiting for memory grant per second. Any value higher than zero indicates a lack of memory. We can also get this information by using a DMV sys.dm_exec_query_memory_grants. Those processes who are waiting to be granted the required memory will show you waiting with RESOURCE_SEMAPHORE wait type. I have explained about resource semaphore wait type in below attached article.</p>
<ul>
<li><strong><a href="http://techyaz.com/sql-server/resource_semaphore-wait-type/" target="_blank" rel="noopener">Fix RESOURCE_SEMAPHORE Wait Type in SQL Server</a></strong></li>
</ul>
<p>Here, I have described top 10 performance counters to identify SQL Server memory pressure on your database server. I hope you like this article. Please follow our <a href="https://www.facebook.com/Techyaz/">Facebook</a> page and <a href="https://twitter.com/Tech_yaz">Twitter</a> handle to get latest updates.</p>
<p><em><strong><span style="color: #800000;">Read More:</span></strong></em></p>
<ul>
<li><strong><a href="http://techyaz.com/sql-server/troubleshooting/sql-server-encountered-32-occurrences-requests-taking-longer-15-seconds-complete/" target="_blank" rel="noopener">Fix Error 833: SQL Server has encountered 32 occurrences of I/O requests taking longer than 15 seconds to complete.</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/performing-online-index-rebuild-operation/" target="_blank" rel="noopener">Disk and Performance Impact of running Online Index Rebuild Operation</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/async_io_completion-wait-type/" target="_blank" rel="noopener">Understanding ASYNC_IO_COMPLETION Wait Type</a></strong></li>
</ul>
<p>The post <a href="https://techyaz.com/sql-server/performance-tuning/top-10-performance-counters-to-identify-sql-server-memory-pressure/">Top 10 Performance Counters to Identify SQL Server Memory Pressure</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/sql-server/performance-tuning/top-10-performance-counters-to-identify-sql-server-memory-pressure/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>SQL Server Error 701: There is Insufficient System Memory to Run this Query</title>
		<link>https://techyaz.com/sql-server/performance-tuning/sql-server-error-701-there-is-insufficient-system-memory-to-run-this-query/</link>
					<comments>https://techyaz.com/sql-server/performance-tuning/sql-server-error-701-there-is-insufficient-system-memory-to-run-this-query/#respond</comments>
		
		<dc:creator><![CDATA[Manvendra Deo Singh]]></dc:creator>
		<pubDate>Sat, 28 Apr 2018 11:13:42 +0000</pubDate>
				<category><![CDATA[Performance Tuning]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[bulk import performance]]></category>
		<category><![CDATA[Memory Issues]]></category>
		<category><![CDATA[Perfmon Counters]]></category>
		<category><![CDATA[performance tuning]]></category>
		<category><![CDATA[SQL_Server_Memory_Management]]></category>
		<category><![CDATA[Waittypes]]></category>
		<guid isPermaLink="false">http://techyaz.com/?p=2180</guid>

					<description><![CDATA[<p>Today I am going to discuss SQL Server memory issues that your database Instance might face during bulk data load or during any memory intensive operations. You may also face insufficient memory issue when you try to execute numerous queries&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/sql-server/performance-tuning/sql-server-error-701-there-is-insufficient-system-memory-to-run-this-query/">SQL Server Error 701: There is Insufficient System Memory to Run this Query</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Today I am going to discuss SQL Server memory issues that your database Instance might face during bulk data load or during any memory intensive operations. You may also face insufficient memory issue when you try to execute numerous queries on large data sets at the same time in SQL Server. In such circumstances, SQL Server throws error 701 or error 802 with error text “<em>There is insufficient system memory to run this query</em>.” Full error descriptions for both error codes are given below.</p>
<p><em><span style="color: #ff0000;">Error 701, Severity: 17, State: 193.</span></em><br />
<em><span style="color: #ff0000;"> There is insufficient system memory to run this query.</span></em></p>
<p>Or</p>
<p><em><span style="color: #ff0000;">Error 802, Severity: 17, State: 20</span></em><br />
<em><span style="color: #ff0000;"> There is insufficient memory available in the buffer pool.</span></em></p>
<h3><span style="color: #333399;">Error 701 or Error 802: Root Cause</span></h3>
<p>If SQL Server is running out of memory and has no more memory available to allocate to its transactions then it will generate SQL Server memory error 701 or error 802. SQL Server Memory pressure or insufficient memory issue can be raised due to huge data load or other memory intensive operations.</p>
<p>We should check <em>DBCC MEMORYSTATUS</em> output to get latest snapshot of current memory status of the SQL Server. This command is very useful in troubleshooting memory issues in SQL Server. You might even have failed to run this DBCC command because system does not have enough memory. You need to reduce some memory pressure by stopping or killing some processes and then try to run this command to gather in depth information about SQL Server memory state.</p>
<p>The transaction that failed due to memory pressure and generates error 701 or error 802 might be or might not be the cause of this error. We should analyze the trends to reach on any conclusion.</p>
<h3><span style="color: #333399;">Solution</span></h3>
<p>There are mainly two reasons behind getting SQL Server memory issues for most of the SQL Server systems. Either your server has less memory to handle the current day to day workload or you are running some of the adhoc transactions that will require more memory for their execution like huge bulk data load, complex reports etc. If your SQL Server is running with insufficient memory during day to day activities then you should seriously evaluate the total workload and propose optimum memory size that can handle your current workload.</p>
<p>If you are planning to run any heavy ad hoc transaction then you should temporary increase the memory that can handle the transaction smoothly or you should run such transactions on a server that are built to handle such loads. You should also consider to reduce the batch size that is optimum for your system.</p>
<p>SQL Server is memory intensive application. We need to plan memory sizing for a server after proper evaluation of server state and overall load that will run on that SQL Server instance. But if you are facing memory issue on one of your SQL Server then first we need to troubleshoot it and find the root cause of this memory pressure. Here I am giving you step by step method to find the actual culprit that are causing the memory issue and possible solutions that can reduce some memory overheads.</p>
<p>First Make sure your SQL Server instance is running on dedicated server and not with other applications. If other applications are also using your database server then make sure they are not eating most of the memory. And, If most of the system memory is taken by other applications then you need to seriously think about migrating those application from this database server.</p>
<p>If you cannot migrate these applications to another server then workaround for such issues are to allocate the maximum memory value to your SQL Server instance. You can do it either by using sp_configure or using GUI. Read attached article to change max memory value for your SQL Server instance.</p>
<ul>
<li><strong><a href="http://techyaz.com/sql-server/sql-server-memory-allocation-min-max-server-memory-configuration/" target="_blank" rel="noopener">Understanding SQL Server Memory Allocation and Role of MIN/MAX Server Memory Configuration</a></strong></li>
</ul>
<p>Next thing you should check is the server memory configuration. Check below SQL Server memory configuration parameters:</p>
<ul>
<li>max server memory</li>
<li>min server memory</li>
<li>min memory per query</li>
</ul>
<p>Notice any unusual settings and fix them as necessary. All above three options have been covered in detain in above attached article.</p>
<p>Now, check the workload in terms of number of concurrent sessions, currently executing queries along with their memory grants. You should also focus on SQL Server transactions that are seeking huge memory values. Look at the transactions and gather a report for high memory intensive operations. Evaluate them and if possible optimize them so that they can take minimum memory.</p>
<ul>
<li><a href="http://techyaz.com/sql-server/resource_semaphore-wait-type/" target="_blank" rel="noopener"><strong>Understanding Memory Wait type Resource_SEMAPHORE and how to fix it?</strong></a></li>
</ul>
<p>You can also run below DBCC commands to free several SQL Server memory caches. This will also help you and make some relief for your current running transactions but in longer run it will not help if your system will need more memory to proceed the transactions.</p>
<ul>
<li>DBCC FREESYSTEMCACHE</li>
<li>DBCC FREESESSIONCACHE</li>
<li>DBCC FREEPROCCACHE</li>
</ul>
<p>Another effective way to look in to memory status is by getting the output of DBCC MEMORYSTATUS command. You would get a good starting point to look in to culprit memory consumers.</p>
<p>We can also start collecting performance monitor counters for memory. Perfmon counters like the value of <em>SQL Server: Buffer Manager\Buffer Cache Hit Ratio, SQL Server: Memory Manager and Page Life Expectancy</em> will be very helpful in identifying memory pressure on SQL Server system. Analyze the trend for these counters and then decide whether issue is coming during some specific operations or system is continuously facing memory pressure.</p>
<p>Based on these analyses you can choose to either increase the system memory, increase the SQL Server memory allocation or reschedule some of the memory specific transactions to the off hours when load is minimum on the system. You can also reduce the batch size of the transaction to reduce the memory pressure. This will be certainly helpful in troubleshooting memory issues.</p>
<p>It is not necessary that your transactions are poorly designed always that is why SQL Server is taking lot of memory to process it. Sometimes even our systems on which SQL Server runs might have problem that end up with memory pressure. So you should consider all these points while fixing any performance issue.<br />
I hope you like this article. Please follow us on our <a href="https://www.facebook.com/Techyaz/">Facebook</a> page and <a href="https://twitter.com/Tech_yaz">Twitter</a> handle to get latest updates.</p>
<p><em><strong><span style="color: #800000;">Read More:</span></strong></em></p>
<ul>
<li><strong><a href="http://techyaz.com/sql-server/sql-server-dmvs/4-different-usages-dbcc-sqlperf-sql-server/" target="_blank" rel="noopener">4 Usages of DBCC SQLPERF in SQL Server</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/troubleshooting/manage-transaction-log-file-during-data-load/" target="_blank" rel="noopener">Manage Transaction Log File during Bulk Data Load</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/improve-sql-server-bulk-data-import-performance/" target="_blank" rel="noopener">How to Improve Bulk Data Load Performance?</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/overview-on-sql-server-performance-tuning/" target="_blank" rel="noopener">Overview of SQL Server Performance Tuning</a></strong></li>
<li><strong><a href="http://techyaz.com/sql-server/identify-disk-bottleneck-using-perfmon-counters/" target="_blank" rel="noopener">Identify Disk Bottleneck in SQL Server using Perfmon Disk Counters</a></strong></li>
</ul>
<p>&nbsp;</p>
<p>The post <a href="https://techyaz.com/sql-server/performance-tuning/sql-server-error-701-there-is-insufficient-system-memory-to-run-this-query/">SQL Server Error 701: There is Insufficient System Memory to Run this Query</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/sql-server/performance-tuning/sql-server-error-701-there-is-insufficient-system-memory-to-run-this-query/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Identify Disk Bottleneck in SQL Server using Perfmon Disk Counters</title>
		<link>https://techyaz.com/sql-server/identify-disk-bottleneck-using-perfmon-counters/</link>
					<comments>https://techyaz.com/sql-server/identify-disk-bottleneck-using-perfmon-counters/#comments</comments>
		
		<dc:creator><![CDATA[Manvendra Deo Singh]]></dc:creator>
		<pubDate>Mon, 27 Nov 2017 10:24:45 +0000</pubDate>
				<category><![CDATA[Performance Tuning]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Disk Bottleneck]]></category>
		<category><![CDATA[Disk IO]]></category>
		<category><![CDATA[IO]]></category>
		<category><![CDATA[Perfmon Counters]]></category>
		<category><![CDATA[Perfmon Disk Counters]]></category>
		<category><![CDATA[performance tuning]]></category>
		<category><![CDATA[Poor Disk IO]]></category>
		<guid isPermaLink="false">http://techyaz.com/?p=1261</guid>

					<description><![CDATA[<p>Disk I/O problems are some of the most difficult problems to diagnose and to debug. Here I am going to discuss about perfmon disk counters that will help us in diagnosing the disk related issues. I will segregate the values&#46;&#46;&#46;</p>
<p>The post <a href="https://techyaz.com/sql-server/identify-disk-bottleneck-using-perfmon-counters/">Identify Disk Bottleneck in SQL Server using Perfmon Disk Counters</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Disk I/O problems are some of the most difficult problems to diagnose and to debug. Here I am going to discuss about perfmon disk counters that will help us in diagnosing the disk related issues. I will segregate the values for all disk counters into three categories, <strong>Excellent, Good </strong>and<strong> Poor</strong>. Get your values for these disk counters and compare with these three categories to know how your disk is performing whether your disk is performing excellent, good or it’s required your intervention to improve its performance.</p>
<ol>
<li><strong>Excellent –</strong> You Disk Subsystem is responding perfectly for respective counter.</li>
<li><strong>Good –</strong> You Disk Subsystem is responding fairly for respective counter and you can consider it good considering your workload and other resource utilization.</li>
<li><strong>Poor –</strong> You Disk Subsystem is not responding well for respective counter and it requires your intervention to drill down more to understand the reason behind slowness.</li>
</ol>
<p>If you want to read about CPU and Memory related performance counters then i would suggest you to go through with below attached articles.</p>
<ul>
<li><strong><a href="https://techyaz.com/sql-server/troubleshooting/top-perfmon-counters-to-identify-sql-server-cpu-bottleneck/" target="_blank" rel="noopener">Top Perfmon Counters to Identify SQL Server CPU Bottleneck</a></strong></li>
<li><strong><a href="https://techyaz.com/sql-server/troubleshooting/top-10-performance-counters-to-identify-sql-server-memory-pressure/" target="_blank" rel="noopener">Top 10 Perfmon Counters to Identify SQL Server Memory Pressure</a></strong></li>
</ul>
<p>Below are the list of important perfmon disk counters that we will be discussing in this article.</p>
<ul>
<li>Average Disk Sec/Read</li>
<li>Average Disk Sec/Write</li>
<li>Average Disk Sec/Transfer</li>
<li>Average Disk Queue Length</li>
<li>Current Disk Queue Length</li>
<li>Disk Read/Sec and Disk Write/Sec</li>
<li>%Disk Time</li>
<li>%Idle Time</li>
</ul>
<p><img decoding="async" class="aligncenter size-full wp-image-1266" src="http://techyaz.com/wp-content/uploads/2017/11/Perfmon-Disk-IO-Counters.png" alt="Perfmon Disk IO Counters" width="560" height="315" srcset="https://techyaz.com/wp-content/uploads/2017/11/Perfmon-Disk-IO-Counters.png 560w, https://techyaz.com/wp-content/uploads/2017/11/Perfmon-Disk-IO-Counters-300x169.png 300w" sizes="(max-width: 560px) 100vw, 560px" /></p>
<h5><span style="color: #333399;"><strong>Average Disk Sec/Read</strong></span></h5>
<p><strong>Average Disk Sec/Read</strong> is important perfmon disk counter that shows the average time in seconds needed to read data from disk and better explain the disk latency. We can find these counters at the logical and physical disk object level. The value for this counter is generally the number of seconds it takes to do each read. The shorter the time needed to read or write data, the faster the system. If you constantly get this counter value more than 20ms then it means your disk is not performing well.</p>
<p>Your disk performance is:</p>
<ul>
<li><strong>Excellent, </strong>if the value of this counter is less than 6 milliseconds (0.006 sec)</li>
<li><strong>Good</strong>, if the value of this counter is up to 15 milliseconds (0.015 sec)</li>
<li><strong>Poor</strong>, if the value is constantly more than 15 milliseconds (0.015 sec)</li>
</ul>
<h5><span style="color: #333399;"><strong>Average Disk Sec/Write</strong></span></h5>
<p><strong>Average Disk Sec/Write </strong>is also an important counter that shows the average time in seconds needed to write data to disk. that can better explain the disk latency. This counter can be tracked at the logical and physical disk level. The value for this counter is generally the number of seconds it takes to do each read. The shorter the time needed to read or write data, the faster the system. If you constantly get this counter value more than 20ms then it means your disk is not performing well.</p>
<p>Your disk performance is:</p>
<ul>
<li><strong>Excellent, </strong>if the value of this counter is less than 6 milliseconds</li>
<li><strong>Good</strong>, if the value of this counter is up to 15 milliseconds</li>
<li><strong>Poor</strong>, if the value is constantly more than 15 milliseconds.</li>
</ul>
<h5><span style="color: #333399;"><strong>Average Disk Sec/Transfer</strong></span></h5>
<p><strong>Average Disk Sec/Transfer</strong> is a time that measures average latency for read or write operations. If the Average Disk Sec/Transfer value increases, this indicates that the I/O subsystem is not optimally keeping up with the I/O demand. This counter is available under Logical Disk and Physical Disk object. If you are keeping a watch on this counter make sure to have a look at above perfmon disk counters <strong>Average Disk Sec/ Read</strong> and <strong>Average Disk Sec/Write</strong> as well because Average Disk Sec/Transfer is the average of both read and write counters so you need to find out high value is due to read operation or write operation. Below are the values that will tell you whether your disk is performing excellent, good or it is performing slow and requires your intervention to improve its performance.</p>
<p>Your disk performance is:</p>
<ul>
<li><strong>Excellent, </strong>if the value of this counter is less than 6 milliseconds</li>
<li><strong>Good</strong>, if the value of this counter is up to 15 milliseconds</li>
<li><strong>Poor</strong>, if the value is constantly more than 15 milliseconds.</li>
</ul>
<h5><span style="color: #333399;"><strong>Average Disk Queue Length</strong></span></h5>
<p><strong>Average Disk Queue Length</strong> counter shows you the average number of read and write requests that were queued on the selected physical disk. If this value is exceeding its threshold frequently then we should also look at other perfmon disk counters <strong>Average Disk Read Queue Length</strong> and <strong>Average Disk Write Queue Length</strong>. This way you can diagnose whether Average Disk Queue Length is high due to high read or high write operation. The recommended value for this counter is less than 2 per individual disk so if you have multiple disks then your recommended value for Average disk queue length would be twice the no of disks.</p>
<p><strong>Be careful</strong> when using thresholds of 2 with SQL Server and SANs.  This value can be much higher than 2 if you have multiple disks.  Let’s say you have 6 drives and Average disk queue length counter is showing around 12, then you should consider your Average disk queue length value 9/6 = 1.5 not 9.</p>
<p>Your disk performance is:</p>
<ul>
<li><strong>Excellent, </strong>if the value of this counter is less than 1.5 per drive.</li>
<li><strong>Good</strong>, if the value of this counter is up to 2 per drive.</li>
<li><strong>Poor</strong>, if the value is constantly more than 2 per drive,</li>
</ul>
<h5><span style="color: #333399;"><strong>Current Disk Queue Length</strong></span></h5>
<p><strong>Current Disk Queue Length</strong> is the number of disk requests that are currently waiting as well as requests currently being serviced. The difference between average disk queue length and current queue length is CDQL tells current load whereas ADQL tells load during a given time frame. The Current Disk Queue Length metric in Windows Performance Monitor is available for both physical and logical disk. The Current Disk Queue Length value should be less than 2 per disk.</p>
<p>Your disk performance is:</p>
<ul>
<li><strong>Excellent, </strong>if the value of this counter is less than 1.5 per drive.</li>
<li><strong>Good</strong>, if the value of this counter is up to 2 per drive.</li>
<li><strong>Poor</strong>, if the value is constantly more than 2 per drive.</li>
</ul>
<h5><span style="color: #333399;"><strong>Disk Read/Sec and Disk Write/Sec</strong></span></h5>
<p><strong>Disk Reads/Sec</strong> and <strong>Disk Writes/Sec</strong> show you the number of read and write operations happening per second on the disk. If you want to set the benchmark for disk capacity then you can determine it by gradually increasing the load on the system.</p>
<p>Your disk performance is:</p>
<ul>
<li><strong>Excellent, </strong>if the value of this counter is less than 75% of total disk capacity.</li>
<li><strong>Good</strong>, if the value of this counter is up to 85% of total disk capacity.</li>
<li><strong>Poor</strong>, if the value is constantly more than 85% of total disk capacity.</li>
</ul>
<h5><span style="color: #333399;"><strong>%Disk Time</strong></span></h5>
<p><strong>%Disk Time</strong> counter tells how busy the disk is in performing read and write operations. You can see its values normal even your disk has serious disk performance issue. You should compare its value with current/average disk queue length before reaching on any conclusion about disk issue.</p>
<p>Your disk performance is:</p>
<ul>
<li><strong>Excellent, </strong>if the value of this counter is less than 75% of total disk capacity.</li>
<li><strong>Good</strong>, if the value of this counter is up to 85% of total disk capacity.</li>
<li><strong>Poor</strong>, if the value is constantly more than 85% of total disk capacity.</li>
</ul>
<h5><span style="color: #333399;"><strong>%Idle Time</strong></span></h5>
<p><strong>%Idle Time</strong> measures the percentage of time the disk was idle during the sample interval. The disk is idle when it’s not processing read and write requests. If you are constantly getting its value less than 40% then you can either move some applications from your machine to another machine if you are running other applications as well apart from SQL Server or You can change the current disk system with a faster disk system.</p>
<p>Your disk performance is:</p>
<ul>
<li><strong>Excellent, </strong>if the value of this counter is greater than 60% of total disk capacity.</li>
<li><strong>Good</strong>, if the value of this counter is greater than 50% of total disk capacity.</li>
<li><strong>Poor</strong>, if the value is constantly less than 40% of total disk capacity.</li>
</ul>
<p><span style="color: #800000;"><strong><em>Related Articles:</em></strong></span></p>
<ul>
<li><strong><a href="https://techyaz.com/sql-server/performing-online-index-rebuild-operation/" target="_blank" rel="noopener">Disk and Performance Impact of running Online Index Rebuild Operation</a></strong></li>
<li><strong><a href="https://techyaz.com/sql-server/troubleshooting/sql-server-encountered-32-occurrences-requests-taking-longer-15-seconds-complete/" target="_blank" rel="noopener">How to fix IO error: SQL Server has encountered N occurrence(s) of I/O requests taking longer than 15 seconds to complete.</a></strong></li>
<li><strong><a href="https://techyaz.com/sql-server/improve-sql-server-bulk-data-import-performance/" target="_blank" rel="noopener">Improving Bulk Data Load Performance in SQL Server</a></strong></li>
<li><strong><a href="https://techyaz.com/sql-server/async_io_completion-wait-type/" target="_blank" rel="noopener">Understanding ASYNC_IO_COMPLETION Wait Type</a></strong></li>
</ul>
<p>I hope you like this article. Please follow our <a href="https://www.facebook.com/Techyaz/" target="_blank" rel="noopener">Facebook</a> page and <a href="https://twitter.com/Tech_yaz">Twitter </a>handle to get latest updates.</p>
<p>The post <a href="https://techyaz.com/sql-server/identify-disk-bottleneck-using-perfmon-counters/">Identify Disk Bottleneck in SQL Server using Perfmon Disk Counters</a> appeared first on <a href="https://techyaz.com">Techyaz.com</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techyaz.com/sql-server/identify-disk-bottleneck-using-perfmon-counters/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
	</channel>
</rss>
