<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Ask The Performance Team articles</title>
    <link>https://techcommunity.microsoft.com/t5/ask-the-performance-team/bg-p/AskPerf</link>
    <description>Ask The Performance Team articles</description>
    <pubDate>Tue, 28 Apr 2026 05:16:18 GMT</pubDate>
    <dc:creator>AskPerf</dc:creator>
    <dc:date>2026-04-28T05:16:18Z</dc:date>
    <item>
      <title>Collecting Debug Information from Containerized Applications</title>
      <link>https://techcommunity.microsoft.com/t5/ask-the-performance-team/collecting-debug-information-from-containerized-applications/ba-p/3986310</link>
      <description>&lt;H1 class="title"&gt;&amp;nbsp;&lt;/H1&gt;
&lt;H1 class="title"&gt;Collecting Debug Information from Containerized Applications&lt;/H1&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV id="outline-container-orgca9661c" class="outline-2"&gt;
&lt;H2 id="orgca9661c"&gt;&lt;SPAN class="section-number-2"&gt;1.&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;General Info&lt;/H2&gt;
&lt;DIV id="text-1" class="outline-text-2"&gt;
&lt;P&gt;Howdy everyone! It's your favorite Debug Engineer, Will Aftring back again, this time talking about containers. This blog post will assume that you have a fundamental understanding of Windows containers. If that isn't the case, then then I highly recommend reading&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://learn.microsoft.com/en-us/virtualization/windowscontainers/quick-start/run-your-first-container" target="_blank" rel="noopener"&gt;Get started: Run your first Windows container&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many developers and IT Admins are in the midst of migrating long standing applications into containers to take advantage of the myriad of benefits made available with containerization.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;I&gt;NOTE: Not all applications are able to equally take advantage of the benefits of containerization. It is another tool for the toolbox to be used at your discretion.&lt;/I&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But moving an existing application into a container can be a bit tricky. With this blog post I hope to help make that process a little bit easier for you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV id="outline-container-org312daba" class="outline-2"&gt;
&lt;H2 id="org312daba"&gt;&lt;SPAN class="section-number-2"&gt;2.&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Containerization steps:&lt;/H2&gt;
&lt;DIV id="text-2" class="outline-text-2"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV id="outline-container-org0482761" class="outline-3"&gt;
&lt;H3 id="org0482761"&gt;&lt;SPAN class="section-number-3"&gt;2.1.&lt;/SPAN&gt;1. Identify your dependencies&lt;/H3&gt;
&lt;DIV id="text-2-1" class="outline-text-3"&gt;
&lt;P&gt;One of the benefits of containers is the limited deployment size that can be leveraged by Windows containers. A Windows Server Nano container can be as small as a few hundred megabytes!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, as a part of trimming down the image size for the base container image, many things have been removed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example, in a Windows Server Nano container, much of the .NET framework has been removed. Meaning if your application is dependent on the .NET framework, then using a nano container image isn't viable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now application dependencies can be both within the Operating System (OS) or from the application itself. If you have segmented your application into executables and Dynamic Link Libraries (DLLs) then the container image needs to have those files available within the container image.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV id="outline-container-org7fa5ec4" class="outline-3"&gt;
&lt;H3 id="org7fa5ec4"&gt;&lt;SPAN class="section-number-3"&gt;2.2.&lt;/SPAN&gt;2. Find your configurations&lt;/H3&gt;
&lt;DIV id="text-2-2" class="outline-text-3"&gt;
&lt;P&gt;In the Windows world, many developers manage the storage of configuration for their application via the Windows Registry. As a part of the containerization of the application, it will no longer share a registry hive with the container host. If you want your applications registry keys in place then you must add them either in the deployment of the container image or in the runtime of the application itself.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This also extends to local files and environment variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV id="outline-container-org7c87b34" class="outline-3"&gt;
&lt;H3 id="org7c87b34"&gt;&lt;SPAN class="section-number-3"&gt;2.3.&lt;/SPAN&gt;3. Figuring out what you need to communicate with over the network&lt;/H3&gt;
&lt;DIV id="text-2-3" class="outline-text-3"&gt;
&lt;P&gt;As Ned Pyle so elegantly put it in&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://techcommunity.microsoft.com/t5/ask-the-directory-services-team/accelerating-your-it-career/ba-p/399716" target="_blank" rel="noopener"&gt;Accelerating Your IT Career&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;It's hard to find an IT system talking only to itself. Notepad, maybe (until you save a file to a network share).&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It is almost guaranteed that your application will be leveraging the network at least to some degree. If it is a device on another container host then your problems are relatively simple:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL class="org-ul"&gt;
&lt;LI&gt;How are you going to resolve the name of the host running the relevant network endpoint?&lt;/LI&gt;
&lt;LI&gt;How is that outbound communication going to make its way back to the container?
&lt;UL class="org-ul lia-list-style-type-circle"&gt;
&lt;LI&gt;If you are using a NAT or Transparent network driver, then the behavior is similar to that of a VM&lt;/LI&gt;
&lt;LI&gt;If you are trying to use an L2Bridge then you need to make sure that the device you are communicating with is within the same LAN&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;If you are intending on containerizing the endpoint workload as well then things get a bit more complex. Intra-container communication is outside the scope of this blog post but if you are reading my other series on&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://aka.ms/WillAftring" target="_blank" rel="noopener"&gt;Introduction to Network Trace Analysis&lt;/A&gt;, then you should have some good fundamentals in place to understand this communication.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV id="outline-container-orgdf278b1" class="outline-2"&gt;
&lt;H2 id="orgdf278b1"&gt;&lt;SPAN class="section-number-2"&gt;3.&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;I've moved my application into a container and it isn't working. Help me!&lt;/H2&gt;
&lt;DIV id="text-3" class="outline-text-2"&gt;
&lt;P&gt;First, don't panic. If application configuration were easy, it would be called baseball.&lt;/P&gt;
&lt;P&gt;There are a few things we can do to get started with understanding the issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;
&lt;DIV id="outline-container-orgd924a7a" class="outline-3"&gt;
&lt;H3 id="orgd924a7a"&gt;&lt;SPAN class="section-number-3"&gt;3.1.&lt;/SPAN&gt;1. Is there anything logged to the console?&lt;/H3&gt;
&lt;DIV id="text-3-1" class="outline-text-3"&gt;
&lt;P&gt;Anything that is written to the standard output (stdout) stream or standard error (stderr) is accessible from the container host.&lt;/P&gt;
&lt;P&gt;Depending on your container runtime interface (CRI) you can use one of the following commands to read this output.&lt;/P&gt;
&lt;UL class="org-ul"&gt;
&lt;LI&gt;With docker
&lt;UL class="org-ul"&gt;
&lt;LI&gt;&lt;CODE&gt;docker logs &amp;lt;container id&amp;gt;&lt;/CODE&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;With Containerd
&lt;UL class="org-ul"&gt;
&lt;LI&gt;&lt;CODE&gt;ctr task attach &amp;lt;container id&amp;gt;&lt;/CODE&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV id="outline-container-orgb269504" class="outline-3"&gt;
&lt;H3&gt;&amp;nbsp;&lt;/H3&gt;
&lt;H3 id="orgb269504"&gt;&lt;SPAN class="section-number-3"&gt;3.2.&lt;/SPAN&gt;2. Are there any relevant log files being written to the disk?&lt;/H3&gt;
&lt;DIV id="text-3-2" class="outline-text-3"&gt;
&lt;P&gt;Collecting log files is often an easier option. As a part of the container configuration, you are able to create a mapping between directories on the container host and directories within the container.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the sake of being CRI independent you can use the Windows tool&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;hcsdiag&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to make the location.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example, if you are writing your log files to C:\Logs in the container, you can map that location to C:\&amp;lt;ServiceName&amp;gt;\Logs on the container host and read them in real-time.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL class="org-ul"&gt;
&lt;LI&gt;&lt;CODE&gt;hcsdiag share &amp;lt;container id&amp;gt; C:\Demo\Logs C:\Logs&lt;/CODE&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Then read the log files from&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;C:\Demo\Logs&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;on the container host.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV id="outline-container-org4b824a4" class="outline-3"&gt;
&lt;H3 id="org4b824a4"&gt;&lt;SPAN class="section-number-3"&gt;3.3.&lt;/SPAN&gt;3. Leveraging External Tools&lt;/H3&gt;
&lt;DIV id="text-3-3" class="outline-text-3"&gt;
&lt;P&gt;In&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;I&gt;(most)&lt;/I&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;container images, many of your typical Windows troubleshooting tools are still available. And through hcsdiag, you can invoke commands directly in the container.&lt;/P&gt;
&lt;UL class="org-ul"&gt;
&lt;LI&gt;You can use wevtutil to export event logs.&lt;/LI&gt;
&lt;LI&gt;You can use klist to display kerberos tickets&lt;/LI&gt;
&lt;LI&gt;You can use Windows Error Reporting (WER) to collect process crash dumps&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;And through the mapping of a container directory to a container host directory, you can easily access the relevant debugging data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Combining a mapped directory with the ability to run commands from within the container you can run all your favorite debugging tools from within the container.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example, if you wanted to use&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://aka.ms/procdump" target="_blank" rel="noopener"&gt;procdump&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;as the post-mortem debugger, you can do so:&lt;/P&gt;
&lt;OL class="org-ol"&gt;
&lt;LI&gt;Identify the container id
&lt;OL class="org-ol"&gt;
&lt;LI&gt;&lt;CODE&gt;hcsdiag list&lt;/CODE&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;/LI&gt;
&lt;LI&gt;Ensure that you have shared mapping between the container and the container host
&lt;OL class="org-ol"&gt;
&lt;LI&gt;&lt;CODE&gt;hcsdiag share &amp;lt;container id&amp;gt; C:\Dumps C:\Dumps&lt;/CODE&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;I&gt;Please note, this mapping will remain until a restart of the container host&lt;/I&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;/LI&gt;
&lt;LI&gt;Setup procdump as the post-mortem debugger
&lt;OL class="org-ol"&gt;
&lt;LI&gt;&lt;CODE&gt;hcsdiag exec &amp;lt;container id&amp;gt; "C:\Dumps\procdump.exe" "-accepteula" "-i" "-ma"&lt;/CODE&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;/LI&gt;
&lt;LI&gt;Wait for the crash to occur and it will be written to C:\Dumps on the container host&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;And using the basic format, substitute in your tool of choice for what you would like to do.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV id="outline-container-org8278def" class="outline-3"&gt;
&lt;H3 id="org8278def"&gt;&lt;SPAN class="section-number-3"&gt;3.4.&lt;/SPAN&gt;4. Memory Dumps&lt;/H3&gt;
&lt;DIV id="text-3-4" class="outline-text-3"&gt;
&lt;P&gt;We all know our applications don't live in isolation. They need to read and write files and rely upon the Windows kernel. In some cases when debugging something like this you may want to collect a memory dump of the machine.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The good news is if you are running your containers in process isolation mode (the default) all you need to do is collect a memory dump of the container host.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since the container host and the container share the same Windows Kernel, if you collect a complete memory dump of the container host, then the processes running within the container will be captured as well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Within the memory dump the items in the container will present themselves as if they are running in a different session but you can proceed debugging to your hearts content.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV id="outline-container-org3616f68" class="outline-2"&gt;
&lt;H2 id="org3616f68"&gt;&lt;SPAN class="section-number-2"&gt;4.&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Summarizing&lt;/H2&gt;
&lt;DIV id="text-4" class="outline-text-2"&gt;
&lt;P&gt;See? Not so bad! Once you learn a few tips and tricks it isn't so different than debugging and application running anywhere else in Windows. I hope you find this post helpful in expediting your lift and shift projects.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Happy debugging!&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 17 Jan 2024 04:56:51 GMT</pubDate>
      <guid>https://techcommunity.microsoft.com/t5/ask-the-performance-team/collecting-debug-information-from-containerized-applications/ba-p/3986310</guid>
      <dc:creator>Becky</dc:creator>
      <dc:date>2024-01-17T04:56:51Z</dc:date>
    </item>
    <item>
      <title>How to Use TSS to Collect Data and Analyze to Solve High CPU Issues</title>
      <link>https://techcommunity.microsoft.com/t5/ask-the-performance-team/how-to-use-tss-to-collect-data-and-analyze-to-solve-high-cpu/ba-p/3721084</link>
      <description>&lt;P&gt;&lt;FONT size="4"&gt;&lt;STRONG&gt;H&lt;/STRONG&gt;&lt;STRONG&gt;ow to Use TSS to Collect Data and Analyze to Solve High CPU Issues.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Hello everyone, this is Denzel with the Windows Performance Team. I found a tool that actively collects different data based on scenarios and streamlines the data collection process. Drumroll – introducing TSS (Troubleshooting Support Script).&amp;nbsp;&amp;nbsp;In my job, I see a lot of High CPU cases and collecting an ETL trace using TSS with Xperf aka WPR for high CPU has been fundamental in resolving issues.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I’d like to share some instructions, methods, and just insight on the tools in general that should be able to empower IT professionals resolve issues. This post will show how the TSS tool can work with the Windows Performance Recorder. TSS also works with several tools as it is very powerful but will focus on collecting a WPR trace using TSS when regarding a case of High CPU. I can even give you a great clue as to how to collect data for Intermittent High CPU cases as well! Once you have the data, I’ll then show you how to analyze it. Lastly, I’ll provide some additional resources on WPA Analysis for High CPU.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Data Collection Tools:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;TSS&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;TSS (TroubleShootingScript) is a code signed, PowerShell based Tool and Framework for rapid flexible data collection with a goal to resolve customer support cases in the most efficient and secure way. TSS offers an extensible framework for developers and engineers to incorporate their specific tracing scenarios.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;WPR/Xperf&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;“Windows Performance Recorder (WPR) is a performance recording tool that is based on Event Tracing for Windows (ETW). It records system and application events that you can then analyze by using Windows Performance Analyzer (WPA). You can use WPR together with Windows Performance Analyzer (WPA) to investigate particular areas of performance and to gain an overall understanding of resource consumption.”&lt;/P&gt;
&lt;P&gt;*Xperf is strictly a command line tool, and it can be used interchangeably with the WPR tool.*&lt;/P&gt;
&lt;P&gt;_________________________________________________________________________________________________________________________________________________&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Let’s Dig in!&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;You notice your server or device is running with 90% high CPU. Your users are complaining of latency and poor performance. You have checked task manager, resource monitor or even downloaded and opened process explorer but there is still no exact root resource glaring you in the face. No worries, a WPR will break down the high CPU processes a bit more. You could even skip straight to this step in the future when you get comfortable working with these tools.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Setup TSS&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Running a TSS troubleshooting script with the parameters for either WPR or Xperf gathers some granular Performance data on machines showing the issue. In the example below, I’m saving the TSS the script to &lt;span class="lia-unicode-emoji" title=":anguished_face:"&gt;😧&lt;/span&gt; (note the default data location is&amp;nbsp; c:\MS_Data). In your web browser, download TSS.zip found here:&amp;nbsp;&lt;A href="https://aka.ms/getTSS" target="_blank" rel="noopener"&gt;https://aka.ms/getTSS&lt;/A&gt;&amp;nbsp;or you can Open an Administrative PowerShell Prompt and paste the following commands.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The commands below will automatically prepare the machine to run TSS by taking the following actions in the given order:&lt;/P&gt;
&lt;UL class="lia-list-style-type-disc"&gt;
&lt;LI&gt;Create D:\TSS folder&lt;/LI&gt;
&lt;LI&gt;Set the PowerShell script execution policy to RemoteSigned for the Process level (process level changes only affect the current PowerShell window)&lt;/LI&gt;
&lt;LI&gt;Set TLS type to 1.2 and download the TSS zip file from Microsoft&lt;/LI&gt;
&lt;LI&gt;Expand the TSS.zip file into D:\TSS folder&lt;/LI&gt;
&lt;LI&gt;Change to D:\TSS folder&lt;/LI&gt;
&lt;/UL&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;Ex: Commands used below&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;md D:\TSS&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;Set-ExecutionPolicy -scope Process -ExecutionPolicy RemoteSigned -Force&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;Start-BitsTransfer&amp;nbsp;&lt;A href="https://aka.ms/getTSS" target="_blank" rel="noopener"&gt;https://aka.ms/getTSS&amp;nbsp;&lt;/A&gt;-Destination D:\TSS\TSS.zip&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;Expand-Archive -LiteralPath D:\TSS\TSS.zip -DestinationPath D:\TSS -force&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;cd D:\TSS&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;The result will be a folder named TSS on drive D.&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&amp;nbsp;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;_________________________________________________________________________________________________________________________________________________&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Gathering Data using TSS&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Open an elevated PowerShell window (or start PowerShell with elevated privileges) and change the directory to this folder:&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;cd D:\TSS\&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;*WARNING*&lt;/STRONG&gt; Data collection grows rather large quickly.&amp;nbsp; You should have at least 30% of your overall RAM available as hard drive space.&amp;nbsp; (Example, if you have 8 GB of RAM – then the file can grow to 2.5GB or larger in c:\MS_Data.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What are some of the scenarios you might have? Maybe you want to manually collect the trace. Or, once you start the trace, let it automatically stop.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How about limiting the file size? There are several parameters you can adjust for your needs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below you will find variations of using TSS to collect WPR data in high CPU occurrences. You have an option of using either WPR or Xperf commands. &amp;nbsp;Please review all of them before deciding which trace to take for your environment.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;STRONG&gt;1.&amp;nbsp; &amp;nbsp;Scenario In State needing user intervention to stop the trace: &lt;/STRONG&gt;The issue is currently occurring, and the following example needs user intervention to stop the trace. The WPR can grow to 80% of the memory with the example commands listed below.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-60px"&gt;&lt;STRONG&gt;.\Tss.ps1 -WPR General&lt;/STRONG&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; *** (run it for 60 seconds to no longer than 3 minutes)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;.\Tss.ps1 -Xperf CPU&lt;/STRONG&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ***(run it for 60 seconds to no longer than 3 minutes)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;Default location of saved data will be C:\MS_Data.&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;BR /&gt;The prompt will tell you when to reproduce the issue, just simply enter “&lt;STRONG&gt;Y&lt;/STRONG&gt;” will &lt;STRONG&gt;END&lt;/STRONG&gt; the trace at that time and the machine in question experiencing high CPU will then finish running the data collection.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;STRONG&gt;2.&lt;/STRONG&gt;&amp;nbsp; &lt;STRONG&gt;Scenario In State but you wanted to limit the size and length of time: &lt;/STRONG&gt;The issue is currently occurring; the following example does NOT need user intervention to stop the trace. Default location of saved data will be C:\MS_Data. The Xperf can grow to 4GB of memory and runs for 5 minutes with the setting below:&lt;/P&gt;
&lt;P class="lia-indent-padding-left-60px"&gt;&lt;BR /&gt;&amp;nbsp;&lt;STRONG&gt;.\TSS.ps1 -Xperf CPU -XperfMaxFileMB 4096 -StopWaitTimeInSec 300&lt;/STRONG&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;STRONG&gt;&lt;U&gt;Note&lt;/U&gt;:&amp;nbsp;&lt;/STRONG&gt;you can modify the size and length of the trace by increasing or decreasing&amp;nbsp;-XperfMaxFileMB and -StopWaitTimeInSec when it is initially run.&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;STRONG&gt;3.&amp;nbsp;&lt;/STRONG&gt; &lt;STRONG&gt;Scenario In State but you wanted to limit the size and length of time with data saved on Z:\Data drive instead of C:\MS_DATA (default): &lt;/STRONG&gt;The issue is currently occurring; the following example does NOT need user intervention to stop the trace. The Xperf can grow to 4GB of the memory and runs for 5 minutes with the setting below&lt;STRONG&gt; and this time the resulting data will be saved on Z:\Data&lt;/STRONG&gt;. You simply need to add &lt;STRONG&gt;-LogFolderPath Z:\Data &lt;/STRONG&gt;to the command.&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-60px"&gt;&lt;STRONG&gt;.\TSS.ps1 -Xperf CPU -XperfMaxFileMB 4096 -StopWaitTimeInSec 300 -LogFolderPath Z:\Data&lt;/STRONG&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-60px"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;STRONG&gt;4.&lt;/STRONG&gt;&amp;nbsp; &lt;STRONG&gt;Scenario&lt;/STRONG&gt;&lt;STRONG&gt; Intermittent High CPU and having a tough time capturing data:&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;These commands will wait for the CPU to reach 90%, start a trace and will stop the file from growing larger than 4GB while running for 5 minutes.&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-60px"&gt;&lt;STRONG&gt;.\TSS.ps1 -Xperf CPU -WaitEvent HighCPU:90 -XperfMaxFileMB 4096 -StopWaitTimeInSec 300&lt;/STRONG&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-60px"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;STRONG&gt;5.&lt;/STRONG&gt;&amp;nbsp; &lt;STRONG&gt;Scenario Intermittent High CPU and having a tough time capturing data:&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;These commands will wait for the CPU to reach 90%, start a trace and will stop the file from growing larger than 4GB while running for 100 seconds (1.5 minutes roughly).&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-60px"&gt;&lt;STRONG&gt;.\TSS.ps1 -Xperf CPU -WaitEvent HighCPU:90 -StopWaitTimeInSec 100&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Pro Tip:&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;You can check for additional Xperf/WPR commands by doing a search on the help command files in TSS by typing&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;STRONG&gt;.\TSS.ps1 -help&lt;/STRONG&gt;&amp;nbsp;at the prompt.&amp;nbsp; When prompted to enter a number or keyword, type xperf or wpr, hit enter, and you will see the options.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;Ex: Finding help with keyword ‘xperf’&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Be sure to wait for the TSS script to finish, it can take some time (even an hour to finish writing out). The PowerShell will return to type line and the folder in C:\MS_Data should zip itself when complete. The location of the script does not determine the location of the data collected.&amp;nbsp;&amp;nbsp;Wait for trace to finish before exiting PowerShell.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Reminder&lt;/U&gt;:&amp;nbsp;&lt;/STRONG&gt;&amp;nbsp;Just like in the first trace, you learned data collection grows rather large quickly.&amp;nbsp; You should have at least 30% of your overall RAM available as hard drive space. (Example, if you have 8 GB of RAM – then the file can grow to 2.5GB or larger on c:\MS_Data.)&lt;/P&gt;
&lt;P&gt;_________________________________________________________________________________________________________________________________________________&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;You have the Data – Now Let’s look at it!&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Download the Windows ADK (Windows Assessment and Deployment Kit) from this location:&amp;nbsp; &lt;A href="https://learn.microsoft.com/en-us/windows-hardware/get-started/adk-install" target="_blank" rel="noopener"&gt;Download and install the Windows ADK | Microsoft Learn&lt;/A&gt;.&amp;nbsp;&amp;nbsp;Once you download the Windows ADK, you want to install the Windows Performance Toolkit.&amp;nbsp; Double click on the executable (.exe) to start the installation process.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Uncheck everything except Windows Performance Toolkit, then click &lt;STRONG&gt;Install&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Opening the data in the C:\MS_DATA folder&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;When complete, the WPR general TSS command should have placed all collected data into this folder in a zipped file.&amp;nbsp;You will know the trace ran all the way without stopping prematurely when you see the zipped file in C:\MS_DATA.&amp;nbsp; There will also be a message in the PowerShell window when the diagnostic completes stating the name of and the location of the zipped file.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You will need to unzip the zipped file to analyze the WPR trace (.etl file).&amp;nbsp; After unzipping, you will see several data collections that can be helpful with analysis.&amp;nbsp; However, what you mainly want to look at is the .etl file which is usually the biggest file located in the folder.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;If you double click the .ETL file it should open in WPA, but if not, you can manually open the newly installed application and navigate to your file.&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Example:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;You can open the .ETL file to view the WPR trace with WPA (Windows Performance Analyzer) by clicking &lt;STRONG&gt;File, Open&lt;/STRONG&gt; and then browsing to the file that ends with the .ETL extension.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Step 1.&lt;/STRONG&gt;&amp;nbsp; Open WPR trace in WPA and load the Public Symbols.&amp;nbsp; You may also see symbols listed from the NGEN folder (NGEN is part of the folder name) collected at the time the WPR trace was run.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Select &lt;STRONG&gt;Trace&lt;/STRONG&gt;, select &lt;STRONG&gt;Configure Symbol Paths&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Click &lt;STRONG&gt;+ &lt;/STRONG&gt;sign (highlighted in yellow in screenshot below), then enter Public Symbol Path: &lt;STRONG&gt;srv*c:\symbols*&lt;A href="https://msdl.microsoft.com/download/symbols" target="_blank" rel="noopener"&gt;https://msdl.microsoft.com/download/symbols&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;More Information: (&lt;A href="https://learn.microsoft.com/en-us/windows-hardware/drivers/debugger/symbol-path" target="_blank" rel="noopener"&gt;Symbol path for Windows debuggers - Windows drivers | Microsoft Learn&lt;/A&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Once symbols are configured simply click &lt;STRONG&gt;Load Symbols&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Step 2.&lt;/STRONG&gt; Once open you should see a window similar to the screenshot below.&amp;nbsp; Expand &lt;STRONG&gt;Computation&lt;/STRONG&gt; on the left and drag &lt;STRONG&gt;CPU Usage (Sampled)&lt;/STRONG&gt; to the right side of the Window to load. You can also double click &lt;STRONG&gt;CPU Usage (Sampled) &lt;/STRONG&gt;for it appear on the right side.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You will then see space on the top graph showing, “Trace Rundown”. That is not needed as it is the part of the trace where the script was finishing up. To get rid of the trace rundown, highlight the area before trace rundown, right click, then select “&lt;STRONG&gt;Zoom&lt;/STRONG&gt;”.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can now filter down each of your processes deeper and deeper to try to locate a potential root cause of what is spiking the CPU. You can look to see which processes have the highest weight over on the right-hand columns to help pinpoint the highest consumers. It may be a specific kernel driver, application, process, etc. but this should help point you in the right direction of what process is exhausting resources.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;These are the columns you will want to focus on:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Left of Gold Bar:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Process&lt;/P&gt;
&lt;P&gt;Stack&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Right of Gold Bar:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Count&lt;/P&gt;
&lt;P&gt;Weight&lt;/P&gt;
&lt;P&gt;% Weight&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can see the CPU usage is the highest due to CPUSTRESS.EXE in this example. As you filter down you can see the threads that contribute to the max CPU spike which is visible in % weight sum. This can be helpful to find out which threads, functions and modules are called for the root cause.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Step 3. &lt;/STRONG&gt;You can open graph, "Utilization By CPU" for additional analysis.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;By adding the process column on the left side of the gold bar you can confirm which processes are the highest consumer % weight wise on each CPU. To add the process column, right click on one of the column titles and select more columns as instructed in screenshot below. You can then filter down each individual processor and view the CPU percentages per process.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Conclusion:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Once again this is not the only use for the TSS tool. But as you can see, the WPR/Xperf trace is a very complex tool that gathers data from a simple PowerShell command. This can be very efficient for troubleshooting. This article is not meant to cover all scenarios. However, I highly recommend taking some time to learn more about what TSS can accomplish as this tool will only continue to get better. &lt;BR /&gt;&lt;BR /&gt;If at any point you get stuck don’t hesitate to open a support case with Microsoft.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Addition&lt;/STRONG&gt;&lt;STRONG&gt;al Information:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="3"&gt;Information on TSS and alternative download site:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/troubleshoot/windows-client/windows-tss/introduction-to-troubleshootingscript-toolset-tss" target="_blank" rel="noopener"&gt;Introduction to TroubleShootingScript toolset (TSS) - Windows Client | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Information about Windows Performance Toolkit&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/windows-hardware/test/wpt/" target="_blank" rel="noopener"&gt;Windows Performance Toolkit | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;For Reference:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Download Windows Assessment Toolkit which contains Windows Performance Analyzer&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/windows-hardware/get-started/adk-install" target="_blank" rel="noopener noreferrer"&gt;Download and install the Windows ADK | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="3"&gt;How to setup public symbols&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="3"&gt;&lt;U&gt;&lt;A href="https://learn.microsoft.com/en-us/windows-hardware/drivers/debugger/symbol-path" target="_blank" rel="noopener"&gt;Symbol path for Windows debuggers - Windows drivers | Microsoft Learn&lt;/A&gt;&lt;/U&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2024 17:08:51 GMT</pubDate>
      <guid>https://techcommunity.microsoft.com/t5/ask-the-performance-team/how-to-use-tss-to-collect-data-and-analyze-to-solve-high-cpu/ba-p/3721084</guid>
      <dc:creator>Becky</dc:creator>
      <dc:date>2024-02-26T17:08:51Z</dc:date>
    </item>
    <item>
      <title>Understanding Lock Contention in Windows Performance Analyzer (WPA)</title>
      <link>https://techcommunity.microsoft.com/t5/ask-the-performance-team/understanding-lock-contention-in-windows-performance-analyzer/ba-p/3507387</link>
      <description>&lt;H1&gt;&lt;FONT size="5"&gt;Understanding Lock Contention in WPA&lt;/FONT&gt;&lt;/H1&gt;
&lt;P&gt;&lt;SPAN&gt;Hi everyone, this is Will&amp;nbsp;Aftring&amp;nbsp;with the Windows Debug team. I was debugging an application performance issue and thought “this is a great example of lock contention”.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For this post we will be using the Windows Performance Analyzer (WPA) to review data collected with the Windows Performance Recorder (WPR). For the sake of keeping this post focused I won’t go in depth on WPR but there are plenty of resources on how to get started. &lt;A href="https://docs.microsoft.com/en-us/windows-hardware/test/wpt/getting-started--windows-performance-recorder--wpr-" target="_blank" rel="noopener"&gt;Getting Started Windows Performance Recorder | Microsoft Docs&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let’s start with some vocabulary regarding thread states.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;Schedule a thread:&lt;/STRONG&gt; To schedule a thread is to ensure that it is the next thread to run on the CPU&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Preempt a thread:&lt;/STRONG&gt; To remove a thread from a processor before it has completed its work or yielded for another thread to run.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Ready:&lt;/STRONG&gt; This thread is ready to run and is consideration for next to hop on the CPU&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Deferred:&lt;/STRONG&gt; This thread is waiting to run on a specific processor but hasn’t been scheduled yet.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Standby:&lt;/STRONG&gt; This thread has been selected to run next on a specific processor. When a specific condition is met, the dispatcher switches in the thread.
&lt;UL&gt;
&lt;LI&gt;&lt;EM&gt;Important:&lt;/EM&gt; Only one thread can be in standby state for each processor on the system&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Running:&lt;/STRONG&gt; This thread is currently on the CPU doing, performing work&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Waiting:&lt;/STRONG&gt; A thread that is waiting for a specific condition to be met. This can be either voluntary (ie &lt;A href="https://docs.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-waitforsingleobject" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;WaitForSingleObject&lt;/SPAN&gt;&lt;/A&gt;) or involuntary (waiting for memory to be paged-in). When the condition is met the thread is moved back into a ready state.
&lt;UL&gt;
&lt;LI&gt;It is important to keep in mind that Windows does &lt;STRONG&gt;not&lt;/STRONG&gt; follow a FIFO model for waiting threads.&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Transition:&lt;/STRONG&gt; A thread enters this state if it’s ready for execution, but its kernel stack is paged out of memory. Once its kernel stack is brough back into memory, the thread enters a ready state.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Terminated:&lt;/STRONG&gt; When a thread finishes executing or is told to terminate (&lt;A href="https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-terminatethread" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;TerminateThread&lt;/SPAN&gt;&lt;/A&gt;), it enters this state.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Here is a flow diagram that covers the thread interaction:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now that we have laid our groundwork for thread states, let’s jump into some analysis.&lt;/P&gt;
&lt;P&gt;Below I have the CPU precise view open.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let’s clarify what these columns mean.&lt;/P&gt;
&lt;TABLE width="100%"&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TD width="15.95959595959596%"&gt;
&lt;P&gt;&lt;STRONG&gt;Name&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="83.93939393939394%"&gt;
&lt;P&gt;&lt;STRONG&gt;Description&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="15.95959595959596%"&gt;
&lt;P&gt;New Process&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="83.93939393939394%"&gt;
&lt;P&gt;The process being readied&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="15.95959595959596%"&gt;
&lt;P&gt;New Thread Id&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="83.93939393939394%"&gt;
&lt;P&gt;The thread id within the process specified in New Process&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="15.95959595959596%"&gt;
&lt;P&gt;New Thread Stack&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="83.93939393939394%"&gt;
&lt;P&gt;The call stack that is running during a specific time&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="15.95959595959596%"&gt;
&lt;P&gt;Ready Thread Stack&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="83.93939393939394%"&gt;
&lt;P&gt;The call stack that readied the new thread stack&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="15.95959595959596%"&gt;
&lt;P&gt;Readying Process&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="83.93939393939394%"&gt;
&lt;P&gt;The process owning the ready thread stack&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="15.95959595959596%"&gt;
&lt;P&gt;Readying Thread Id&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="83.93939393939394%"&gt;
&lt;P&gt;Thread that owns the ready thread stack&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="15.95959595959596%"&gt;
&lt;P&gt;Yellow Bar&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="83.93939393939394%"&gt;
&lt;P&gt;This indicates a pivot point in the data and moving columns across this bar will change how the information is displayed&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="15.95959595959596%"&gt;
&lt;P&gt;Count&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="83.93939393939394%"&gt;
&lt;P&gt;Number of calls to this function&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="15.95959595959596%"&gt;
&lt;P&gt;CPU Usage (sum)&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="83.93939393939394%"&gt;
&lt;P&gt;The cumulative time the specified thread / process spends before it was switched back out&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="15.95959595959596%"&gt;
&lt;P&gt;Ready time (sum)&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="83.93939393939394%"&gt;
&lt;P&gt;The cumulative time the specified thread / process spent in readied state&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="15.95959595959596%"&gt;
&lt;P&gt;Waits time (sum)&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="83.93939393939394%"&gt;
&lt;P&gt;The cumulative time the specified thread / process spent in a waiting state&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="15.95959595959596%"&gt;
&lt;P&gt;Ready time (max)&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="83.93939393939394%"&gt;
&lt;P&gt;The maximum single ready time seen for the specified thread / process&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="15.95959595959596%"&gt;
&lt;P&gt;Wait time (max)&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="83.93939393939394%"&gt;
&lt;P&gt;The maximum single wait time seen for the specified thread / process&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;&lt;STRONG&gt;&lt;FONT size="4"&gt;Understanding waits with an example program&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/H2&gt;
&lt;P&gt;I know I just threw two pages of definitions at you so let’s put this new info into practice with an example.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This program does the following:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;SPAN&gt;main&lt;/SPAN&gt;
&lt;UL&gt;
&lt;LI&gt;Initializes a &lt;A href="https://docs.microsoft.com/en-us/windows/win32/sync/critical-section-objects" target="_blank" rel="noopener"&gt;Critical Section Object&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;Creates 200 threads that will all run the &lt;SPAN&gt;CritThread&lt;/SPAN&gt; function&lt;/LI&gt;
&lt;LI&gt;Wait for user input&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;CritThread&lt;/SPAN&gt;
&lt;UL&gt;
&lt;LI&gt;Attempt to acquire a critical section&lt;/LI&gt;
&lt;LI&gt;Print to console&lt;/LI&gt;
&lt;LI&gt;Leave critical section&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;While any of the threads running the &lt;SPAN&gt;CritThread&lt;/SPAN&gt; function owns the critical section, none of the other threads in this application can enter that critical section.&lt;/P&gt;
&lt;P&gt;If we have 5 threads (1,2,3,4,5) and thread 1 calls &lt;A href="https://docs.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-entercriticalsection" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;EnterCriticalSection&lt;/SPAN&gt;&lt;/A&gt; on &lt;SPAN&gt;g_CS&lt;/SPAN&gt;, threads 2-5 will wait in &lt;SPAN&gt;EnterCriticalSection&lt;/SPAN&gt; until thread 1 has called &lt;A href="https://docs.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-leavecriticalsection" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;LeaveCriticalSection&lt;/SPAN&gt;&lt;/A&gt;. You can think about this like driving a car, only one person can drive at a time.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now that we understand how this interaction is supposed to work, what does it look like in WPR?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As we follow the cumulative wait times column, we can see that starting in the highlighted frame below, we have a big drop off in the wait time.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is a zoom in of the same highlighted frame above.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We can see thread 5652 is waiting for a critical section, but what does that mean in the context of the columns?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Count 110: This function was called 110 times&lt;/LI&gt;
&lt;LI&gt;CPU Usage 0.791: This function spent 0.791 ms before the thread was switched out&lt;/LI&gt;
&lt;LI&gt;Ready time (sum) 852.600: This function spends a cumulative 852 &lt;STRONG&gt;microseconds&lt;/STRONG&gt; in a ready state&lt;/LI&gt;
&lt;LI&gt;Wait times (sum) 4,320,242: This function spent a cumulative 4,340,242 &lt;STRONG&gt;microseconds&lt;/STRONG&gt; in a ready state&lt;/LI&gt;
&lt;LI&gt;Ready time (max) 33.700: The longest amount of time that the function spent in a ready state was 33.700 &lt;STRONG&gt;microseconds&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;Wait times (max) 183,466: The longest single wait time this function had was 183,466.800 &lt;STRONG&gt;microseconds&lt;/STRONG&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Let’s go even deeper. If we look at the &lt;SPAN&gt;ntdll.dll!RtlEnterCriticalSection&lt;/SPAN&gt; we can see that the thread stack can be expanded further to show the readying stack of the thread that readied 5652.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;In the red box, we can see the call stack of the threads that readied thread 5652.&lt;/P&gt;
&lt;P&gt;In the green box, we can see the thread id of each thread that readied thread 5652.&lt;/P&gt;
&lt;P&gt;Meaning that each of those threads at one time had the red box call stack which readied the new thread.&lt;/P&gt;
&lt;P&gt;Let’s shift the view to the columns on the right side of the yellow bar, there are a few important things to keep in mind.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Breaking down thread 484, in the purple box there are a total of 3 threads (red, blue, and green) that have readied thread 5652.&lt;/P&gt;
&lt;P&gt;Looking at our columns, we can see that each of those instances has its own value for the columns. This makes sense because each of these single instances is an occurrence of the readying thread stack.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thinking through the display, we can see that each of the wait times from the readying thread contributes to the cumulative wait time. Now from the wait times displayed, none of the individual waits are particularly long.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With none of the waits being particularly long, the cumulative effect is death by a thousand paper cuts. Resulting in lock contention.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;&lt;FONT size="4"&gt;Important! Readying thread vs lock owner&lt;/FONT&gt;&lt;/H3&gt;
&lt;P&gt;When considering readying threads and locks it can be understandable to think that just because a readying thread is releasing a lock that it has owned that lock for the full duration of the wait.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;While that may be true when there are only two threads, that is not necessarily true when you have more threads.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In this scenario, thread 1 will &lt;STRONG&gt;always&lt;/STRONG&gt; ready thread 2 and thread 2 will &lt;STRONG&gt;always&lt;/STRONG&gt; ready thread 1. And if it is taking a long time to acquire the critical section it is because the other thread &lt;STRONG&gt;must&lt;/STRONG&gt; be doing something that is taking a long time.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But as we increase the number of threads, the complexity increases along with the waiting times.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In this scenario thread 2 readied thread 4 but while thread 4 was waiting the critical section was owned by:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Thread 1&lt;/LI&gt;
&lt;LI&gt;Thread 3&lt;/LI&gt;
&lt;LI&gt;Thread 2&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;But &lt;STRONG&gt;only&lt;/STRONG&gt; thread 2 readied thread 4. Tricky right?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;&lt;STRONG&gt;&lt;FONT size="5"&gt;But so what?&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/H2&gt;
&lt;P&gt;We have been able to identify that the waits we are seeing in our application are primarily from many short waits causing the cumulative waiting time for a thread to be large.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What can we do about this? &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The good news is when dealing with lock contention we get to be creative with our solution and have lots of flexibility to alleviate the issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To be clear,&lt;STRONG&gt; the wrong solution is to throw more threads at the issue.&lt;/STRONG&gt; Each thread that we add that contends for a lock under contention, the waits get exponentially worse.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below is a breakdown of time spent waiting for a critical section, as the number of threads waiting for the critical section increases, the longest individual wait increases.&lt;/P&gt;
&lt;TABLE&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;Threads&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;Longest individual wait (ms)&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;2&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;18&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;4&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;86&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;16&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;152&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;P&gt;256&lt;/P&gt;
&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;1658&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Clear as day we can see that the more threads we throw at a lock under contention, the longer each individual wait will get.&lt;/P&gt;
&lt;P&gt;Now let’s jump into what we can do.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;&lt;FONT size="5"&gt;Considering lock usage&lt;/FONT&gt;&lt;/H3&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;&lt;EM&gt;How am I using this lock?&lt;/EM&gt;&lt;/H3&gt;
&lt;P&gt;When considering lock usage, it is typically to protect a specific resource and perform some work on the protected resource.&lt;/P&gt;
&lt;P&gt;But the longer a resource is protected, the higher the likelihood that other threads will wait for the release of that resource.&lt;/P&gt;
&lt;P&gt;Let’s use the following scenarios as an example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;We lock the entire function that modifies the resource&amp;nbsp;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P class="lia-indent-padding-left-60px"&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL start="2"&gt;
&lt;LI&gt;We lock the operations that modify the resource&lt;/LI&gt;
&lt;/OL&gt;
&lt;P class="lia-indent-padding-left-60px"&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;These may look very similar but in scenario 2, the developer is leveraging a tight scope on when the critical section is locked. This prevents any delays from WriteEventLog from preventing other threads from reading or writing to pData.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The shorter the amount of time a lock is held, the less likely other threads are going to wait for that lock.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;&lt;EM&gt;&lt;FONT size="4"&gt;Does this lock meet program needs?&lt;/FONT&gt;&lt;/EM&gt;&lt;/H3&gt;
&lt;P&gt;In all discussions so far, we have been talking about locking resources using critical sections.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Typically, the usage of a lock is to allow inter-thread synchronization to protect a specific resource to ensure that only one thread is operating on that resource at a time. But the question becomes, does this specific interaction &lt;STRONG&gt;need&lt;/STRONG&gt; to be mutually exclusive?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let’s say I have 100 threads. 99 threads read the value of a variable and print it to the console and 1 thread changes that variable’s value.&lt;/P&gt;
&lt;P&gt;Is there any harm in having the 99 reader threads access the variable at the same time and only have the resource locked when the writer thread is operating on it?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If not, then maybe a &lt;A href="https://docs.microsoft.com/en-us/windows/win32/sync/slim-reader-writer--srw--locks" target="_blank" rel="noopener"&gt;Slim Reader/Writer (SRW) Locks&lt;/A&gt; is the correct lock for your program.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A resource that is locked with a reader lock will &lt;STRONG&gt;not&lt;/STRONG&gt; contend with any other reader threads.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A resource that is under a writer lock will contend with &lt;STRONG&gt;both&lt;/STRONG&gt; reader and writer threads.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From the SRW documentation:&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Reader threads read data from a shared resource whereas writer threads write data to a shared resource. When multiple threads are reading and writing using a shared resource, &lt;STRONG&gt;exclusive locks such as a critical section or mutex can become a bottleneck if the reader threads run continuously but write operations are rare.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's easy when thinking about thread synchronization as a case where everything looks like a nail and a critical section is the hammer. But it is important to look at all the tools you have in your toolbelt before you start swinging.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;&lt;EM&gt;Can I distribute this work?&lt;/EM&gt;&lt;/H3&gt;
&lt;P&gt;It can be convenient when scaling an app to scale vertically and create one very big strong machine. But there are still limitations to what one single machine can do.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the bottleneck isn’t the available resources (CPU utilization, available memory, etc.) but waiting for a single resource, then how big your machine is less relevant.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can often find better performance not by throwing all the work at a single machine but allowing multiple machines to perform the work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example, what if an application heavily relies on one domain controller (DC)? After initial DC discovery, the result will be stored in the DCLocator cache, and all subsequent work will be sent to that DC. If that DC is experiencing bottlenecks due to lock contention, then why not send the work to another DC? Or even better, don’t wait for that DC to encounter issues before distributing the work. If the information is available from any DC, why not send the work to any DC?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;&lt;EM&gt;Do I need to be doing this much work in the first place?&lt;/EM&gt;&lt;/H3&gt;
&lt;P&gt;This can be a tough pill to swallow but it is important to keep it in mind.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The correct scaling solution isn’t to throw work at a machine until it falls over, but rather to find an appropriate performance balance between necessary system functionalities and application workloads.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When work is bottlenecking an app, it may be worth considering if that work is necessary.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This often comes in the form of:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Frequency (Do I need to query this information X times per Y?)&lt;/LI&gt;
&lt;LI&gt;Size (Do I need to query all items in database Y?)&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;The idea of pulling back is usually the quickest way to alleviate the symptoms. This can take the form of:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Reduces the number of threads contending for a lock&lt;/LI&gt;
&lt;LI&gt;Reduces time spent while holding a lock&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Pulling back is particularly relevant when the lock contention is occurring outside of the application. There are necessary locks within the operating system that multiple applications will leverage. If your application throws unnecessary amounts of work at this lock, everyone else who relies on this lock will suffer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;Wrapping up&lt;/H2&gt;
&lt;P&gt;At the end of the day, lock contention is an issue that arises frequently, and its solution is often a part of a larger conversation.&lt;/P&gt;
&lt;P&gt;I understand that the suggestions above are not easy, but they are important. Not only within your application but within a healthy operating system. Applications have internal locks, but they run on the operating system which has its own locks which the application will leverage directly or indirectly. Applications running on an operating &lt;STRONG&gt;system &lt;/STRONG&gt;need to behave like good roommates.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Clean up after yourself&lt;/LI&gt;
&lt;LI&gt;Don’t hog the TV&lt;/LI&gt;
&lt;LI&gt;Don’t use all the hot water&lt;/LI&gt;
&lt;LI&gt;Etc…&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Otherwise, everyone is going to suffer as a result of one bad roommate.&lt;/P&gt;
&lt;P&gt;If you enjoyed this post and would like to know more, feel free to check out my posts on the Microsoft CISTech community at &lt;A href="https://aka.ms/WillAftring" target="_blank" rel="noopener"&gt;https://aka.ms/WillAftring&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2024 04:53:22 GMT</pubDate>
      <guid>https://techcommunity.microsoft.com/t5/ask-the-performance-team/understanding-lock-contention-in-windows-performance-analyzer/ba-p/3507387</guid>
      <dc:creator>Becky</dc:creator>
      <dc:date>2024-01-17T04:53:22Z</dc:date>
    </item>
    <item>
      <title>Automating Data Collection for Memory, CPU, and Disk issues using CLUE</title>
      <link>https://techcommunity.microsoft.com/t5/ask-the-performance-team/automating-data-collection-for-memory-cpu-and-disk-issues-using/ba-p/2843412</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Automating Data Collection for Memory, CPU, &lt;/STRONG&gt;&lt;STRONG&gt;and &lt;/STRONG&gt;&lt;STRONG&gt;Disk issues&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;My name is Susan Buchanan, and I am a Support Escalation Engineer with the Windows Performance Team at Microsoft. Does Performance Data Collection got you singing the Blues? This blog addresses how to troubleshoot High CPU and unaccounted memory usage or memory leak to include identifying and data collection using the CLUE tool written by Clint Huffman. A special thank you to Ron Stock for writing me a bad driver to use in demonstration.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to discuss how to perform data collection when an issue may be intermittent, troublesome to catch, ongoing, or even reproducible at will. For many years, data collection was manual, time consuming, and often labor some.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Can’t seem to capture the right data at the right time?&lt;/LI&gt;
&lt;LI&gt;Intermittent issues? Reproducible issues?&lt;/LI&gt;
&lt;LI&gt;Do customers leave data captures on too long, and the log sizes are not useful, or too large?&lt;/LI&gt;
&lt;LI&gt;Need a foolproof way for end users to capture data that isn’t too complicated?&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;It's frustrating when you obtain a set of data only to realize you needed an additional dataset and must perform the data capture again. You might start with a RAMMAP and a performance monitor on the first data collection, move to a pool monitor or WPR/Xperf on another collection, and then might realize you also needed a tasklist or to find which drivers were associated with which pool tags you need another set of data collected.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Performance is Complicated! It really is.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Well, those days are gone! Thanks to CLUE which runs an ETW trace in the background until a threshold found in the config.xml is hit and then automagically collects data via Tasks in Task Scheduler! This gives you a more robust view of what has occurred since the data capture shows prior to the event, and then the event in the ETW trace without manual intervention.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;CLUE was written by a Microsoft employee who has made this code open source and extensible. You can modify the config.xml to create your own scenarios, increase the data captures, and much more.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;CLUE Scenarios/Thresholds&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Automatically collects a counter log and ETW trace whenever the following conditions occur:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Single CPU over 90% for more than 3 seconds.&lt;/LI&gt;
&lt;LI&gt;Free System PTEs of less than 50000 (kernel address space is low)&lt;/LI&gt;
&lt;LI&gt;System Committed memory greater than 90% (indicates one or more memory leaks that are consuming the system resources)&lt;/LI&gt;
&lt;LI&gt;Kernel Pool Paged virtual address space greater than 10% of system committed memory (indicates a driver leak in pool paged)&lt;/LI&gt;
&lt;LI&gt;Kernel Pool NonPaged virtual address space greater than 10% of physical memory (indicates a driver leak in pool nonpaged)&lt;/LI&gt;
&lt;LI&gt;Disk latency of greater than 25 ms for 3 or more seconds (includes high consuming processes, disk filter drivers, page file usage, and more)&lt;/LI&gt;
&lt;LI&gt;High CPU by WMI (includes WMI tracing to identify the query causing it)&lt;/LI&gt;
&lt;LI&gt;High thermal temperatures (traces CPU and power usage)&lt;/LI&gt;
&lt;LI&gt;High battery drains greater than 20% of battery capacity within one hour (traces CPU, GPU, and power usage)&lt;/LI&gt;
&lt;LI&gt;Has a User-initiated trace start optimized for application hangs. The user can initiate a wait analysis trace to determine why Windows, or an application is hanging.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;CLUE&amp;nbsp;Installation&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Requires administrator rights to install. After installation, non-admin users can use the device normally and data collection will still occur even for user-initiated data collections.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;For Windows 10, Windows Server 2016 and 2019&lt;/STRONG&gt;&lt;BR /&gt;1. Download and setup scheduled Tasks via Microsoft Clue tool 1.1.6:&amp;nbsp;&lt;A href="https://github.com/clinthuffman/Clue/blob/master/Clue_1.1.6.zip" target="_blank" rel="noopener"&gt;Clue/Clue_1.1.6.zip at master · Clint Huffman/Clue · GitHub&lt;/A&gt;&lt;BR /&gt;2. Confirm you have 2-4 GB free on your c: drive&lt;BR /&gt;3. To install CLUE run&amp;nbsp;&lt;STRONG&gt;setup.bat&lt;/STRONG&gt;&amp;nbsp;as administrator&lt;BR /&gt;4. Accept the defaults&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Data location stored (default)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;C:\ClueOutput&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Extensibility&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;CLUE is also extensible allowing for more performance rules by modifying the config.xml without changing the binaries.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;GIT: &lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Faka.ms%2Fcluetool&amp;amp;data=02%7C01%7Csusanbu%40microsoft.com%7Ce3be58c7b62f4d4c1ac608d8546525d3%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637352147861737515&amp;amp;sdata=evrb%2Fqs8FEKf92%2FZB2zv7k3FddG45g1C2xbL0c5MswA%3D&amp;amp;reserved=0" target="_blank" rel="noopener"&gt;https://aka.ms/cluetool&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;Following are 2 scenarios describing how CLUE can be useful in troubleshooting High CPU and High Memory.&lt;/H3&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;H4&gt;&lt;STRONG&gt;What is causing high CPU on my server?&lt;/STRONG&gt;&lt;/H4&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Scenario&lt;/U&gt;&lt;/STRONG&gt;&lt;STRONG&gt;&lt;U&gt; #1&lt;/U&gt;&lt;/STRONG&gt;&lt;STRONG&gt;: &lt;/STRONG&gt;Issue of intermittent high CPU on a Windows Server 2016 where it would jump to &amp;gt; 90%.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In task manager we can easily see that it is the &lt;STRONG&gt;CPU Stress&lt;/STRONG&gt; application; but what if it wasn’t so obvious? What if we needed to drill further down by CPU, or by stack?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Of course, the first line of defense if the issue is occurring in real time is to pop open Task Manager to see what it shows. This is not always possible which is another reason why CLUE comes in handy.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We see from a quick look in Task Manager the CPU is over 90%&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Task Manager shows both kernel and user mode in the graph. Kernel mode is in (darker blue/grey area)&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But what if the issue wasn’t in state? Or, what if Task Manager wasn’t so helpful?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Luckily, CLUE was running, and we know from the ETW trace what CPU usage looked like prior to and during the occurrence.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From the C:\ClueOutput folder we see the following data captured due to the ProcessorTime &amp;gt; 90% and DiskLatency &amp;gt; 25ms hit.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When we expand the zipped file for Processor Time &amp;gt; 90%, we see the following data captured:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;When we are looking for high CPU, we typically want to look at the following counters:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE width="624"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="86"&gt;
&lt;P&gt;&lt;STRONG&gt;Component&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="190"&gt;
&lt;P&gt;&lt;STRONG&gt;Performance Aspect being Monitored&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="348"&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;Counters to Monitor &lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="86"&gt;
&lt;P&gt;Processor&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="190"&gt;
&lt;P&gt;Usage&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="348"&gt;
&lt;P&gt;Processor\ % Processor Time (all instances)&lt;/P&gt;
&lt;P&gt;Processor\% DPC Time&lt;/P&gt;
&lt;P&gt;Processor\% Interrupt Time&lt;/P&gt;
&lt;P&gt;Processor\% Privileged Time&lt;/P&gt;
&lt;P&gt;Processor\% User Time&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="86"&gt;
&lt;P&gt;Processor&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="190"&gt;
&lt;P&gt;Bottlenecks&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="348"&gt;
&lt;P&gt;Processor\% Processor Time (all instances)&lt;/P&gt;
&lt;P&gt;Processor\% DPC Time&lt;/P&gt;
&lt;P&gt;Processor\% Interrupt Time&lt;/P&gt;
&lt;P&gt;Processor\% Privileged Time&lt;/P&gt;
&lt;P&gt;Processor\% User Time&lt;/P&gt;
&lt;P&gt;Processor\Interrupts/sec&lt;/P&gt;
&lt;P&gt;Processor\DPC’s Queued /sec&lt;/P&gt;
&lt;P&gt;System\Context switches /sec&lt;/P&gt;
&lt;P&gt;System\System Calls/sec&lt;/P&gt;
&lt;P&gt;System\Processor Queue Length (all instances)&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Processor&lt;/STRONG&gt;&lt;/P&gt;
&lt;TABLE&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="160"&gt;
&lt;P&gt;&lt;STRONG&gt;Counter Name&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="732"&gt;
&lt;P&gt;&lt;STRONG&gt;Metric&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="162"&gt;
&lt;P&gt;Processor Queue Length (PQL)&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="730"&gt;
&lt;P&gt;Divide the PQL into the number of processors&lt;/P&gt;
&lt;P&gt;~2+ sustained per processor and high CPU present: Check processes for high CPU consumption, also check Context Switching, % DPC Time, and % Interrupt Time&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="160"&gt;
&lt;P&gt;% Processor Time&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="732"&gt;
&lt;P&gt;0-50% healthy&lt;/P&gt;
&lt;P&gt;50-80% monitor / warning Monitor&lt;/P&gt;
&lt;P&gt;80-100% critical. System may appear sluggish.&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="160"&gt;
&lt;P&gt;% DPC Time&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="732"&gt;
&lt;P&gt;~% Processor Time &amp;gt; 85% and % DPC Time &amp;gt; ~15%: investigate if they are constantly above these levels, short spikes are ok.&lt;/P&gt;
&lt;P&gt;If only on 1 processor ~100% Processor Time and ~50%+ DPC Time:&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="160"&gt;
&lt;P&gt;% Interrupt Time&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="732"&gt;
&lt;P&gt;High CPU Interrupt Time – more than ~30% interrupt time (A high amount of % Interrupt Time in the processor could indicate a hardware or driver problem).&lt;/P&gt;
&lt;P&gt;Very high CPU Interrupt Time – more than ~50% interrupt time (A very high amount of % Interrupt Time in the processor could indicate a hardware or driver problem)&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Wow – our processor time is significantly high for much of our 6-minute performance monitor.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Check out the Processor Queue Length which is &amp;gt; 10 on average. That’s not looking good here. So, let’s drill down into who is using the %Processor Time.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Processor&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Minimum&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Maximum&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Average&lt;/P&gt;
&lt;P&gt;=========================================================================&lt;/P&gt;
&lt;P&gt;% Processor Time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4.688% |&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 100% |&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 81.605%&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When we add counters for Processor/%ProcessorTime and look at the instances we quickly see CPUStres64.exe is the highest consumer. There are even gaps where the %ProcessorTime exceeded 100 percent and went to around 180% in the data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;% Processor Time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Minimum&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Maximum&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Average&lt;/P&gt;
&lt;P&gt;=========================================================================&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&amp;nbsp; CPUSTRES64&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0% |&amp;nbsp;&amp;nbsp;&amp;nbsp; 180.309% |&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 19.787%&amp;nbsp;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From the CLUE ETL (Windows Performance Recorder trace), we see the highest CPU is 0. Ok, in my example I only have 1 CPU – but it’s good to check if the CPUs are being consumed equally.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In another example, where I have multiple processors and CPUStres64.exe is the culprit we see where each processor is hit fairly, equally by the process.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H4&gt;&lt;STRONG&gt;Where did all my Memory Go? And why did my Server become unresponsive&lt;/STRONG&gt;&lt;STRONG&gt;?&lt;/STRONG&gt;&lt;/H4&gt;
&lt;H3&gt;&lt;STRONG&gt;&lt;U&gt;Scenario&lt;/U&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;U&gt;#2&lt;/U&gt;&lt;/STRONG&gt;&lt;STRONG&gt;:&lt;/STRONG&gt; Windows server 2019 that inevitably runs us of memory due to a resource depletion, but we cannot figure out why?&lt;/H3&gt;
&lt;P&gt;Looking at task manager is leaving you without a "clue" as the top consumer is just 75 MB.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If we were to manually gather the data, it would look like this:&lt;/P&gt;
&lt;P&gt;Obtain a perfmon to determine there is a memory issue. Oh, there is, but now I need more data.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;I might look at the following counters.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;TABLE width="676"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="85"&gt;
&lt;P&gt;Memory&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="94"&gt;
&lt;P&gt;Usage&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="489"&gt;
&lt;P&gt;Memory\ Available Bytes &lt;BR /&gt;Memory\ Cache Bytes&lt;BR /&gt;Memory\%Committed Bytes&lt;BR /&gt;Memory\Pages Input or Reads/s&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="85"&gt;
&lt;P&gt;Memory&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="94"&gt;
&lt;P&gt;Bottlenecks or leaks&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="489"&gt;
&lt;P&gt;Memory\ Pages/sec &lt;BR /&gt;Memory\ Page Inputs or Reads/sec&lt;/P&gt;
&lt;P&gt;Memory\ Page Output or Write/sec&lt;BR /&gt;Memory\ Transition Faults/sec &lt;BR /&gt;Memory\ Pool Paged Bytes&lt;/P&gt;
&lt;P&gt;Memory\ Pool Paged Resident Bytes&lt;BR /&gt;Memory\ Pool NonPaged Bytes &lt;BR /&gt;&lt;BR /&gt;Although not specifically Memory object counters, the following are also useful for memory analysis: &lt;BR /&gt;Paging File\ % Usage object (all instances) &lt;BR /&gt;Cache\ Data Map Hits %&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Memory - some metrics to keep in mind when you look at the data.&lt;/STRONG&gt;&lt;/P&gt;
&lt;TABLE&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="132"&gt;
&lt;P&gt;&lt;STRONG&gt;Counter Name&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="760"&gt;
&lt;P&gt;&lt;STRONG&gt;Metric&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="132"&gt;
&lt;P&gt;Available Bytes&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="760"&gt;
&lt;P&gt;Minimum value:&lt;/P&gt;
&lt;P&gt;~700mb – monitor&lt;/P&gt;
&lt;P&gt;~500 mb or less - critical&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="132"&gt;
&lt;P&gt;Pool Paged Bytes (PP)&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="760"&gt;
&lt;P&gt;Exhausted: Event 2020 logged in system log.&lt;/P&gt;
&lt;P&gt;Both 2019 and 2020 event log errors with a source of SRV are relatively common and indicate a depletion of non-paged or paged pool memory respectively.&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="132"&gt;
&lt;P&gt;Pool Nonpaged Bytes (NPP)&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="760"&gt;
&lt;P&gt;Exhausted: Event 2019 and 2004 logged in system log.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;NPP can exhaust and it causes more of a problem if high or pool tag is leaking resulting in low memory condition on the system. Check usage if available memory is low on the OS&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="132"&gt;
&lt;P&gt;Free System PTEs&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="760"&gt;
&lt;P&gt;Rarely if at all will a 64-bit machine run out of PTEs as normally available is in the tens of millions.&lt;/P&gt;
&lt;P&gt;Available PTEs value is few hundred thousand: monitor&lt;/P&gt;
&lt;P&gt;Available PTEs value is 10,000 or less: critical&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="132"&gt;
&lt;P&gt;Handle Count&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="760"&gt;
&lt;P&gt;Exchange, SQL and LSASS can have 100k + and be normal.&lt;/P&gt;
&lt;P&gt;Other software or processes high are worth investigating. Rule of thumb is 1500 – 2000 is a good place to being looking at those applications consuming a lot more than this number.&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="132"&gt;
&lt;P&gt;Thread Count&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="760"&gt;
&lt;P&gt;~500+ possible unexpected behavior: monitor&lt;/P&gt;
&lt;P&gt;~2000+: warning&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="134"&gt;
&lt;P&gt;% Committed Bytes Used&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="758"&gt;
&lt;P&gt;~90% but may only be relative if low available memory present&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="132"&gt;
&lt;P&gt;Pages/sec&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="760"&gt;
&lt;P&gt;~1000+ could be start of running out of memory: monitor&lt;/P&gt;
&lt;P&gt;~2500+ could be experiencing system wide delays: Check available memory&lt;/P&gt;
&lt;P&gt;~5000+ most likely experiencing system wide delays: Check available memory and memory used by individual processes&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&lt;BR /&gt;The &lt;STRONG&gt;manual way&lt;/STRONG&gt; which would be lengthier and more time consuming would be to:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Obtain a poolmon to determine what tag might be leaking. Okay, there is a leak, but now I need more data.&lt;/LI&gt;
&lt;LI&gt;Use FindStr to try and identify what tags are being used by what files (unfortunately, we rebooted the box, and we had to start all over with the data captures).&lt;/LI&gt;
&lt;LI&gt;Obtain Tasklist to determine the services in use&lt;/LI&gt;
&lt;LI&gt;May need an ETL or even a dump after that.&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;STRONG&gt;Here’s CLUE to the rescue&lt;/STRONG&gt;&lt;STRONG&gt;. &lt;/STRONG&gt;CLUE was running a Perfmon trace and noticed that NonPaged Pool consumption was &amp;gt; 10% for the following tags:&amp;nbsp; LEAK and MxGN. It then automagically collects data needed to help you isolate this further (like Perfmon, Poolmon, and in some instances an ETL trace).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Looks like my good friend, Ron wrote me a bad driver that was allocating but not deallocating my memory using the LEAK Tag.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;*Normally I would show a larger time frame between poolmon data, but this is just for demo purposes. Clearly you see in a matter of minutes the number of Frees is 0 and the number of Bytes is growing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;LeakyFlt is bad news as it’s borrowing the OS’s memory and never freeing it. The OS expects for applications to borrow memory and resources, but they should deallocate/Free it as well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;2021.08.11-02:08:20 UTC (local time of the PC where this was collected)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Memory: 3669556K Avail: 1492408K&amp;nbsp; PageFlts:4060786&amp;nbsp;&amp;nbsp; InRam Krnl: 9468K P:77912K&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Commit:2783988K Limit:4586800K Peak:3077384K&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Pool &lt;STRONG&gt;N:536064&lt;/STRONG&gt;K P:84252K&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Tag&amp;nbsp; Type&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Allocs&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Frees&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Diff&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Bytes&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Per Alloc&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;STRONG&gt;LEAK Nonp&amp;nbsp; &amp;nbsp; &amp;nbsp; 340&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;340&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 356515840&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/STRONG&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;&lt;STRONG&gt;1048576&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;MxGn Nonp&amp;nbsp;&amp;nbsp;&amp;nbsp; 7985&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6436&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1549&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;55044672&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;35535&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;2021.08.11-01:57:13 UTC (local time of the PC where this was collected)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Memory: 3669556K Avail: 1529880K&amp;nbsp; PageFlts:2763623&amp;nbsp;&amp;nbsp; InRam Krnl: 9480K P:67448K&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Commit:2544788K Limit:4586800K Peak:2546588K&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Pool &lt;STRONG&gt;N:372744K&lt;/STRONG&gt; P:74848K&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Tag&amp;nbsp; Type&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Allocs&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Frees&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Diff&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Bytes&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Per Alloc&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;STRONG&gt;LEAK Nonp&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 200&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;&lt;STRONG&gt;200&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 209715200&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/STRONG&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;&lt;STRONG&gt;1048576&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;MxGn Nonp&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4750&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3201&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1549&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 55044672&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;35535&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Clue stepped up and in the TagstoDrivers Folder even tried to help identify what files might be using the tags.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, I stopped the service that was using LeakyFlt.sys and BAM the problem is solved.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Would you like a way to automate your data captures? Would you like a way to gather data on intermittent issues? Ongoing Issues? Reproducible Issues? Tired of manually setting up tools for data capture? Or can’t seem to stop a trace in time? Then CLUE may just be the tool for you.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Oct 2021 20:02:25 GMT</pubDate>
      <guid>https://techcommunity.microsoft.com/t5/ask-the-performance-team/automating-data-collection-for-memory-cpu-and-disk-issues-using/ba-p/2843412</guid>
      <dc:creator>Becky</dc:creator>
      <dc:date>2021-10-13T20:02:25Z</dc:date>
    </item>
    <item>
      <title>Difficulty Generating a Memory Dump</title>
      <link>https://techcommunity.microsoft.com/t5/ask-the-performance-team/difficulty-generating-a-memory-dump/ba-p/2351370</link>
      <description>&lt;P&gt;Hi there!&lt;/P&gt;
&lt;P&gt;My name is Teeda, and I am a Support Escalation Engineer on the Windows Performance Team at Microsoft. This blog post provides several suggestions and workarounds when there is difficulty generating a memory dump for bugcheck issues (or even hang scenarios). Special thanks to my colleague, Alisse, for assembling this documentation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;Think about the goal…&lt;/H2&gt;
&lt;P&gt;Is a bugcheck occurring and you are trying to get a memory dump from that?&amp;nbsp;&amp;nbsp;If so, you can skip the parts about manually triggering a dump.&amp;nbsp;&amp;nbsp;However, you may want to use these settings to test out if you can get a memory dump.&amp;nbsp;&amp;nbsp;This will be faster than waiting for the next bugcheck.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you need to crash the machine manually?&amp;nbsp;&amp;nbsp;If so, pay attention to the type of machine (virtualized or physical) and the situation we are working with.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;Is this a virtual machine?&lt;/H2&gt;
&lt;H5&gt;&lt;STRONG&gt;VMware machines allow to create a snapshot which can then be converted to a memory dump.&amp;nbsp;&amp;nbsp;Often, this is easier than trying to generate the memory dump manually.&lt;/STRONG&gt;&lt;/H5&gt;
&lt;OL&gt;
&lt;LI&gt;Capture the snapshot in the VMWare console with “Take Snapshot” either at the bugcheck screen or if another issue, at the time of the issue.&lt;/LI&gt;
&lt;LI&gt;You will need to contact VmWare vendor to request copy of the &lt;STRONG&gt;vmss2core-sb-8456865 &lt;/STRONG&gt;snapshot to memory dump conversion tool as it is no longer publicly available.&lt;/LI&gt;
&lt;LI&gt;Once you have the file, save it on the C drive to a folder called c:\Snapshot&lt;/LI&gt;
&lt;LI&gt;Copy the vmss or vmsn/vmem file that you wish to convert to that folder.&lt;/LI&gt;
&lt;LI&gt;Open an elevated command prompt and run the following command:
&lt;OL&gt;
&lt;LI&gt;cd&amp;nbsp;&lt;STRONG&gt;c:\Snapshot&lt;/STRONG&gt;
&lt;UL&gt;
&lt;LI&gt;For VMs OS until Windows 7/2008R2 use:&amp;nbsp;&lt;STRONG&gt;vmss2core-sb-8456865 –W &amp;lt;snapshot.vmsn/Suspend.vmss&amp;gt; &amp;lt;snapshot.vmem&amp;gt;&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;For VMs OS Windows 8.1/2012 and above use:&amp;nbsp;&lt;STRONG&gt;vmss2core-sb-8456865 –W8 &amp;lt;snapshot.vmsn/Suspend.vmss&amp;gt; &amp;lt;snapshot.vmem&amp;gt;&lt;/STRONG&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;Replace the '&lt;STRONG&gt;&amp;lt;snapshot.vmsn/Suspend.vmss&amp;gt; &amp;lt;snapshot.vmem&amp;gt;’&lt;/STRONG&gt;&amp;nbsp;with the name of the snapshot.&lt;/LI&gt;
&lt;LI&gt;This process may take a few minutes depending on the size of the snapshot, but it will create a memory.dmp file in the&amp;nbsp;&lt;STRONG&gt;c:\snapshots&lt;/STRONG&gt; folder.&lt;/LI&gt;
&lt;/OL&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;STRONG style="color: rgb(30, 30, 30); font-size: 20px;"&gt;There is also the option to use the NMI switch in VMWare as an alternative if taking a snapshot is not an option.&amp;nbsp; Please note you will still need to configure for a memory dump whether it be kernel or complete: &lt;/STRONG&gt;&lt;A style="font-size: 20px; font-style: normal; font-weight: 400; background-color: rgb(255, 255, 255);" href="https://kb.vmware.com/s/article/2149185" target="_blank" rel="noopener"&gt;https://kb.vmware.com/s/article/2149185&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H5&gt;&lt;STRONG&gt;Hyper-V Machines allows injection of NMI to bugcheck the VM, or you can take a checkpoint of the machine which can then be opened up in a debugger.&lt;/STRONG&gt;&lt;/H5&gt;
&lt;UL&gt;
&lt;LI&gt;To do this for &lt;STRONG&gt;injecting NMI&lt;/STRONG&gt;, first ensure the system is configured for the type of dump you need, pagefile is large enough to accommodate the dump size, and enough free space on the drive for where the memory.dmp file will be written.&lt;/LI&gt;
&lt;LI&gt;Next open PowerShell and execute the following command: &lt;STRONG&gt;debug-vm "VM to Debug" -InjectNonMaskableInterrupt -Force&lt;BR /&gt;&lt;STRONG style="color: rgb(30, 30, 30);"&gt;Note: &lt;/STRONG&gt;&lt;SPAN style="color: rgb(30, 30, 30);"&gt;Replace&lt;/SPAN&gt;&lt;STRONG style="color: rgb(30, 30, 30);"&gt; “VM to Debug” &lt;/STRONG&gt;&lt;SPAN style="color: rgb(30, 30, 30);"&gt;with actual guest VM name without the quotes&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;UL&gt;
&lt;LI&gt;To do this for &lt;STRONG&gt;VM Checkpoint&lt;/STRONG&gt;, in Hyper-V manager select the host machine left pane, right-pane right click the VM you want to create a checkpoint for.&amp;nbsp; Choose &lt;STRONG&gt;"Checkpoint"&lt;/STRONG&gt;&amp;nbsp;(or&amp;nbsp;&lt;STRONG&gt;"Snapshot"&lt;/STRONG&gt;&amp;nbsp;in older versions). Alternatively, you can click "&lt;STRONG&gt;Action&lt;/STRONG&gt;" in the menu bar, then "&lt;STRONG&gt;Checkpoint&lt;/STRONG&gt;".&lt;/LI&gt;
&lt;/UL&gt;
&lt;P class="lia-indent-padding-left-60px"&gt;The config and .vmrs files are not stored in the same folder with the virtual disks and differencing disks&lt;/P&gt;
&lt;P class="lia-indent-padding-left-60px"&gt;The virtual machine folder should contain &lt;STRONG&gt;Snapshots &lt;/STRONG&gt;folder and is where the checkpoint (formerly known in Hyper-V Manager as a snapshot) is kept. Collect the .vmrs file&lt;/P&gt;
&lt;P class="lia-indent-padding-left-60px"&gt;If you cannot locate the .vmrs file, from PowerShell you could run couple of commands to locate.&lt;/P&gt;
&lt;P class="lia-indent-padding-left-60px"&gt;&lt;STRONG&gt;Get-vmhost&lt;/STRONG&gt; should show paths or &lt;STRONG&gt;Get-VM &amp;lt;vmname&amp;gt; | fl VMName,ConfigurationLocation&lt;/STRONG&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-60px"&gt;The VMRS files are stored in the ConfigurationLocation&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;You will need to engage Microsoft to open .vmrs in debugger for analysis&lt;/LI&gt;
&lt;/UL&gt;
&lt;P class=""&gt;&lt;STRONG&gt;Alternatively, you can also configure for a manual Hyper-V bugcheck by using:&lt;/STRONG&gt;&amp;nbsp;&lt;BR /&gt;HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\hyperkbd\crashdump&lt;BR /&gt;HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\hyperkbd\Parameters&lt;/P&gt;
&lt;P class=""&gt;Configuration information found here: &lt;A href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows-hardware%2Fdrivers%2Fdebugger%2Fforcing-a-system-crash-from-the-keyboard%23defining-alternate-keyboard-shortcuts-to-force-a-system-crash-from-the-keyboard&amp;amp;data=05%7C02%7CRebecca.Burns%40microsoft.com%7Cdf258d29f39a46e8f20208dde0fe701f%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638914105612997528%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&amp;amp;sdata=f6h1cCaD2aFAKptljIH2M%2FRz3vZCRpbLBsJdH2HFZKQ%3D&amp;amp;reserved=0" target="_blank" rel="noopener"&gt;Forcing a System Crash from the Keyboard - Windows drivers | Microsoft Docs&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;&lt;STRONG&gt;For Azure machines, Azure engineers can grab a memory dump or use NMI:&lt;/STRONG&gt;&lt;/H3&gt;
&lt;P&gt;Configure for complete memory dump:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Step 1: Change page file size&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Verify the machine has enough free space for 2x the RAM before continuing.&lt;/LI&gt;
&lt;LI&gt;Launch&amp;nbsp;&lt;STRONG&gt;File Explorer&lt;/STRONG&gt;, then right-click&amp;nbsp;&lt;STRONG&gt;This PC&lt;/STRONG&gt;. Select&lt;STRONG&gt;&amp;nbsp;Properties&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;Click&amp;nbsp;&lt;STRONG&gt;Advanced system settings&lt;/STRONG&gt;&amp;nbsp;on the System page. Make sure you are on the&amp;nbsp;&lt;STRONG&gt;Advanced&lt;/STRONG&gt;&amp;nbsp;tab.&lt;/LI&gt;
&lt;LI&gt;Click&amp;nbsp;&lt;STRONG&gt;Settings&lt;/STRONG&gt;&amp;nbsp;under the&amp;nbsp;&lt;STRONG&gt;Performance&lt;/STRONG&gt;&amp;nbsp;area.&lt;/LI&gt;
&lt;LI&gt;Click the&amp;nbsp;&lt;STRONG&gt;Advanced&lt;/STRONG&gt;&amp;nbsp;tab, and then click&amp;nbsp;&lt;STRONG&gt;Change&lt;/STRONG&gt;&amp;nbsp;under the&amp;nbsp;&lt;STRONG&gt;Virtual memory area&lt;/STRONG&gt;.
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;Note:&lt;/STRONG&gt;&amp;nbsp;To enable the system partition, you must uncheck “&lt;STRONG&gt;Automatically manage paging file size for all drives check box&lt;/STRONG&gt;.”&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;img /&gt;
&lt;UL&gt;
&lt;LI&gt;Select the C:\ drive for page file location.&lt;/LI&gt;
&lt;LI&gt;Click&amp;nbsp;&lt;STRONG&gt;Custom Size&lt;/STRONG&gt;. Set the value of Initial size and Maximum size to the amount of physical RAM that is installed plus 256 megabyte (MB) under the Custom Size button. (RAM*1024 + 256MB = Size in MB)&lt;/LI&gt;
&lt;LI&gt;Click&amp;nbsp;&lt;STRONG&gt;Set&lt;/STRONG&gt;, and then click&amp;nbsp;&lt;STRONG&gt;OK&lt;/STRONG&gt;.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;STRONG&gt;Step 2: Configure for a complete memory dump file&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Go back to&amp;nbsp;&lt;STRONG&gt;Advanced system settings&amp;nbsp;&lt;/STRONG&gt;page&lt;/LI&gt;
&lt;LI&gt;Click&amp;nbsp;&lt;STRONG&gt;Settings&lt;/STRONG&gt;&amp;nbsp;under the&amp;nbsp;&lt;STRONG&gt;Startup and Recovery,&lt;/STRONG&gt;&amp;nbsp;and then make sure&amp;nbsp;complete memory dump&amp;nbsp;is selected.
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;Note&lt;/STRONG&gt;: If you want to enable the complete memory dump option, manually set the CrashDumpEnabled registry entry to 0x1 under the following registry subkey and restart Windows: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CrashControl\&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;Ensure the path is&amp;nbsp;&lt;STRONG&gt;C:\Windows\MEMORY.DMP (%SystemRoot%\MEMORY.DMP)&lt;/STRONG&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;img /&gt;
&lt;UL&gt;
&lt;LI&gt;Click&amp;nbsp;&lt;STRONG&gt;OK&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Reboot VM&lt;/STRONG&gt;&amp;nbsp;for settings to take effect&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;STRONG&gt;Step 3: Enable Boot Diagnostics for NMI Crash&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Login to Azure portal &amp;gt; select VM &amp;gt; Serial Console&lt;/LI&gt;
&lt;/UL&gt;
&lt;img /&gt;
&lt;UL&gt;
&lt;LI&gt;Note: Serial Console requires boot diagnostics enabled&lt;/LI&gt;
&lt;/UL&gt;
&lt;img /&gt;
&lt;UL&gt;
&lt;LI&gt;So, if not enabled, go to Boot Diagnostics &amp;gt; click Settings &amp;gt; Turn On &amp;gt; Save&lt;/LI&gt;
&lt;/UL&gt;
&lt;img /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Step 4: Send NMI during issue&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;When computer is in problem state &amp;gt; Serial Console &amp;gt; click Send Command [1] &amp;gt; click Send Non-Maskable Interrupt (NMI) [2]&lt;/LI&gt;
&lt;/UL&gt;
&lt;img /&gt;
&lt;UL&gt;
&lt;LI&gt;Click Send NMI&lt;/LI&gt;
&lt;/UL&gt;
&lt;img /&gt;
&lt;UL&gt;
&lt;LI&gt;Dump will be generated.&lt;/LI&gt;
&lt;/UL&gt;
&lt;img /&gt;
&lt;UL&gt;
&lt;LI&gt;After completes login to VM and dump will be in C:\Windows\MEMORY.DMP&lt;/LI&gt;
&lt;/UL&gt;
&lt;img /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H4&gt;For AWS machines, try using these steps:&amp;nbsp;&lt;A href="https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/diagnostic-interrupt.html" target="_blank" rel="noopener"&gt;https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/diagnostic-interrupt.html&lt;/A&gt;&lt;/H4&gt;
&lt;H4&gt;For Nutanix machines, please engage the vendor to capture the memory dump.&lt;/H4&gt;
&lt;H2&gt;&lt;BR /&gt;Do you have the correct configuration?&lt;/H2&gt;
&lt;P&gt;&lt;STRONG&gt;Step 1: Change your page file size&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Verify the machine has enough free space for 2x the RAM before continuing.&lt;/LI&gt;
&lt;LI&gt;Go to&amp;nbsp;&lt;STRONG&gt;Advanced system settings&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;On the&amp;nbsp;&lt;STRONG&gt;System&lt;/STRONG&gt;&amp;nbsp;page, click the&amp;nbsp;&lt;STRONG&gt;Advanced&lt;/STRONG&gt;&amp;nbsp;tab.&lt;/LI&gt;
&lt;LI&gt;Click&amp;nbsp;&lt;STRONG&gt;Settings&lt;/STRONG&gt;&amp;nbsp;under the&amp;nbsp;&lt;STRONG&gt;Performance&lt;/STRONG&gt;&amp;nbsp;area.&lt;/LI&gt;
&lt;LI&gt;Click the&amp;nbsp;&lt;STRONG&gt;Advanced&lt;/STRONG&gt;&amp;nbsp;tab, and then click&amp;nbsp;&lt;STRONG&gt;Change&lt;/STRONG&gt;&amp;nbsp;under the&amp;nbsp;&lt;STRONG&gt;Virtual memory area&lt;/STRONG&gt;.
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;Note:&lt;/STRONG&gt;&amp;nbsp;To enable the system partition, you must click to&amp;nbsp;&lt;STRONG&gt;clear the Automatically manage paging file size for all drives check box&lt;/STRONG&gt;.&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;Select the C:\ drive for pagefile location.&lt;/LI&gt;
&lt;LI&gt;Click&amp;nbsp;&lt;STRONG&gt;Custom Size&lt;/STRONG&gt;. Set the value of Initial size and Maximum size to the amount of physical RAM that is installed plus 256 megabytes (MB) under the Custom Size button.&lt;/LI&gt;
&lt;LI&gt;Click&amp;nbsp;&lt;STRONG&gt;Set&lt;/STRONG&gt;, and then click&amp;nbsp;&lt;STRONG&gt;OK three times&lt;/STRONG&gt;.&amp;nbsp;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;STRONG&gt;Step 2: Configure for a complete memory dump file&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Go back to&amp;nbsp;&lt;STRONG&gt;Advanced system settings&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;On the&amp;nbsp;&lt;STRONG&gt;System&lt;/STRONG&gt;&amp;nbsp;page, click the&amp;nbsp;&lt;STRONG&gt;Advanced&lt;/STRONG&gt;&amp;nbsp;tab.&lt;/LI&gt;
&lt;LI&gt;Click&amp;nbsp;&lt;STRONG&gt;Settings&lt;/STRONG&gt;&amp;nbsp;under the&amp;nbsp;&lt;STRONG&gt;Writing debugging information area (Startup and Recovery),&lt;/STRONG&gt;&amp;nbsp;and then make sure&amp;nbsp;complete memory dump&amp;nbsp;is selected.
&lt;UL&gt;
&lt;LI&gt;If the complete memory dump is not an option here, to enable the complete memory dump option, manually set the CrashDumpEnabled registry entry to 0x1 under the following registry subkey: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CrashControl&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;STRONG&gt;Step 3: Apply the settings&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Ensure there is more space available on the C drive than there is RAM on the machine.&lt;/LI&gt;
&lt;LI&gt;Please restart the machine for the settings to take effect&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;More Options&lt;/H2&gt;
&lt;H5&gt;Try to use DedicatedDumpFile.sys - &lt;A href="https://docs.microsoft.com/en-us/archive/blogs/ntdebugging/how-to-use-the-dedicateddumpfile-registry-value-to-overcome-space-limitations-on-the-system-drive-when-capturing-a-system-memory-dump" target="_blank" rel="noopener"&gt;How to use the DedicatedDumpFile registry value to overcome space limitations on the system drive when capturing a system memory dump | Microsoft Docs&lt;/A&gt;&lt;/H5&gt;
&lt;H2&gt;Manual Dump Trigger Options&lt;/H2&gt;
&lt;H4&gt;&lt;STRONG&gt;NMI&lt;/STRONG&gt;&lt;/H4&gt;
&lt;P&gt;Does this machine have a NMI switch? This would be in the&amp;nbsp;Integrated Lights Out (iLO) Web interface.&amp;nbsp;Create a DWORD value called&amp;nbsp;NMICrashDump under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CrashControl and set it to a 1.&amp;nbsp; Then reboot the machine for the setting to take effect.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H4&gt;&lt;STRONG&gt;Keyboard initiated&lt;/STRONG&gt;&lt;/H4&gt;
&lt;P&gt;For a USB keyboard, create the following registry entry:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;In HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\kbdhid\Parameters, create a value named CrashOnCtrlScroll, and set it equal to a REG_DWORD value of 0x01.&amp;nbsp;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;For a PS/2 Keyboard, create the following registry entry:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;In HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\i8042prt\Parameters, create a value named CrashOnCtrlScroll, and set it equal to a REG_DWORD value of 0x01.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Then reboot the machine for the setting to take effect.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Note:&lt;/STRONG&gt;&amp;nbsp;you will need to use the Right Ctrl key + press the ScrLk key twice to trigger the dump with the above settings. If the machine does not have those available, there are other options.&amp;nbsp;&lt;A href="https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/forcing-a-system-crash-from-the-keyboard" target="_blank" rel="noopener"&gt;Forcing a System Crash from the Keyboard - Windows drivers | Microsoft Docs&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Ex: Left Ctrl + Space Bar:&lt;/P&gt;
&lt;P&gt;HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\kbhid\CrashDump&lt;/P&gt;
&lt;P&gt;Create DWORD value Dump1keys set to 20 (hex)&lt;/P&gt;
&lt;P&gt;Create DWORD value Dump2key (note no s here) set to 3d (hex)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H4&gt;&lt;STRONG&gt;NotMyFault&lt;/STRONG&gt;&lt;/H4&gt;
&lt;P&gt;Use NotMyFault to initiate a crash: &lt;A href="https://docs.microsoft.com/en-us/sysinternals/downloads/notmyfault" target="_blank" rel="noopener"&gt;NotMyFault - Windows Sysinternals | Microsoft Docs&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H4&gt;&lt;STRONG&gt;Change the Settings&lt;/STRONG&gt;&lt;/H4&gt;
&lt;UL&gt;
&lt;LI&gt;Ensure there is enough space to capture the memory dump.&amp;nbsp;&amp;nbsp;We need enough space for the page file, and for the memory dump itself which will be the size of the page file.&lt;/LI&gt;
&lt;LI&gt;Disable the Autoreboot:(HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CrashControl\AutoReboot)&lt;/LI&gt;
&lt;LI&gt;Change the memory dump location to another spot on a local drive&lt;/LI&gt;
&lt;LI&gt;Ensure the option "Overwrite Any Existing File" (found in Control Panel System) is selected. It is a good idea to leave this box checked and to move or copy the current Memory.dmp file.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H4&gt;&lt;STRONG&gt;There is dump logging&lt;/STRONG&gt;&lt;/H4&gt;
&lt;P&gt;You can create a DWORD registry key HKLM\SYSTEM\CurrentControlSet\Control\CrashControl\EnableLogFile set to 1.&amp;nbsp;&amp;nbsp;You will need to crash the machine twice, then you will see a dumpstack.log file on the root of the C drive which will keep track of what occurs during the action of writing to the page file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H4&gt;&lt;STRONG&gt;Is ASR enabled?&lt;/STRONG&gt;&lt;/H4&gt;
&lt;P&gt;Hardware vendors, such as HP, IBM, and Dell, may provide an Automatic System Recovery (ASR) feature. You should disable this feature during troubleshooting. For example, if HP and Compaq's ASR feature is enabled in the BIOS, disable this feature while you are troubleshooting to generate a complete memory.dmp file. For the exact steps, contact your hardware vendor.&lt;/P&gt;
&lt;H4&gt;&lt;BR /&gt;&lt;STRONG&gt;Antivirus and Encryption&lt;/STRONG&gt;&lt;/H4&gt;
&lt;UL&gt;
&lt;LI&gt;Check for any dump filter drivers.&lt;/LI&gt;
&lt;LI&gt;Remove the encryption to test.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H4&gt;&lt;STRONG&gt;What else?&lt;/STRONG&gt;&lt;/H4&gt;
&lt;UL&gt;
&lt;LI&gt;It is possible the paging file on the boot drive is not large enough. To use the "Write Debugging Information To" feature to obtain a complete memory dump file, the paging file on the boot drive must be at least as large as physical memory + 100 MB. When you create a kernel memory dump file, the file is usually around one-third the size of the physical memory on the system. Of course, this quantity will vary, depending on your circumstances.&lt;/LI&gt;
&lt;LI&gt;Also possible there is not room for the Memory.dmp file in the path specified for writing the memory dump.&lt;/LI&gt;
&lt;LI&gt;It is possible that the SCSI controller is bad, or the system crash is caused by a bad SCSI controller board.&lt;/LI&gt;
&lt;LI&gt;If you specify a non-existent path, a dump file will not be written. For example, if you specify the path as C:\Dumpfiles\Memory.dmp and no C:\Dumpfiles folder exists, a dump file will not be written.&lt;/LI&gt;
&lt;LI&gt;Is the Host Guardian Service enabled on either the host or the guest?&amp;nbsp;&amp;nbsp;There are several settings which may prevent dumps from writing.&amp;nbsp;&amp;nbsp;&lt;A href="https://docs.microsoft.com/en-us/windows-server/security/guarded-fabric-shielded-vm/guarded-fabric-manage-hgs" target="_blank" rel="noopener"&gt;Managing the Host Guardian Service | Microsoft Docs&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;H4&gt;&lt;STRONG&gt;Grab that Page file!&lt;/STRONG&gt;&lt;/H4&gt;
&lt;P&gt;Ensure the Autoreboot key is set to 0, and when the bugcheck occurs, boot into winre.&amp;nbsp;&amp;nbsp;Grab the pagefile.sys and rename to memory.dmp&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Aug 2025 01:04:42 GMT</pubDate>
      <guid>https://techcommunity.microsoft.com/t5/ask-the-performance-team/difficulty-generating-a-memory-dump/ba-p/2351370</guid>
      <dc:creator>TeedaN</dc:creator>
      <dc:date>2025-08-22T01:04:42Z</dc:date>
    </item>
    <item>
      <title>Change Altitude of Process Monitor (ProcMon)</title>
      <link>https://techcommunity.microsoft.com/t5/ask-the-performance-team/change-altitude-of-process-monitor-procmon/ba-p/2118159</link>
      <description>&lt;P&gt;My name is Susan and a small group of us have joined together to provide you documentation on how to view a kernel filter driver in procmon on the stack, that is normally obfuscated.&amp;nbsp; A special thanks to my colleague, Becky Burns for documentation collaboration; and a special shout out to Denis Pasos and Ron Stock for both creating a leaky kernel filter driver, and documentation collaboration.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;&lt;STRONG&gt;Symptoms or Error&lt;/STRONG&gt;&lt;/H2&gt;
&lt;P&gt;If you need to get Procmon's filter to run below us in the filter stack, it has a setting for that. Procmon is typically used to figure out what is happening on the machine, but you do not get to see the activity of things such as virus scanners because they happen at a lower level than the procmon filter. &amp;nbsp;In our case, we have a driver called Leakyflt.sys but in procmon it only shows as FLTMGR.sys but we want to know which driver it is without performing more tracing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From an administrative command prompt, we see the driver LeakyFlt at altitude 372000:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In this example below, you will see Procmon’s &lt;STRONG&gt;altitude&lt;/STRONG&gt; at &lt;STRONG&gt;385200&lt;/STRONG&gt; as well as Legacy Filter Drivers such as &lt;STRONG&gt;vdorctl&lt;/STRONG&gt;, and &lt;STRONG&gt;dgmaster:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From Procmon, in the stack it looks like&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;&lt;STRONG&gt;Solution&lt;/STRONG&gt;&lt;/H2&gt;
&lt;P&gt;Changing the "Altitude" that procmon will run, putting it lower in the filter stack. In doing so, you will be able to see all the activity that you want from most filter drivers. &lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;To change the altitude of procmon, you will want to perform the following steps:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Install Procmon (assuming you have not already installed it) &lt;A href="https://docs.microsoft.com/en-us/sysinternals/downloads/procmon" target="_blank" rel="noopener"&gt;https://docs.microsoft.com/en-us/sysinternals/downloads/procmon&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;From an Administrative Command prompt, run &lt;STRONG&gt;FLTMC &lt;/STRONG&gt;to see the Altitude of the filter drivers:&lt;img /&gt;
&lt;P&gt;In the screenshot, the lowest filter driver altitude is 37200&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;Open Registry Editor (RegEdit)&lt;/P&gt;
&lt;P&gt;Navigate to registry key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\PROCMONXX\&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;In Example:&lt;/STRONG&gt; PROCMON24 (name may have a different number on your machine)&lt;/P&gt;
&lt;img /&gt;&lt;STRONG style="font-family: inherit;"&gt;&lt;BR /&gt;Expand to &lt;/STRONG&gt;&lt;SPAN style="font-family: inherit;"&gt;HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\PROCMONXX\Instances\Process Monitor XX instance. (i.e., Process Monitor 24 Instance)&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN style="font-family: inherit;"&gt;Change the Altitude Regkey value to lower than your lowest filter driver.&lt;BR /&gt;&lt;/SPAN&gt;For this example: change the Altitude value to &lt;STRONG&gt;40000&lt;/STRONG&gt; (which will show you virtually everything that is happening on the machine).&amp;nbsp; Alternatively, you could set the altitude to 372000 if you suspected a specific driver.&amp;nbsp;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ex. Default altitude currently set to 385200&lt;/P&gt;
&lt;img /&gt;
&lt;P&gt;Right click on Altitude, change value to &lt;STRONG&gt;40000&lt;/STRONG&gt;, click OK&lt;/P&gt;
&lt;img /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;img /&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN style="font-family: inherit;"&gt;You must also set the security on the "&lt;/SPAN&gt;&lt;STRONG style="font-family: inherit;"&gt;Process Monitor XX Instance&lt;/STRONG&gt;&lt;SPAN style="font-family: inherit;"&gt;" key and &lt;/SPAN&gt;&lt;STRONG style="font-family: inherit;"&gt;&lt;U&gt;add&lt;/U&gt; deny rights for everyone&lt;/STRONG&gt;&lt;SPAN style="font-family: inherit;"&gt; for "&lt;/SPAN&gt;&lt;STRONG style="font-family: inherit;"&gt;delete&lt;/STRONG&gt;&lt;SPAN style="font-family: inherit;"&gt;" and "&lt;/SPAN&gt;&lt;STRONG style="font-family: inherit;"&gt;set value&lt;/STRONG&gt;&lt;SPAN style="font-family: inherit;"&gt;". &amp;nbsp;Reason being that procmon will try to change its value back right away. &amp;nbsp;You will have to select "&lt;/SPAN&gt;&lt;STRONG style="font-family: inherit;"&gt;Disable inheritance&lt;/STRONG&gt;&lt;SPAN style="font-family: inherit;"&gt;" to be able to set them at the &lt;/SPAN&gt;&lt;EM style="font-family: inherit;"&gt;Process Monitor XX Instance&lt;/EM&gt;&lt;SPAN style="font-family: inherit;"&gt; level.&lt;/SPAN&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Right click on &lt;STRONG&gt;Process Monitor 24 Instance&lt;/STRONG&gt;, select Permissions…&lt;/P&gt;
&lt;img /&gt;
&lt;P&gt;Click &lt;STRONG&gt;Add&lt;/STRONG&gt;&lt;/P&gt;
&lt;img /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;In “Enter the object names to select:” type &lt;STRONG&gt;Everyone&lt;/STRONG&gt;, click &lt;STRONG&gt;Check Names&lt;/STRONG&gt;, then click &lt;STRONG&gt;OK.&lt;/STRONG&gt;&lt;/P&gt;
&lt;img /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Select &lt;STRONG&gt;Everyone&lt;/STRONG&gt;, Click &lt;STRONG&gt;Advanced.&lt;/STRONG&gt;&lt;/P&gt;
&lt;img /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Select &lt;STRONG&gt;Everyone&lt;/STRONG&gt;, click &lt;STRONG&gt;Edit.&lt;/STRONG&gt;&lt;/P&gt;
&lt;img /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Click &lt;STRONG&gt;Show advanced permissions.&lt;/STRONG&gt;&lt;/P&gt;
&lt;img /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Change Type: to &lt;STRONG&gt;Deny&lt;/STRONG&gt;, check &lt;STRONG&gt;Set Value&lt;/STRONG&gt;, check &lt;STRONG&gt;Delete&lt;/STRONG&gt;, click &lt;STRONG&gt;OK.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;(if &lt;STRONG&gt;Read Control&lt;/STRONG&gt; is checked, &lt;STRONG&gt;&lt;U&gt;uncheck&lt;/U&gt;&lt;/STRONG&gt; it)&lt;/P&gt;
&lt;img /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With &lt;STRONG&gt;Everyone&lt;/STRONG&gt; highlighted, select &lt;STRONG&gt;Disable inheritance&lt;/STRONG&gt;, click &lt;STRONG&gt;OK&lt;/STRONG&gt;&lt;/P&gt;
&lt;img /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Choose &lt;STRONG&gt;Convert inherited permissions into explicit permissions on this object.&lt;/STRONG&gt;&lt;/P&gt;
&lt;img /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Click &lt;STRONG&gt;OK.&lt;/STRONG&gt;&lt;/P&gt;
&lt;img /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Click &lt;STRONG&gt;Yes&lt;/STRONG&gt;&lt;/P&gt;
&lt;img /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Click &lt;STRONG&gt;OK&lt;/STRONG&gt;&lt;/P&gt;
&lt;img /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Exit Registry Editor&lt;/P&gt;
&lt;img /&gt;&lt;/LI&gt;
&lt;LI&gt;If you have already started procmon before doing these changes, you will need to restart the machine. &amp;nbsp;If not, you should be able to just start procmon.&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;From an elevated command prompt, run the command &lt;STRONG&gt;fltmc instances&lt;/STRONG&gt; and verify that the procmon drivers are running at the altitude that you set (ex. 40000).&lt;BR /&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Then reproduce the scenario you want to capture. Your capture will be even larger than normal.&lt;BR /&gt;&lt;SPAN style="font-family: inherit;"&gt;Notice now when we review the new procmon, and view Stack we see the name of the driver LeakyFlt.sys.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;LI style="list-style-type: none;"&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Note:&lt;/STRONG&gt;&amp;nbsp; You can leave the setting as it just lowers the threshold of what we see.&amp;nbsp; And more is always better when it comes to legacy kernel drivers.&amp;nbsp; Once you get a procmon with that enabled, you can look at the stack and see it.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Note 2:&lt;/STRONG&gt;&amp;nbsp; Will the deny permission for Everyone only impacts that instance?&amp;nbsp; Will it not interfere with other applications/permissions on the machine?&lt;/P&gt;
&lt;P&gt;It only affects that procmon instance; not all procmons.&amp;nbsp; So, if they installed e.g., something that had their own procmon instance it would not impact it.&amp;nbsp; You can take ownership of the key to delete the key when you are done.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Mon, 08 Feb 2021 18:52:45 GMT</pubDate>
      <guid>https://techcommunity.microsoft.com/t5/ask-the-performance-team/change-altitude-of-process-monitor-procmon/ba-p/2118159</guid>
      <dc:creator>TeedaN</dc:creator>
      <dc:date>2021-02-08T18:52:45Z</dc:date>
    </item>
    <item>
      <title>Windows 10/Server 2016 Graphics Troubleshooting</title>
      <link>https://techcommunity.microsoft.com/t5/ask-the-performance-team/windows-10-server-2016-graphics-troubleshooting/ba-p/2059092</link>
      <description>&lt;P&gt;My name is Susan, and I am a Support Escalation Engineer on the Windows Performance Team at Microsoft.&amp;nbsp; A special thanks to my colleague, Dan, for his input.&lt;BR /&gt;&lt;BR /&gt;This blog will address how to troubleshoot graphics issues in Windows 10 and includes identifying and data collection.&lt;/P&gt;
&lt;H2&gt;Scenario&lt;/H2&gt;
&lt;UL&gt;
&lt;LI&gt;You have a Windows 10, Server 2016 or later showing graphics corruption such as black bars*, trails*, artifacts* when moving windows, or distortion. (*Defined at end of this post.)&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Troubleshooting&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;When you experience graphics corruption, always start by isolating it to a specification application, OS, and identify steps to reproduce the issue.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;First, confirm if the issue is specific to an application. If it’s only a custom in house application, or a 3&lt;SUP&gt;rd&lt;/SUP&gt; party application, please engage the vendor of the application.&lt;/LI&gt;
&lt;LI&gt;Take a screenshot of the distortion, or a video demo’ing the distortion (use your cell phone if necessary).&lt;/LI&gt;
&lt;LI&gt;In this example, let’s assume Word is the only application impacted:&lt;/LI&gt;
&lt;OL class="lia-list-style-type-lower-alpha"&gt;
&lt;LI&gt;Test starting the application in Safe mode (if applicable)
&lt;UL&gt;
&lt;LI&gt;Start &amp;gt; Run &amp;gt; &lt;EM&gt;Winword /safe&lt;/EM&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;/OL&gt;
&lt;P class="lia-indent-padding-left-120px"&gt;OR&lt;/P&gt;
&lt;OL class="lia-list-style-type-lower-roman"&gt;
&lt;OL class="lia-list-style-type-lower-alpha"&gt;
&lt;LI style="list-style-type: none;"&gt;
&lt;UL&gt;
&lt;LI&gt;Hold down the CTRL key while starting the application until the following prompt appears:&lt;BR /&gt;&lt;img /&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;If the issue does NOT reproduce, begin investigating Add-ins that may be impacting the application:&lt;/LI&gt;
&lt;LI&gt;Start the application normally, and Enable Hardware Acceleration
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;Microsoft Office 2019/16/13&lt;/STRONG&gt; is a great software for &lt;STRONG&gt;Windows 10/8&lt;/STRONG&gt; if application specific (e.g. Office) test &lt;STRONG&gt;Enabling&lt;/STRONG&gt; the &lt;STRONG&gt;Disable Graphics Acceleration&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;Click File &lt;img /&gt;&lt;/LI&gt;
&lt;LI&gt;Click Options&lt;BR /&gt;&lt;img /&gt;&lt;/LI&gt;
&lt;LI&gt;Click Advanced&lt;/LI&gt;
&lt;LI&gt;Scroll down to the Display Section and Enable &lt;STRONG&gt;Disable Hardware graphics acceleration (screenshot shows it is currently disabled)&lt;/STRONG&gt;&lt;STRONG&gt;&lt;img /&gt;&lt;/STRONG&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;/OL&gt;
&lt;P&gt;If the issue is more systemic:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Update the Graphics Card driver/GPU to the latest drivers and reboot
&lt;OL class="lia-list-style-type-lower-alpha"&gt;
&lt;LI&gt;Use Device Manager and click on Display Adapters&lt;img /&gt;&lt;/LI&gt;
&lt;LI&gt;Select the adapter, right-click and select Update driver&lt;/LI&gt;
&lt;LI&gt;&lt;img /&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;/LI&gt;
&lt;LI&gt;Test using a lower video resolution on the OS or the Base video
&lt;OL class="lia-list-style-type-lower-alpha"&gt;
&lt;LI&gt;Start &amp;gt; Search &amp;gt; MSConfig&lt;img /&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;/LI&gt;
&lt;LI&gt;Boot into Windows Safe Mode with network and test
&lt;OL class="lia-list-style-type-lower-alpha"&gt;
&lt;LI&gt;Start &amp;gt; Search &amp;gt; MSConfig&lt;img /&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;/LI&gt;
&lt;LI&gt;In many versions of Windows 10, WPR is built in. Use either following the GUI or command line below&amp;nbsp;
&lt;PRE&gt;wpr&lt;STRONG style="color: #3e3e3e; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 13px;"&gt; -start gpu -start video -start audio&lt;/STRONG&gt;&lt;/PRE&gt;
&lt;OL&gt;
&lt;LI style="list-style-type: none;"&gt;
&lt;UL&gt;
&lt;LI&gt;Reproduce the issue e.g. run a workload such as video playback or a real time communications scenario, or dragging an application across the screen.&lt;/LI&gt;
&lt;LI&gt;Run the following command:&lt;/LI&gt;
&lt;/UL&gt;
&lt;PRE&gt;&lt;STRONG&gt;wpr -stop Media.etl&lt;/STRONG&gt;&lt;/PRE&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;/LI&gt;
&lt;LI&gt;Run DxDiag
&lt;OL class="lia-list-style-type-lower-alpha"&gt;
&lt;LI&gt;Start &amp;gt; Search &amp;gt; DxDiag&lt;BR /&gt;&lt;img /&gt;&lt;/LI&gt;
&lt;LI&gt;Check the Video drivers and confirm they are up to date.&amp;nbsp; If an update was just applied, you may wish to rollback and test.&lt;/LI&gt;
&lt;LI&gt;Lastly, &lt;STRONG&gt;Save All&lt;/STRONG&gt;
&lt;DIV id="tinyMceEditorTeedaN_1" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV id="tinyMceEditorTeedaN_3" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV id="tinyMceEditorTeedaN_4" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV id="tinyMceEditorTeedaN_5" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;/LI&gt;
&lt;LI&gt;Last resort: gather a complete memory dump of the Operating System while the distortion is present.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;*Glossary and Guide: graphics issues&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;Black Bars:&amp;nbsp;&lt;/STRONG&gt; desktop may appear to have black lines either vertical or horizontal.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Trails and Artifacts:&amp;nbsp;&lt;/STRONG&gt;On moving a tiled window or application, it may leave a trail of what appears to be orphaned.&amp;nbsp;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2021 17:22:13 GMT</pubDate>
      <guid>https://techcommunity.microsoft.com/t5/ask-the-performance-team/windows-10-server-2016-graphics-troubleshooting/ba-p/2059092</guid>
      <dc:creator>TeedaN</dc:creator>
      <dc:date>2021-02-03T17:22:13Z</dc:date>
    </item>
    <item>
      <title>Alternative Tools for Application Hangs</title>
      <link>https://techcommunity.microsoft.com/t5/ask-the-performance-team/alternative-tools-for-application-hangs/ba-p/1685245</link>
      <description>&lt;P&gt;My name is Susan Buchanan and today I’d like to discuss some basic troubleshooting for applications hangs using &lt;STRONG&gt;Task Manager, Resource Monitor,&lt;/STRONG&gt; and &lt;STRONG&gt;WaitingOn&lt;/STRONG&gt; outside of getting an application dump.&amp;nbsp; A special shout out to Leo Fagundes for writing the WaitingOn application.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Troubleshooting application hangs is key to resolution. Getting an application dump will not always be a smoking gun and should be used as a last resort for various reasons as missing symbols for 3&lt;SUP&gt;rd&lt;/SUP&gt; party applications or waiting on other processes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Task Manager &amp;amp; Resource Monitor – Analyze Wait Chain:&lt;/STRONG&gt; Beginning with Windows 8, in 2014 we added new options into Task Manager as well as Resource Monitor was the “Analyze Wait Chain” option when you right-click on a task in the Details view. This allows you to see what processes are waiting for a resource that is being used by another process.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;What this means is that if you have an application hanging for some reason, you can analyze the wait chain to see whether it is waiting on something that is in use.&lt;/LI&gt;
&lt;LI&gt;Additional Information on how to prevent hangs in windows applications:&lt;BR /&gt;&lt;A href="https://docs.microsoft.com/en-us/windows/win32/win7appqual/preventing-hangs-in-windows-applications" target="_blank" rel="noopener"&gt;https://docs.microsoft.com/en-us/windows/win32/win7appqual/preventing-hangs-in-windows-applications&lt;/A&gt; and a Blog which talks about the “analyze wait chain” feature: &lt;BR /&gt;&lt;A href="https://blogs.technet.microsoft.com/tip_of_the_day/2014/03/01/tip-of-the-day-wait-chain-analyzer/" target="_blank" rel="noopener"&gt;https://blogs.technet.microsoft.com/tip_of_the_day/2014/03/01/tip-of-the-day-wait-chain-analyzer/&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;&lt;STRONG&gt;WaitingOn.exe&lt;/STRONG&gt; a simple tool that helps troubleshoot hung applications and services.&amp;nbsp;&lt;/H3&gt;
&lt;P&gt;WaitingOn.exe is available at &lt;A href="https://github.com/leonardomsft/WaitingOn/releases/download/v1.1/WaitingOn.exe" target="_blank" rel="noopener"&gt;https://github.com/leonardomsft/WaitingOn/releases/download/v1.1/WaitingOn.exe&lt;/A&gt;, and besides functional, it’s still experimental. Use it with caution. If you install it on a customer’s machine, please remove it at the end of the troubleshooting session.&lt;/P&gt;
&lt;P&gt;WaitingOn.exe displays all the blocked threads from a process and what they are Waiting On. It can also display all blocked threads for all processes in the system.&lt;/P&gt;
&lt;P&gt;WaitingOn.exe leverages the Wait Chain Traversal (WCT) API introduced in Windows 2008/Vista. The WCT API is the one behind the "Analyze Wait Chain" functionality in Task Manager and Resource Monitor.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;&lt;STRONG&gt;Task Manager&lt;/STRONG&gt;&lt;/H3&gt;
&lt;P&gt;One of the new options added into Task Manager in recent versions was the “Analyze Wait Chain” option when you right-click on a task in the Details view. This allows you to see what processes are waiting for a resource that is being used by another process.&lt;/P&gt;
&lt;P&gt;What this means is that if you have an application hanging for some reason, you can analyze the wait chain to see whether it is waiting on something that is in use.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For instance, we printed from Word, and then used this option while the print process was happening to see what would happen. In this case, Word was waiting for splwow64.exe, which handles printing from 32-bit applications.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It’s worth noting that because Word is written properly, the GUI interface doesn’t actually hang while it is waiting for the other process.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In this case the process is working correctly and is not hung.&lt;/P&gt;
&lt;P&gt;For 3&lt;SUP&gt;rd&lt;/SUP&gt; party applications, it may show you other processes it is waiting on.&amp;nbsp; If the selected process is waiting for another process, a tree organized by dependency on other processes will be displayed. (See screenshot above).&lt;BR /&gt;&lt;STRONG&gt;NOTE:&lt;/STRONG&gt; &lt;EM&gt;Many system processes depend on other processes and services for normal operation. Both Task Manager and Resource Monitor will display &lt;/EM&gt;&lt;A href="https://msdn.microsoft.com/en-us/library/ms681622(VS.85).aspx" target="_blank" rel="noopener"&gt;&lt;STRONG&gt;&lt;EM&gt;wait chain&lt;/EM&gt;&lt;/STRONG&gt;&lt;/A&gt;&lt;EM&gt; information for any process. &lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;U&gt;In a second scenario BadApp.exe is not responding&lt;/U&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We attempt to Analyze Wait Chain from within Task Manager&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the application is not waiting on anything, it will be empty:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the application is waiting on something, it will show the process it is waiting for:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;(In this example you can see that Perfmon is waiting on a svchost). We will dig deeper into this in a few moments.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;&lt;STRONG&gt;Resource Monitor&lt;/STRONG&gt;&lt;/H3&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;U&gt;Use case example: Badapp&lt;/U&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Start Resource Monitor by either typing ResMon from the search box or starting the Resource Monitor icon from the Start Menu.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In Resource Monitor we see badapp.exe is not responding.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;If a process entry in the table is not &lt;STRONG&gt;red&lt;/STRONG&gt;, if the process status is &lt;STRONG&gt;Running&lt;/STRONG&gt;, and if the program is operating normally, then no action should be required by you&lt;/EM&gt;.&lt;BR /&gt;&lt;EM&gt;If a process entry in the table is &lt;STRONG&gt;red&lt;/STRONG&gt;, if the process status is &lt;STRONG&gt;not running&lt;/STRONG&gt;, and if the program is&amp;nbsp; not operating normally, then you can try killing the process it is waiting on starting with the child processes in red first, then moving to the parent processes.&lt;BR /&gt;&lt;BR /&gt;&lt;/EM&gt;You can start a “wait chain analysis” from Resource Monitor as well, simply do a right click on the process you want to investigate.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Using WaitingOn.exe &amp;amp; it’s Advantages&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;WaitingOn.exe&lt;/STRONG&gt; has the following advantages over Task Manager and Resource Monitor:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;It displays what type of object is blocking the thread.&lt;/LI&gt;
&lt;LI&gt;It displays the name of the object blocking the thread.&lt;/LI&gt;
&lt;LI&gt;It can be scripted.&lt;/LI&gt;
&lt;LI&gt;It can be run against a computer that you can't logon (by using PsExec or Remote Powershell).&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;WaitingOn.exe was built on top of the sample WCF code available in the MSDN documentation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;U&gt;Use case example: Badapp&lt;/U&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;As seen earlier, this process is the parent process that is hung and is not waiting on any other processes thread.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;U&gt;&lt;BR /&gt;Use case example : Perfmon&lt;/U&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;In this example, we had a hung perfmon.exe window that was not responding to mouse clicks. Attempting to run the Analyze Wait Chain command from Task Manager produced the following results:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We can see that perfmon.exe (PID 3292) is waiting on an svchost process (PID 1564), but since it hosts many services, there is not much we can do.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;lt;background information&amp;gt;&lt;BR /&gt;&lt;/STRONG&gt;If you encounter a service host with multiple services, always consider isolating the services. In Windows 10 / WS 2016 we have introduced the change by default (if you have more than 4 GB RAM). To isolate a service, we use the sc.exe command line tool: &lt;BR /&gt;sc config &amp;lt;servicename&amp;gt; type= own &lt;BR /&gt;&lt;EM&gt;Important: there is a space between type= and own which is required!&lt;BR /&gt;&lt;/EM&gt;&lt;A href="https://docs.microsoft.com/de-de/windows-server/administration/windows-commands/sc-config" target="_blank" rel="noopener"&gt;https://docs.microsoft.com/de-de/windows-server/administration/windows-commands/sc-config&lt;/A&gt; &lt;BR /&gt;&lt;STRONG&gt;&amp;lt;/background information&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Now, running WaitingOn.exe against the hung perfmon.exe revealed that Thread 7352 was blocked by an Alpc called “\RPC Control\DNSResolver”, which was found in the svchost.exe handle list:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We then can use Process Explorer to further investigate or kill that object (which might result in unexpected behavior!)&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In this case we decided to simply restart the associated service (DNS Cache service) which unfroze the perfmon.exe window.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Additional information: &lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Links within this article:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Additional Information on how to prevent hangs in windows applications:&lt;BR /&gt;&lt;A href="https://docs.microsoft.com/en-us/windows/win32/win7appqual/preventing-hangs-in-windows-applications" target="_blank" rel="noopener"&gt;https://docs.microsoft.com/en-us/windows/win32/win7appqual/preventing-hangs-in-windows-applications&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;and a Blog which talks about the “analyze wait chain” feature: &lt;BR /&gt;&lt;A href="https://blogs.technet.microsoft.com/tip_of_the_day/2014/03/01/tip-of-the-day-wait-chain-analyzer/" target="_blank" rel="noopener"&gt;https://blogs.technet.microsoft.com/tip_of_the_day/2014/03/01/tip-of-the-day-wait-chain-analyzer/&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;WaitingOn.exe at github: &lt;A style="font-family: inherit; background-color: #ffffff;" href="https://github.com/leonardomsft/WaitingOn/releases/download/v1.1/WaitingOn.exe" target="_blank" rel="noopener"&gt;https://github.com/leonardomsft/WaitingOn/releases/download/v1.1/WaitingOn.exe&lt;/A&gt;&lt;SPAN style="font-family: inherit;"&gt;,&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;Wait Chain Traversal:&lt;BR /&gt;&lt;A href="https://docs.microsoft.com/de-de/windows/win32/debug/wait-chain-traversal" target="_blank" rel="noopener"&gt;https://docs.microsoft.com/de-de/windows/win32/debug/wait-chain-traversal&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;sc command line options: &lt;BR /&gt;&lt;A style="font-family: inherit; background-color: #ffffff;" href="https://docs.microsoft.com/de-de/windows-server/administration/windows-commands/sc-config" target="_blank" rel="noopener"&gt;https://docs.microsoft.com/de-de/windows-server/administration/windows-commands/sc-config&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Fri, 18 Sep 2020 18:40:33 GMT</pubDate>
      <guid>https://techcommunity.microsoft.com/t5/ask-the-performance-team/alternative-tools-for-application-hangs/ba-p/1685245</guid>
      <dc:creator>TeedaN</dc:creator>
      <dc:date>2020-09-18T18:40:33Z</dc:date>
    </item>
    <item>
      <title>MYSTERY MEMORY LEAK: WHERE DID MY MEMORY GO?!</title>
      <link>https://techcommunity.microsoft.com/t5/ask-the-performance-team/mystery-memory-leak-where-did-my-memory-go/ba-p/1675369</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;My name is Jeffrey Worline, and I am a Senior Support Escalation Engineer on the Windows Performance Team at Microsoft. This blog addresses how to troubleshoot unaccounted memory usage or leak to include identifying and data collection.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you already determined the process consuming memory, check out my previous blog post: &lt;A href="https://techcommunity.microsoft.com/t5/ask-the-performance-team/memory-leaks-in-a-process/ba-p/1655208" target="_blank" rel="noopener"&gt;Memory Leaks in a Process&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;&lt;FONT size="5"&gt;Scenario&lt;/FONT&gt;&lt;/H3&gt;
&lt;UL&gt;
&lt;LI&gt;When you cannot reconcile the amount of RAM being used with task manager, resource monitor, or perfmon collection.&lt;/LI&gt;
&lt;LI&gt;Large chunk of RAM being used but you cannot see where or by what.&lt;/LI&gt;
&lt;/UL&gt;
&lt;H2&gt;Troubleshooting&lt;/H2&gt;
&lt;H4&gt;&lt;STRONG&gt;Scenario A&lt;/STRONG&gt;&lt;/H4&gt;
&lt;P&gt;When large amount of RAM is being used by not accounted for in task manager or resource manager. How do we find or account where that mystery memory is being used?&amp;nbsp;&lt;A href="https://technet.microsoft.com/en-us/sysinternals/rammap.aspx" target="_blank" rel="noopener"&gt;RAMMap&lt;/A&gt;&amp;nbsp;from Sysinternals is the tool needed for the job.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;First, when looking in task manager and at the memory usage by processes to view memory usage, ensure you also look in the Memory box on the performance tab – the amount of cached, paged pool, and non-paged pool memory usage.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-60px"&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL start="2"&gt;
&lt;LI&gt;Download &lt;A href="https://docs.microsoft.com/en-us/sysinternals/downloads/rammap" target="_blank" rel="noopener"&gt;RAMMap&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;Launch RAMMap to have it take a snapshot of memory usage.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H4&gt;&lt;STRONG&gt;Glossary and Guide to the column and row headings&lt;/STRONG&gt;&lt;/H4&gt;
&lt;H4&gt;&lt;U&gt;&lt;STRONG&gt;Stages of memory&lt;/STRONG&gt;&lt;/U&gt;&lt;/H4&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;Active:&amp;nbsp;&lt;/STRONG&gt;Pages of physical RAM in active use by the specified category (usually a process working set or the system working set).&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Standby:&amp;nbsp;&lt;/STRONG&gt;Pages of physical RAM not actively being used. These are still left in physical RAM but will be repurposed first by the memory manager (either returned to the active list or zeroed out and reused) if something needs physical ram for active pages.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Modified:&amp;nbsp;&lt;/STRONG&gt;Similar to Standby, but these are pages of physical RAM that have been changed and must be flushed to disk before reusing them.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Modified no write:&amp;nbsp;&lt;/STRONG&gt;Similar to modified pages but have been marked not to write out to disk.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Transition:&amp;nbsp;&lt;/STRONG&gt;Pages that are in transition between any of the other categories&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Zeroed:&amp;nbsp;&lt;/STRONG&gt;Pages that have been zeroed out and are ready to be used – they can be quickly allocated for new physical memory allocations&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Free:&amp;nbsp;&lt;/STRONG&gt;Free pages are free to be used but have some type of “dirty” data in them so they must be zeroed for security reasons before given to a user process.&amp;nbsp; These are usually pages that have been freed by an existing process.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Bad:&amp;nbsp;&lt;/STRONG&gt;These are physical pages that have been marked as bad.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Areas of interest would be the following rows to check for high memory consumption to account where the rest of your memory is being used.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;TIP:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;If you have a memory leak and get to the point of almost running out of memory, the normal procedure is to reboot the machine in order to clear out the memory. You can use RAMMap to clear areas of memory negating the need to reboot the machine.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;H4&gt;&lt;U&gt;&lt;STRONG&gt;Types of memory usage&lt;/STRONG&gt;&lt;/U&gt;&lt;/H4&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;Process Private:&lt;/STRONG&gt; Memory allocated for use only by a single process.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Mapped file:&lt;/STRONG&gt; Mapped “views” of files are when the contents of that file are mapped to virtual addresses in memory.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Shareable:&lt;/STRONG&gt; Pages that have been marked as shared can be used by multiple processes.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Paged Pool:&lt;/STRONG&gt; Kernel pooled memory that &lt;U&gt;can&lt;/U&gt; be paged to disk.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Nonpaged Pool:&lt;/STRONG&gt; Kernel pooled memory that &lt;U&gt;cannot&lt;/U&gt; be paged to disk.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Session Private:&lt;/STRONG&gt; Memory that is private to a particular logged in session. This will be higher on RDS Session Host server.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Metafile:&lt;/STRONG&gt; Metafile is a part of the system cache containing NTFS metadata and used to increase the performance of the file system.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;AWE:&lt;/STRONG&gt; You will typically see this used by SQL or other database applications.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Driver Locked:&lt;/STRONG&gt; These are pages that have been locked in physical RAM by a driver. Usually see this usage with Hyper-V or VMware virtual machines.&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Large Page: &lt;/STRONG&gt;Normal page size for Windows memory is 4kb on x64 systems. But with large pages, the size is 2mb. SQL Server and Oracle support the concept of Large Pages when allocating memory.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In this snapshot, you can see that about half of the physical RAM being used is by Mapped Files:&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL start="4"&gt;
&lt;LI&gt;In this example, next we would click on the Physical Pages tab&lt;/LI&gt;
&lt;LI&gt;Now at the bottom of the tool select "Use" for the Filter and "is" select "Mapped File" from the drop down.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P class="lia-indent-padding-left-60px"&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This will now show you all the mapped file entries.&lt;/P&gt;
&lt;OL start="6"&gt;
&lt;LI&gt;Next, I would click on the File Name column heading to group similar file names so at this point I could look to see if all the mapping were going to the same path or general path to help determine what is causing all the mapped files.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-60px"&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This information is not something you will see any place else other than an RAMMap or memory dump.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Scenario B&lt;/STRONG&gt;&lt;BR /&gt;On a VMWare or Hyper-V system, the hypervisor can take memory away from one VM and give it to another VM. It does this by using a driver loaded in the VM to "lock" the memory at the kernel level which can then be given to another VM. If too much memory is taken away, this will cause working set trimming and general performance issues. Standard perfmon memory counters will not provide the info to account for the missing memory. This driver locked or "ballooned" memory can be seen 4 different ways depending on the OS.&lt;BR /&gt;&lt;BR /&gt;VMWare console - Memory and processor utilization for each VM will be clearly seen in the VMWare console. If you have access to the console, then this is the preferred method to see the state of memory in the VM.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;VMware performance counters - When VMWare tools are installed, VMware performance counters are also created. These can be manually loaded in Performance Monitor or use the logman.exe method below to set up perfmon collection.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;Example of Logman to collect VMWare processor and memory counter:&lt;/H3&gt;
&lt;P&gt;The following will configure the counters, set logging to circular with max file size of 300 mb, and take a counter reading every 3 seconds.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;The resultant log will be place in c:\perflogs.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;lt;&amp;lt;Start Search&amp;gt;&amp;gt;, enter "&lt;STRONG&gt;CMD.exe&lt;/STRONG&gt;" w/o the quotation marks and then press Enter.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Copy and paste the following command into the command prompt window:&lt;/LI&gt;
&lt;/UL&gt;
&lt;PRE&gt;&lt;STRONG&gt;Logman.exe create counter PerfLog-Short -o "c:\perflogs\PerfLog-Short.blg" -f bincirc -v mmddhhmm -max 300 -c "\LogicalDisk(*)\*" "\Memory\*" "\Cache\*" "\Network Interface(*)\*" "\Paging File(*)\*" "\PhysicalDisk(*)\*" "\Processor(*)\*" "\Processor Information(*)\*" "\Process(*)\*" "\Thread(*)\*" "\Redirector\*" "\Server\*" "\System\*" "\Server Work Queues(*)\*" "\Terminal Services\*" "\VM Processor\*" "\VM Memory\*" -si 00:00:03&lt;/STRONG&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Start the log with:&lt;/LI&gt;
&lt;/UL&gt;
&lt;PRE&gt;&lt;STRONG&gt;Logman.exe start PerfLog-Short&lt;/STRONG&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;To stop perfmon log:&lt;/LI&gt;
&lt;/UL&gt;
&lt;PRE&gt;&lt;STRONG&gt;Logman.exe stop PerfLog-Short&lt;/STRONG&gt;&lt;/PRE&gt;
&lt;P&gt;Example output from Perfmon:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example Sysinternals&amp;nbsp;&lt;A href="https://docs.microsoft.com/en-us/sysinternals/downloads/rammap" target="_blank" rel="noopener"&gt;RAMMap&lt;/A&gt;:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- Jeffrey Worline&lt;/P&gt;</description>
      <pubDate>Wed, 16 Sep 2020 21:06:47 GMT</pubDate>
      <guid>https://techcommunity.microsoft.com/t5/ask-the-performance-team/mystery-memory-leak-where-did-my-memory-go/ba-p/1675369</guid>
      <dc:creator>TeedaN</dc:creator>
      <dc:date>2020-09-16T21:06:47Z</dc:date>
    </item>
    <item>
      <title>Memory Leaks in a Process</title>
      <link>https://techcommunity.microsoft.com/t5/ask-the-performance-team/memory-leaks-in-a-process/ba-p/1655208</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My name is Jeffrey Worline, and I am a Senior Support Escalation Engineer on the Windows Performance Team at Microsoft. This blog addresses troubleshooting leaks occurring in a process to include identifying and data collection. This article assumes that you have already identified the process that is leaking. If you have not yet been able to identify where your leak is, please see my blog: &lt;A href="https://techcommunity.microsoft.com/t5/ask-the-performance-team/mystery-memory-leak-where-did-my-memory-go/ba-p/1675369" target="_self"&gt;&lt;STRONG&gt;MYSTERY MEMORY LEAK: WHERE DID MY MEMORY GO?!&lt;/STRONG&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;First thing we need to determine is memory consumption being caused by private data, heap data or some other memory type. We need to address the memory types differently.&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Download a Windows Sysinternals tool called&amp;nbsp;&lt;A href="https://docs.microsoft.com/en-us/sysinternals/downloads/vmmap" target="_blank" rel="noopener"&gt;VMMap&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;VMMap is an utility application analyzing virtual and physical memory. It shows a breakdown of a process's committed virtual memory types as well as the amount of physical memory (working set) assigned by the operating system to those types.&lt;/P&gt;
&lt;P&gt;This tool is used to attach to an individual process allowing a snapshot to be taken to see the memory map for that process.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Simply launch VMMap and from the process list it displays, pick the instance showing the high private working set.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;If the high memory is being caused by Heap, you will need to enable User Stack Tracking (UST) against the process using gflags.exe which is part of the Debugging Tools for Windows.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Note:&lt;/STRONG&gt;&amp;nbsp;If the high memory shows as Private Data or some other type other than heap, simply continue with getting procdump when memory usage is high.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Disclaimer&lt;/STRONG&gt;: The intent of this blog is not to teach you how to debug. If you are not familiar with debugging process dumps, please open a case with Microsoft support for assistance&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Scenario A: Uniquely named process with high memory by Heap&lt;/STRONG&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Download&amp;nbsp;&lt;A href="https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/" target="_blank" rel="noopener"&gt;Debugging Tools for Windows&lt;/A&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P class="lia-indent-padding-left-60px"&gt;Just need the standalone version since we only need the debugging tool and not the whole WDK package.&lt;/P&gt;
&lt;P class="lia-indent-padding-left-60px"&gt;&lt;STRONG&gt;Note:&lt;/STRONG&gt;&amp;nbsp;If the high memory shows as Private Data or some other type other than heap, simply continue with getting procdump when memory usage is high.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL start="2"&gt;
&lt;LI&gt;Go to the directory where you installed the tool and you will find &lt;STRONG&gt;gflags.exe&lt;/STRONG&gt; as one of the files, right-click on it and select “Run as administrator.”&lt;/LI&gt;
&lt;LI&gt;Click on “Image File” tab.&lt;/LI&gt;
&lt;LI&gt;Type in the process name, for example notepad.exe&amp;nbsp;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P class="lia-indent-padding-left-60px"&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL start="5"&gt;
&lt;LI&gt;Hit the keyboard TAB key to refresh&lt;/LI&gt;
&lt;LI&gt;Place check mark in “Create user mode stack trace database.”&lt;/LI&gt;
&lt;/OL&gt;
&lt;P class="lia-indent-padding-left-60px"&gt;&lt;STRONG style="font-family: inherit;"&gt;Note&lt;/STRONG&gt;&lt;SPAN style="font-family: inherit;"&gt;: Be sure to reverse your gflag setting also by unchecking the “Create user mode stack trace database” when no longer needed.&lt;/SPAN&gt;&lt;/P&gt;
&lt;OL start="7"&gt;
&lt;LI&gt;Click “OK”.&lt;/LI&gt;
&lt;LI&gt;The process or service will need to be restarted to put in to effect.&lt;/LI&gt;
&lt;LI&gt;Get procdump of process when memory is high.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Scenario B: High memory occurring in svchost.exe process by Heap&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;If the svchost process contains more than one service, you will need to break each service out to run in its own svchost process to determine which service is causing the high memory. Once that has been determined, then need to uniquely name that svchost process the service runs in and then enable UST against it. You &lt;STRONG&gt;do not&lt;/STRONG&gt; want to enable UST globally against all svchost process as it will put a serious performance hit.&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;STRONG&gt;Note:&lt;/STRONG&gt;&amp;nbsp;We don't ever want to enable UST against svchost.exe as that would enable against any and all instances of svchost.exe running and could cause a performance hit on the machine because of the overhead.&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Use Task Manager to document the PID of the service that is demonstrating high memory usage.&lt;/LI&gt;
&lt;LI&gt;From administrative command prompt run following command:
&lt;PRE&gt;&lt;STRONG&gt;tasklist /svc&lt;/STRONG&gt;&lt;/PRE&gt;
&lt;/LI&gt;
&lt;LI&gt;Using PID you documented from Task Manager, locate that svchost process and document the services that it is hosting.&lt;/LI&gt;
&lt;LI&gt;Break each service out into its own svchost process if it is a shared svchost process hosting several services by running following command for each service:&amp;nbsp;
&lt;PRE&gt;&lt;STRONG style="font-family: inherit;"&gt;sc config &amp;lt;service name&amp;gt; type= own&amp;nbsp;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/PRE&gt;
replace &amp;lt;service name&amp;gt; with actual service name&lt;BR /&gt;&lt;STRONG style="font-family: inherit;"&gt;Note&lt;/STRONG&gt;&lt;SPAN style="font-family: inherit;"&gt;: there is no space in “type=” and there is a space between “= own”&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;OL start="5"&gt;
&lt;LI&gt;Restart the service for setting to take effect.&lt;/LI&gt;
&lt;LI&gt;Verify the services are running in their own svchost process by running &lt;STRONG&gt;tasklist /svc&lt;/STRONG&gt; from command prompt again.&lt;/LI&gt;
&lt;LI&gt;At this point, you have broken each service out into its own svchost process; now identify which service was driving up memory usage before proceeding to next step.&lt;/LI&gt;
&lt;LI&gt;Once the service has been identified, from administrative command prompt change command focus to c:\windows\system32 folder if needed and run following command:
&lt;PRE&gt;&lt;STRONG&gt;copy svchost.exe &amp;lt;unique name&amp;gt;&lt;/STRONG&gt;&lt;/PRE&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P class="lia-indent-padding-left-60px"&gt;Replace &amp;lt;unique name&amp;gt; with something that represents the service. Example for wmi service - wmisvchost.exe&lt;/P&gt;
&lt;OL start="9"&gt;
&lt;LI&gt;Launch registry editor (Start &amp;gt; Run &amp;gt; “regedit.exe”) and navigate to HKLM\System\CurrentControlSet\Services then the appropriate key for the service you are uniquely naming svchost process for.&lt;/LI&gt;
&lt;LI&gt;Modify existing ImagePath from&amp;nbsp;%systemroot%\system32\svchost.exe -k netsvcs to&amp;nbsp;%systemroot%\system32\&amp;lt;unique name&amp;gt; -k netsvcs&lt;/LI&gt;
&lt;/OL&gt;
&lt;P class="lia-indent-padding-left-60px"&gt;Replace &amp;lt;unique name&amp;gt; with that used in step 8. In this example that would be:&amp;nbsp;%systemroot%\system32\wmisvchost.exe -k netsvcs&lt;/P&gt;
&lt;P class="lia-indent-padding-left-60px"&gt;&lt;STRONG&gt;Note&lt;/STRONG&gt;: Backup the registry key before modifying it&lt;/P&gt;
&lt;OL start="11"&gt;
&lt;LI&gt;Restart the service.&lt;/LI&gt;
&lt;LI&gt;Use gflags as noted earlier to enable “&lt;STRONG&gt;Create user mode stack trace database&lt;/STRONG&gt;” against the uniquely name svchost process, then restart the service to apply the new settings.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P class="lia-indent-padding-left-60px"&gt;&lt;STRONG&gt;Note:&lt;/STRONG&gt;&amp;nbsp;It is important that you go back and reverse what you did in step 4 and modify path back to original after you are no longer needing the service to be broken out and uniquely named as failure to do so can prevent future hotfixes from being installed associated with that service.&lt;/P&gt;
&lt;P class="lia-indent-padding-left-60px"&gt;To reverse, replace sc config &amp;lt;service name&amp;gt; type= own with&amp;nbsp;&lt;STRONG&gt;sc config &amp;lt;service name&amp;gt; type= share&lt;/STRONG&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-60px"&gt;Reverse your gflag setting also by unchecking the “Create user mode stack trace database”.&lt;/P&gt;
&lt;P class="lia-indent-padding-left-60px"&gt;Reverse your setting in the registry under the service key for the ImagePath.&lt;/P&gt;
&lt;OL start="13"&gt;
&lt;LI&gt;Get a procdump of the process when memory is high.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Directions for Procdump&lt;/STRONG&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Download &lt;A href="https://docs.microsoft.com/en-us/sysinternals/downloads/procdump" target="_blank" rel="noopener"&gt;Procdump&lt;/A&gt; tool from Sysinternals&lt;/LI&gt;
&lt;/OL&gt;
&lt;P class="lia-indent-padding-left-60px"&gt;&lt;STRONG&gt;Note&lt;/STRONG&gt;: Use procdump if dumping 32-bit process and use procdump64 if dumping a 64-bit process&lt;/P&gt;
&lt;OL start="2"&gt;
&lt;LI&gt;From and administrative command prompt, navigate to the directory where you downloaded and unzipped procdump tool.&lt;/LI&gt;
&lt;LI&gt;Run the following command to dump a unique name process:
&lt;PRE&gt;&lt;STRONG&gt;procdump -ma &amp;lt;process name&amp;gt;&lt;/STRONG&gt;&lt;/PRE&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P class="lia-indent-padding-left-60px"&gt;The -ma switch is to perform a full memory dump of the process.&lt;/P&gt;
&lt;P class="lia-indent-padding-left-60px"&gt;Replace &amp;lt;process name&amp;gt; with actual process name.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If there is more than one instance of a process running with the same name you must dump the process by PID as opposed to name.&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;e.g. &lt;STRONG&gt;procdump -ma &amp;lt;PID&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;Replace &amp;lt;PID&amp;gt; with actual PID of the process.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Next Up: &lt;A href="https://techcommunity.microsoft.com/t5/ask-the-performance-team/mystery-memory-leak-where-did-my-memory-go/ba-p/1675369" target="_self"&gt;&lt;STRONG&gt;MYSTERY MEMORY LEAK: WHERE DID MY MEMORY GO?!&lt;/STRONG&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- Jeffrey Worline&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Sep 2020 21:08:53 GMT</pubDate>
      <guid>https://techcommunity.microsoft.com/t5/ask-the-performance-team/memory-leaks-in-a-process/ba-p/1655208</guid>
      <dc:creator>TeedaN</dc:creator>
      <dc:date>2020-09-16T21:08:53Z</dc:date>
    </item>
    <item>
      <title>How to configure file associations for IT Pros</title>
      <link>https://techcommunity.microsoft.com/t5/ask-the-performance-team/how-to-configure-file-associations-for-it-pros/ba-p/1313151</link>
      <description>&lt;P&gt;All steps described in this have been tested on Windows 10 versions.&lt;/P&gt;
&lt;P&gt;These steps apply to Windows 10 release through Windows 11.&lt;/P&gt;
&lt;H2 id="configuring-file-association-prior-windows-10"&gt;Configuring file association prior Windows 10&lt;/H2&gt;
&lt;P&gt;There were different ways and guidance to set default program prior to Windows 10 (see &lt;A href="https://msdn.microsoft.com/en-us/library/windows/desktop/cc144160(v=vs.85).aspx" target="_blank" rel="noopener" data-linktype="external"&gt;Managing Default Applications&lt;/A&gt;).&lt;/P&gt;
&lt;P&gt;Before Windows 10, an application could check default apps, ask for user consent and set default app programmatically using &lt;A href="https://msdn.microsoft.com/en-us/library/windows/desktop/bb776332(v=vs.85).aspx" target="_blank" rel="noopener" data-linktype="external"&gt;Windows API&lt;/A&gt;.&lt;/P&gt;
&lt;DIV id="tinyMceEditorCraigMarcho_0" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But some programs skip the user consent and set the app defaults into the registry. The main requirement for default file association is often forgotten: the end-user is in control.&lt;/P&gt;
&lt;P&gt;Now in Windows 10 checks if registry file extension keys have not been modified to prevent file association hijacking.&lt;/P&gt;
&lt;H2 id="file-association-changes-in-windows-10"&gt;File association changes in Windows 10&lt;/H2&gt;
&lt;P&gt;The way that default file associations work changed in Windows 10.&lt;/P&gt;
&lt;P&gt;There is a new UI for the end-user. This new way puts the user in control with a new file association notification.&lt;/P&gt;
&lt;P&gt;This notification will be displayed:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;On the first launch of a file extension, if multiples programs are registered for handling that file extension.&lt;/LI&gt;
&lt;LI&gt;Each time a new application registers a file extension, except if the Always use this app to open .xxx files is checked.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;If an application used Windows API to set default apps, the user will receive the following notification:&lt;/P&gt;
&lt;DIV id="tinyMceEditorCraigMarcho_2" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For more information about these changes : &lt;A href="https://blogs.windows.com/windowsexperience/2015/05/20/announcing-windows-10-insider-preview-build-10122-for-pcs/" target="_blank" rel="noopener" data-linktype="external"&gt;https://blogs.windows.com/windowsexperience/2015/05/20/announcing-windows-10-insider-preview-build-10122-for-pcs/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;You will find some explanation on The Old New Thing blog: &lt;A href="https://blogs.msdn.microsoft.com/oldnewthing/20170517-00/?p=96175" target="_blank" rel="noopener" data-linktype="external"&gt;Why do my PDF file associations get reset every time I restart?&lt;/A&gt;&lt;/P&gt;
&lt;H2 id="windows-10-an-app-default-was-reset"&gt;Windows 10: An app default was reset&lt;/H2&gt;
&lt;P&gt;But what happens if an application is not using Windows API and writes some stuff and hijacks user preferences?&lt;/P&gt;
&lt;P&gt;Now,Windows 10 detects that the registry is corrupted and will reset the default program for this file extension. Additionally, the end-user will receive this notification: An App default was reset. These change is documented in &lt;A href="https://support.microsoft.com/en-us/help/4001770" target="_blank" rel="noopener" data-linktype="external"&gt;KB4001770&lt;/A&gt;: &lt;EM&gt;Reset app default when a registry setting is deleted or corrupted and streamlined notification about the corruption.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;img /&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;H2 id="how-to-configure-file-association-in-windows-10"&gt;How to configure file association in Windows 10?&lt;/H2&gt;
&lt;P&gt;It's possible for IT Pro to configure or &lt;EM&gt;force&lt;/EM&gt; default association using supported methods.&lt;/P&gt;
&lt;P&gt;The best way to do it is to set up a reference computer, install applications, configure default programs and use Dism to export/import the custom default app associations or use a group policy.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;P&gt;Set up a reference computer&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;Install applications&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;Go to Control Panel\All Control Panel Items\Default Programs and configure default apps associations. In Windows 10 1709, this control panel item is now in Settings app.&lt;/P&gt;
&lt;P&gt;Let's try to configure Internet Explorer as the default browser&lt;/P&gt;
&lt;DIV id="tinyMceEditorCraigMarcho_4" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;img /&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;Choose Internet Explorer&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;img /&gt;&lt;/P&gt;
&lt;DIV id="tinyMceEditorCraigMarcho_5" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Internet Explorer is now the default web browser&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;P&gt;Export/import the custom default app association with dism.exe&lt;BR /&gt;Note that you need administrator rights to use dism.exe. And to export properly the associations use the same account used in step 3, otherwise you will get a malformed XML file.&lt;/P&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;!-- end list --&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Dism.exe /online /export-defaultappassociations:C:\temp\CustomFileAssoc.xml&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;PS C:\Windows\system32&amp;gt; dism /online /export-defaultappassociations:"C:\Temp\IE-DefaultBrowser.xml"&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Open the xml file and check if everything looks good.
&lt;DIV id="tinyMceEditorCraigMarcho_6" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Usually at this step you will be tempted to delete other lines because you simply don't care about them and get a file like this:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;FTA-IE-Only.xml&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;VERY IMPORTANT&lt;/STRONG&gt;: If you want to import your file with DISM.exe, &lt;STRONG&gt;DO NOT&lt;/STRONG&gt; delete any file associations entries!&lt;BR /&gt;A missing entry will trigger the App default reset notification and you will get a notification storm at the first logon.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;DIV id="tinyMceEditorCraigMarcho_8" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3 id="refresh-your-xml-on-a-regular-basis"&gt;Refresh your XML on a regular basis&lt;/H3&gt;
&lt;P&gt;As some recommended applications can manage more extensions with each new Windows 10 version available, it's a good practice to refresh your XML. For example, in Windows 10 1703, Microsoft Edge registers the epub extension. If you're using an XML file from Windows 10 1607, epub is missing. As a result, you will get an app reset notification for epub.&lt;/P&gt;
&lt;H3 id="tips-for-building-your-xml-file"&gt;Tips for building your XML file&lt;/H3&gt;
&lt;UL&gt;
&lt;LI&gt;Manually editing the file could result in a non-valid XML file. Ensure that your XML file is valid. Opening XML file in the &lt;EM&gt;old&lt;/EM&gt; Internet Explorer is a good idea to check if the XML is valid. You can try &lt;A href="http://xmlnotepad.codeplex.com/" target="_blank" rel="noopener" data-linktype="external"&gt;XML Notepad&lt;/A&gt; to edit/validate XML files.&lt;/LI&gt;
&lt;LI&gt;If you do not see your file extension in XML file, go back to Control Panel\All Control Panel Items\Default Programs and configure default apps associations, select file extension, click on Change Program and confirm the program in the dialog box. Then, export again you're XML file.&lt;/LI&gt;
&lt;/UL&gt;
&lt;H2 id="deploy-your-custom-xml"&gt;Deploy your custom XML&lt;/H2&gt;
&lt;P&gt;Now it's time to apply your XML file. You have two options:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Set up file association in your Windows 10 image. File associations will be configured for new users' profiles. Existing profiles are untouched. Users can change file associations.&lt;/LI&gt;
&lt;LI&gt;Configure a policy for your domain-joined computer: file association will be configured at each logon. User will be able to change file association, but at the next logon file association will be configured using XML file. This policy works only for domain-joined computer.&lt;/LI&gt;
&lt;/UL&gt;
&lt;H3 id="configure-the-xml-file-for-your-windows-10-reference-image"&gt;Configure the XML file for your Windows 10 reference image:&lt;/H3&gt;
&lt;P&gt;Dism.exe /online /import-defaultappassociations:c:\temp\CustomFileAssoc.xml&lt;/P&gt;
&lt;P&gt;Your file will be copied in \Windows\System32 with the following name OEMDefaultAssociations.xml&lt;/P&gt;
&lt;H3 id="configure-the-xml-file-for-your-domain-joined-computer"&gt;Configure the XML file for your domain-joined computer&lt;/H3&gt;
&lt;P&gt;Configure the following policy &lt;EM&gt;Set a default associations configuration file&lt;/EM&gt; located in Computer\Policies\Administrative Templates\Windows Components\File Explorer.&lt;/P&gt;
&lt;P&gt;If this group policy is enabled and the client machine is domain-joined, the file will be processed, and default associations will be applied at logon time.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;img /&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Note&lt;/STRONG&gt;&lt;/EM&gt;: this policy will not prevent user to change the file association. But at each logon the default association configured in XML file will be applied.&lt;/P&gt;
&lt;H3 id="how-to-force-only-a-set-of-file-associations"&gt;How to force only a set of file associations?&lt;/H3&gt;
&lt;P&gt;Some IT Pros want to force only some file associations and let users in control for others file associations. For example, they want to configure Internet Explorer as default for HTTP/HTTPS only for HR people.&lt;/P&gt;
&lt;P&gt;So, they removed everything in the XML file except Internet Explorer entries. &lt;STRONG&gt;As previously seen, removing entries in XML file could result in app reset notifications&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;But don't panic, there is a solution to do it in your Windows 10 reference image.&lt;/P&gt;
&lt;P&gt;You just need to have two XML files, one for configuring the defaults and another one to force file association.&lt;/P&gt;
&lt;P&gt;The main XML, CustomDefaultAssoc.xml must &lt;STRONG&gt;contain all extensions&lt;/STRONG&gt;. You need to import this file using:&lt;/P&gt;
&lt;P&gt;Dism /online /import-defaultappassociations:C:\CustomDefaultAssoc.xml&lt;/P&gt;
&lt;P&gt;The second XML, FTA-IE-Only.xml will contain only a set of file extensions. You need to use this XML file with the group policy &lt;EM&gt;Set a default associations configuration file.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;img /&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;At the first logon, Explorer.exe will apply both XML.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;The end user will have this results without any app reset notifications:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;PDF files associated with Microsoft Reader.&lt;/LI&gt;
&lt;LI&gt;HTM/HTML files associated with Internet Explorer.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;EM&gt;&lt;img /&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;OEMDefaultAssociations.xml&lt;/EM&gt; contains the following lines:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;IEOnly.xml&lt;/EM&gt; contains the following lines:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT size="5"&gt;Why I'm getting an app reset notification?&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Raymond Chen talked about &lt;A href="https://blogs.msdn.microsoft.com/oldnewthing/20170517-00/?p=96175" target="_blank" rel="noopener" data-linktype="external"&gt;this problem&lt;/A&gt;. If a program is trying to set some registry keys, Explorer will detect it and the file association will be reset.&lt;/P&gt;
&lt;P&gt;Stop using script or other pre-Windows 10 ways for configuring file association.&lt;/P&gt;
&lt;P&gt;You can check the Microsoft-Windows-Shell-Core/AppDefaults event log for clues about file associations reset.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;If you want to troubleshoot this, &lt;A href="https://www.zazzle.com/appcompatguy" target="_blank" rel="noopener" data-linktype="external"&gt;keep calm and run Procmon&lt;/A&gt;&lt;BR /&gt;&lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You should be able to track which application is hijacking your file associations.&amp;nbsp;Once you identified the bad application, the best way to solve this, is to use a more recent version, or contact your vendor.&lt;/P&gt;
&lt;H2 id="why-im-getting-the-user-choice-notification-even-if-i-used-an-xml-file"&gt;Why I'm getting the User Choice notification even if I used an XML file?&lt;/H2&gt;
&lt;P&gt;You could get the following notification starting Windows 10 1703 when you choose an application as the default viewer instead using Microsoft Edge.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;These notification windows are displayed only once if you're clicking on OK. It's because Microsoft Edge is detected as a new application.&lt;/P&gt;
&lt;P&gt;If a new app is installed and is registered to an existing file extension or protocol you will get this notification.&lt;/P&gt;
&lt;P&gt;If you want to get rid of these notifications, there is a group policy to hide these notifications:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Do not show the 'new application installed' notification&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;This policy removes the end-user notification for new application associations. These associations are based on file types (e.g. *.txt) or protocols (e.g. http:) If this group policy is enabled, no notifications will be shown&lt;/P&gt;
&lt;H2 id="group-policy-settings-related-to-file-associations-settings"&gt;Group Policy Settings related to File Associations settings&lt;/H2&gt;
&lt;P&gt;You can find in the table below some group policies related to default file associations settings:&lt;/P&gt;
&lt;DIV class="table-scroll-wrapper"&gt;
&lt;TABLE class="table"&gt;&lt;CAPTION class="visually-hidden"&gt;Table 1&lt;/CAPTION&gt;
&lt;TBODY&gt;
&lt;TR class="odd"&gt;
&lt;TD&gt;&lt;STRONG&gt;Policy Setting Name&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD&gt;&lt;STRONG&gt;Policy Path&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR class="even"&gt;
&lt;TD&gt;Do not reinitialize a pre-existing roamed user profile when it is loaded on a machine for the first time&lt;/TD&gt;
&lt;TD&gt;Windows Components\File Explorer&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR class="odd"&gt;
&lt;TD&gt;Turn off Internet File Association service&lt;/TD&gt;
&lt;TD&gt;System\Internet Communication Management\Internet Communication settings&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR class="even"&gt;
&lt;TD&gt;Turn off access to the Store&lt;/TD&gt;
&lt;TD&gt;System\Internet Communication Management\Internet Communication settings&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR class="odd"&gt;
&lt;TD&gt;Do not show the 'new application installed' notification&lt;/TD&gt;
&lt;TD&gt;Windows Components\File Explorer&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR class="even"&gt;
&lt;TD&gt;Set a default associations configuration file&lt;/TD&gt;
&lt;TD&gt;Windows Components\File Explorer&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;H2 id="bonus-for-adobe-reader-xi-users"&gt;Bonus for Adobe Reader XI users&lt;/H2&gt;
&lt;P&gt;If you are still using Adobe Reader XI, you should get a new application to open PDF, as Adobe Reader XI &lt;A href="https://helpx.adobe.com/support/programs/adobe-support-policies-supported-product-versions.html" target="_blank" rel="noopener" data-linktype="external"&gt;is out of support&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;With Adobe XI installer, you can get an app reset notification for PDF extensions and it will be reset to Microsoft Edge.&lt;/P&gt;
&lt;P&gt;You should look at Adobe Reader documentation and launch the Adobe Reader 11 installation with the following command line:&lt;/P&gt;
&lt;P&gt;AdbeRdr11010_en_US.exe /rs /sAll /msi EULA_ACCEPT=YES OWNERSHIP_STATE=0&lt;/P&gt;
&lt;P&gt;With OWNERSHIP_STATE=0 Adobe Reader stops to change file association for PDF with an unsupported way.&lt;/P&gt;
&lt;H4 id="resources"&gt;Resources:&lt;/H4&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="http://www.adobe.com/devnet-docs/acrobatetk/tools/AdminGuide/pdfviewer.html" target="_blank" rel="noopener" data-linktype="external"&gt;http://www.adobe.com/devnet-docs/acrobatetk/tools/AdminGuide/pdfviewer.html&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://www.adobe.com/devnet-docs/acrobatetk/tools/AdminGuide/properties.html" target="_blank" rel="noopener" data-linktype="external"&gt;https://www.adobe.com/devnet-docs/acrobatetk/tools/AdminGuide/properties.html#props&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Wed, 15 Feb 2023 19:03:02 GMT</pubDate>
      <guid>https://techcommunity.microsoft.com/t5/ask-the-performance-team/how-to-configure-file-associations-for-it-pros/ba-p/1313151</guid>
      <dc:creator>CraigMarcho</dc:creator>
      <dc:date>2023-02-15T19:03:02Z</dc:date>
    </item>
    <item>
      <title>Recent Resolved issue with Windows 10: Search from start show blank and no results</title>
      <link>https://techcommunity.microsoft.com/t5/ask-the-performance-team/recent-resolved-issue-with-windows-10-search-from-start-show/ba-p/1164667</link>
      <description>&lt;DIV&gt;&lt;FONT style="background-color: #ffffff;"&gt;Hello AskPerf! My name is Susan from the Microsoft Performance team. We have some important information we wanted to share about a recent issue that has been resolved.&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;We were made aware recently of a temporary server-side issue causing Windows search to show a blank box. This issue has been resolved for most users and in some cases, you might need to restart your device. We are working diligently to fully resolve the issue and will provide an update once resolved. &lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT style="background-color: #ffffff;"&gt;&lt;A href="https://docs.microsoft.com/en-us/windows/release-information/windows-message-center#387" target="_blank" rel="noopener"&gt;https://docs.microsoft.com/en-us/windows/release-information/windows-message-center#387&lt;/A&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Mon, 10 Feb 2020 20:43:00 GMT</pubDate>
      <guid>https://techcommunity.microsoft.com/t5/ask-the-performance-team/recent-resolved-issue-with-windows-10-search-from-start-show/ba-p/1164667</guid>
      <dc:creator>CraigMarcho</dc:creator>
      <dc:date>2020-02-10T20:43:00Z</dc:date>
    </item>
    <item>
      <title>Help! My Powershell script isn't working! Can you fix it?</title>
      <link>https://techcommunity.microsoft.com/t5/ask-the-performance-team/help-my-powershell-script-isn-t-working-can-you-fix-it/ba-p/755797</link>
      <description>&lt;P&gt;Hello AskPerf blog, Travis Gradert here from Microsoft Customer Services and Support. I handle quite a number of Powershell cases for our support team, and have noticed that we get a lot of cases where customers are asking for help with things that we do not support. I wanted to write here to help explain what we do and do not handle in our support team when it comes to Powershell. The easy part of this is that we do not support custom or 3&lt;SUP&gt;rd&lt;/SUP&gt; party scripts. There is no support for the creation of a script. CSS representatives may put in a best effort to you as the customer, however engineers may not have the expertise required.&lt;/P&gt;
&lt;P&gt;Instead of engaging a Customer Services and Support team, if you are a premier customer and have a Technical Account Manager, they should be contacted to engage Microsoft Consulting Services for the creation or debugging of a custom or 3&lt;SUP&gt;rd&lt;/SUP&gt; party script.&lt;/P&gt;
&lt;P&gt;[note scripts found in the Powershell Gallery are not supported scripts. Issues with scripts need to be addressed with the author, found on the page where the script was downloaded.]&lt;/P&gt;
&lt;P&gt;So what is and is not supported? If a specific cmdlet, or the Powershell engine itself seems to be having an unexpected failiure, Customer Support and Services will be able to assist and work towards resolution of the failure. Below are some examples of supported requests.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;A specific Powershell cmdlet with appropriate parameters returns:
&lt;OL&gt;
&lt;LI&gt;No result&lt;/LI&gt;
&lt;LI&gt;An unexpected result (missing or extraneous data)&lt;/LI&gt;
&lt;LI&gt;An error&lt;/LI&gt;
&lt;/OL&gt;
&lt;/LI&gt;
&lt;LI&gt;The engine/console fails to load or crashes&lt;/LI&gt;
&lt;LI&gt;Configuration and Customization of the console&lt;/LI&gt;
&lt;LI&gt;Remote Connectivity and Authentication&lt;/LI&gt;
&lt;LI&gt;Microsoft-Provided DSC Resources fail unexpectedly&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Examples of Unsupported requests&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Create script to perform “X” action.&lt;/LI&gt;
&lt;LI&gt;Review “X” script to determine a cause of a failure. No script debugging has been performed, issue hasn’t been isolated to a specific commandlet.&lt;/LI&gt;
&lt;LI&gt;Create DSC configuration&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I’d like to provide some links that I think are helpful when looking for assistance with Powershell Scripts:&lt;/P&gt;
&lt;H2&gt;Script Debugging Resources&lt;BR /&gt;&lt;BR /&gt;&lt;/H2&gt;
&lt;P&gt;&lt;STRONG&gt;Using ISE to debug scripts&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/powershell/scripting/components/ise/how-to-debug-scripts-in-windows-powershell-ise?view=powershell-6" target="_blank"&gt;https://docs.microsoft.com/en-us/powershell/scripting/components/ise/how-to-debug-scripts-in-windows-powershell-ise?view=powershell-6&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Remote Runspace Debugging&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://devblogs.microsoft.com/powershell/powershell-runspace-debugging-part-1/" target="_blank"&gt;https://devblogs.microsoft.com/powershell/powershell-runspace-debugging-part-1/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Transcription and Logging:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.technet.microsoft.com/ashleymcglone/2017/03/29/practical-powershell-security-enable-auditing-and-logging-with-dsc/" target="_blank"&gt;https://blogs.technet.microsoft.com/ashleymcglone/2017/03/29/practical-powershell-security-enable-auditing-and-logging-with-dsc/&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.host/start-transcript?view=powershell-6" target="_blank"&gt;https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.host/start-transcript?view=powershell-6&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Measuring Command Performance:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/measure-command?view=powershell-6" target="_blank"&gt;https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/measure-command?view=powershell-6&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jul 2019 22:21:35 GMT</pubDate>
      <guid>https://techcommunity.microsoft.com/t5/ask-the-performance-team/help-my-powershell-script-isn-t-working-can-you-fix-it/ba-p/755797</guid>
      <dc:creator>CraigMarcho</dc:creator>
      <dc:date>2019-07-15T22:21:35Z</dc:date>
    </item>
    <item>
      <title>Introducing Windows Terminal!</title>
      <link>https://techcommunity.microsoft.com/t5/ask-the-performance-team/introducing-windows-terminal/ba-p/544421</link>
      <description>&lt;P&gt;Hey AskPerf community, Craig Marcho here with some cool news....&lt;BR /&gt;&lt;BR /&gt;Kayla Cinnamon, Program Manager for Windows Console, Command Line and WSL, recently announced Windows Terminal, which will be available this Summer from the Microsoft Store.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What's that? You can't wait until Summer? No problem! You can&amp;nbsp;&lt;FONT style="background-color: #ffffff;"&gt;clone, build, run, and test the code from the repository on GitHub: &lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://github.com/Microsoft/Terminal" target="_self"&gt;https://github.com/Microsoft/Terminal&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;You can read more about this exciting announcement here:&lt;BR /&gt;&lt;BR /&gt;&lt;A title="Introducing Windows Terminal" href="https://devblogs.microsoft.com/commandline/introducing-windows-terminal/" target="_self"&gt;Introducing Windows Terminal&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for visiting, and we'll see you again soon.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2019 00:04:37 GMT</pubDate>
      <guid>https://techcommunity.microsoft.com/t5/ask-the-performance-team/introducing-windows-terminal/ba-p/544421</guid>
      <dc:creator>CraigMarcho</dc:creator>
      <dc:date>2019-05-08T00:04:37Z</dc:date>
    </item>
    <item>
      <title>Install PowerShell on macOS and Linux</title>
      <link>https://techcommunity.microsoft.com/t5/ask-the-performance-team/install-powershell-on-macos-and-linux/ba-p/472191</link>
      <description>&lt;P style="margin: 0in; margin-bottom: .0001pt;"&gt;Did you know you can run PowerShell on macOS and Linux based operating systems?&lt;/P&gt;
&lt;P style="margin: 0in; margin-bottom: .0001pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; margin-bottom: .0001pt;"&gt;Just wanted to pass this on in case you did not know...&lt;/P&gt;
&lt;P style="margin: 0in; margin-bottom: .0001pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; margin-bottom: .0001pt;"&gt;For the macOS…&lt;/P&gt;
&lt;P style="margin: 0in; margin-bottom: .0001pt;"&gt;&lt;A href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fpowershell%2Fscripting%2Finstall%2Finstalling-powershell-core-on-macos%3Fview%3Dpowershell-6&amp;amp;data=02%7C01%7CCraig.Marcho%40microsoft.com%7C4352f5464f164891097208d6c402f909%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636911914560974256&amp;amp;sdata=DQgw2Q0RQc2haH0tBvE0%2FUU%2Ff2YHpWgjRUwLuIoLTvw%3D&amp;amp;reserved=0" target="_blank"&gt;https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-macos?view=powershell-6&lt;/A&gt;&lt;/P&gt;
&lt;P style="margin: 0in; margin-bottom: .0001pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; margin-bottom: .0001pt;"&gt;for Linux…&lt;/P&gt;
&lt;P style="margin: 0in; margin-bottom: .0001pt;"&gt;&lt;A href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fpowershell%2Fscripting%2Finstall%2Finstalling-powershell-core-on-linux%3Fview%3Dpowershell-6&amp;amp;data=02%7C01%7CCraig.Marcho%40microsoft.com%7C4352f5464f164891097208d6c402f909%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636911914560974256&amp;amp;sdata=CrCeh95Jz3mbxDNA7J7g%2BRmWt3e3WKyv37E%2Fuek5AjE%3D&amp;amp;reserved=0" target="_blank"&gt;https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-linux?view=powershell-6&lt;/A&gt;&lt;/P&gt;
&lt;P style="margin: 0in; margin-bottom: .0001pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; margin-bottom: .0001pt;"&gt;Now you know!&lt;/P&gt;</description>
      <pubDate>Thu, 18 Apr 2019 15:53:03 GMT</pubDate>
      <guid>https://techcommunity.microsoft.com/t5/ask-the-performance-team/install-powershell-on-macos-and-linux/ba-p/472191</guid>
      <dc:creator>CraigMarcho</dc:creator>
      <dc:date>2019-04-18T15:53:03Z</dc:date>
    </item>
    <item>
      <title>Is your Windows 2012 R2 server crashing after March 12, 2019 updates with bugcheck 0xd1 or 0xfc?</title>
      <link>https://techcommunity.microsoft.com/t5/ask-the-performance-team/is-your-windows-2012-r2-server-crashing-after-march-12-2019/ba-p/398549</link>
      <description>&lt;P style="margin: 0in; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 12.0pt; font-family: &amp;amp;quot; color: #333333;"&gt;Hello AskPerf! My name is Susan from the Microsoft Performance team. We have some important information we wanted to share right away.&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0in; margin-bottom: .0001pt; box-sizing: border-box;"&gt;&lt;SPAN style="font-size: 12.0pt; font-family: &amp;amp;quot; color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="box-sizing: border-box; margin: 0in 0in 12.0pt 0in;"&gt;&lt;SPAN style="font-size: 12.0pt; font-family: &amp;amp;quot; color: #333333;"&gt;After installing the March 12, 2019 updates (KB4489881 and KB4489883) on Windows 2012 R2 machines, devices with a winsock kernel client may experience 0xc2, &amp;nbsp;D1, FC and possibly other bugchecks. (including event 41) &lt;BR /&gt;&lt;BR /&gt;Systems that run the Skype for Business or Lync Server Edge Transport role may be impacted by this issue.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0in; margin-bottom: .0001pt; box-sizing: border-box;"&gt;&lt;SPAN style="font-size: 12.0pt; font-family: &amp;amp;quot; color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; font-family: &amp;amp;quot; color: #333333;"&gt;At this time, we recommend you apply one of the following patches and reboot.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; font-family: &amp;amp;quot; color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; font-family: &amp;amp;quot; color: #333333;"&gt;1.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Windows 8.1 and Windows Server 2012 R2 Security Only: &lt;A href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsupport.microsoft.com%2Fhelp%2F4493467&amp;amp;data=02%7C01%7CCraig.Marcho%40microsoft.com%7C31d9d9abbaca4f38288308d6c201a4a1%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636909709642619931&amp;amp;sdata=CIDz74AOsUzNyYrYCh5KtCUq3gzImrXvew8nhARjJkA%3D&amp;amp;reserved=0" target="_blank"&gt;4493467&lt;/A&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;&amp;lt;&amp;lt; includes security fixes only&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; font-family: &amp;amp;quot; color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; font-family: &amp;amp;quot; color: #333333;"&gt;2.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Windows 8.1, Windows Server 2012 R2, and Windows RT 8.1 Monthly Rollup: &lt;A href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsupport.microsoft.com%2Fhelp%2F4493446&amp;amp;data=02%7C01%7CCraig.Marcho%40microsoft.com%7C31d9d9abbaca4f38288308d6c201a4a1%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636909709642629890&amp;amp;sdata=h1n9sU%2FEfLLg1XMUDwXgY1SeQAvPRc%2B6Qq%2FKLhRiUU4%3D&amp;amp;reserved=0" target="_blank"&gt;4493446&lt;/A&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&amp;lt;&amp;lt; includes additional fixes both non security fixes, and older security fixes.&lt;/STRONG&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0in; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 12.0pt; font-family: &amp;amp;quot; color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0in; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 12.0pt; font-family: &amp;amp;quot; color: #333333;"&gt;&lt;BR /&gt;&lt;SPAN style="background: white;"&gt;If you are experiencing this issue, and applying either &lt;/SPAN&gt;&lt;A href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsupport.microsoft.com%2Fhelp%2F4493467&amp;amp;data=02%7C01%7CCraig.Marcho%40microsoft.com%7C31d9d9abbaca4f38288308d6c201a4a1%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636909709642629890&amp;amp;sdata=rYlCP1SrkD5GL2960VI6Ii68PfFmJdkbCMMOiH8qL8g%3D&amp;amp;reserved=0" target="_blank"&gt;4493467&lt;/A&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;or&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;A href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsupport.microsoft.com%2Fhelp%2F4493446&amp;amp;data=02%7C01%7CCraig.Marcho%40microsoft.com%7C31d9d9abbaca4f38288308d6c201a4a1%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636909709642639847&amp;amp;sdata=eGUkBnnteEt394LRcx2r3blF5YtNFLNN%2BDLt80Grrco%3D&amp;amp;reserved=0" target="_blank"&gt;4493446&lt;/A&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="background: white;"&gt;does not resolve the issue, please call Microsoft and open a support incident.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Apr 2019 00:28:29 GMT</pubDate>
      <guid>https://techcommunity.microsoft.com/t5/ask-the-performance-team/is-your-windows-2012-r2-server-crashing-after-march-12-2019/ba-p/398549</guid>
      <dc:creator>CraigMarcho</dc:creator>
      <dc:date>2019-04-16T00:28:29Z</dc:date>
    </item>
    <item>
      <title>Powershell Core SSH Remoting</title>
      <link>https://techcommunity.microsoft.com/t5/ask-the-performance-team/powershell-core-ssh-remoting/ba-p/394234</link>
      <description>&lt;P&gt;Hi Everyone, my name is Travis, and I am with the User Experience team here at Microsoft.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Today I’ll be discussing implementing SSH remoting as a Transport for Powershell.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;While WinRM is a great transport for Active Directory domains, or domains with a two way forest trust – where WinRM is lacking is in scenarios where there either is no trust between domains, or no domain membership at all. Where there is no domain membership, certificate authentication is your only real choice when it comes to secure Remoting via WinRM.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;SSH as a transport changes that because public/private key pairs are used to secure the connection, allowing for encrypted transport of the data sent between the machines – even when an active directory solution has not been implemented. This also means that if you prefer to admin from a *nix installation, you now have a viable transport to manage windows machines from a native *nix remoting implementation.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Newer OS’s include the OpenSSH client natively as a windows capability inbox. The client is enabled by default, however the server is not. To validate the OpenSSH install state, run the following.&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff"&gt;Get-WindowsCapability&lt;/FONT&gt; &lt;FONT color="#000080"&gt;-Online -Name&lt;/FONT&gt; &lt;FONT color="#800080"&gt;*SSH*&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Add the features by piplining get-windowscapability to add-windowscapability. No restart is needed to complete the installation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;On server 2019, be sure to run the latest Cumulative Update, as the error shown below will be thrown due to a known issue that is already resolved in December release patches.&lt;BR /&gt;&lt;BR /&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#0000ff"&gt;Get-WindowsCapability&lt;/FONT&gt; &lt;FONT color="#000080"&gt;-Online -Name&lt;/FONT&gt; &lt;FONT color="#800080"&gt;*SSH*&lt;/FONT&gt; |&lt;FONT color="#0000ff"&gt; Add-WindowsCapability&lt;/FONT&gt; &lt;FONT color="#000080"&gt;-Online&lt;/FONT&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;As far as initial configuration is concerned, the service (sshd) must be started, and should be set to automatic as it is not by default. In addition, the firewall rules for SSH must be enabled. This is a TCP connection on port 22.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Start the Service with the below command.&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff"&gt;Start-Service&lt;/FONT&gt; &lt;FONT color="#800080"&gt;sshd &lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Set the service to automatic startup.&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff"&gt;Set-Service&lt;/FONT&gt; &lt;FONT color="#000080"&gt;-Name&lt;/FONT&gt; &lt;FONT color="#800080"&gt;sshd &lt;/FONT&gt;&lt;FONT color="#000080"&gt;-StartupType&lt;/FONT&gt; &lt;FONT color="#800000"&gt;'Automatic'&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Confirm if the firewall rule is enabled.&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff"&gt;Get-NetFirewallRule&lt;/FONT&gt; &lt;FONT color="#000080"&gt;-Name&lt;/FONT&gt; &lt;FONT color="#800080"&gt;*ssh*&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Set the firewall rule to allow incoming connections if not allowed&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff"&gt;Get-NetFirewallRule&lt;/FONT&gt; &lt;FONT color="#000080"&gt;-Name&lt;/FONT&gt; &lt;FONT color="#800080"&gt;*ssh*&lt;/FONT&gt; | &lt;FONT color="#0000ff"&gt;Set-NetFirewallRule&lt;/FONT&gt; &lt;FONT color="#000080"&gt;-Enabled&lt;/FONT&gt; &lt;FONT color="#800080"&gt;True &lt;/FONT&gt;&lt;FONT color="#000080"&gt;-Direction&lt;/FONT&gt; &lt;FONT color="#800080"&gt;Inbound &lt;/FONT&gt;&lt;FONT color="#000080"&gt;-Action&lt;/FONT&gt; &lt;FONT color="#800080"&gt;Allow&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Testing SSH:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Simply use SSH.exe and specify a remote machine name to use implicit credentials against the remote machine to authenticate.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;BR /&gt;&lt;BR /&gt;Once the session has been formed, you should simply see a prompt similar to the following:&lt;BR /&gt;&lt;BR /&gt;&lt;img /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Simply run the hostname.exe executable to confirm you’re working with the remote machine.&lt;BR /&gt;&lt;BR /&gt;&lt;img /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Remoting with Powershell Core&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Download and install the latest version of Powershell Core, available on Github. &lt;A href="https://github.com/powershell/powershell" target="_blank" rel="noopener"&gt;https://github.com/powershell/powershell&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;For the purposes of this Demo, I’m installing the x64 MSI package on both my Windows 10 1809 client, as well as Server 2019 to the default location.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Powershell Core must be configured as a subsystem in $env:ProgramData\ssh\sshd_config. As a note, there is currently a bug in OpenSSH where paths with spaces fail to be recognized as a subsystem. As a work around you can use a symlink to correct the error and point the sshd_config to the symlink location.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;For the stable release, use: mklink /D c:\pwsh "C:\Program Files\PowerShell\6"&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;For the preview release, use: mklink /D c:\pwsh "C:\Program Files\PowerShell\6-preview"&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Note that we’re pointing to the symlinked path in the subsystem config below.&lt;BR /&gt;&lt;BR /&gt;&lt;img /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;After the service configuration is changed, restart the service.&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff"&gt;Restart-Service&lt;/FONT&gt; &lt;FONT color="#800080"&gt;sshd&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Powershell Core adds a few new parameters to the Enter-PSsession commandlet, -Hostname, -SSHTransport, -Keyfile, and -Subsystem. Note that you cannot use -computername in combination with -SSHTransport.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;An example of Remoting is shown below.&lt;BR /&gt;&lt;BR /&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And that's it for today! Thanks for reading, and let us know if you have any comments or questions below!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2019 21:47:40 GMT</pubDate>
      <guid>https://techcommunity.microsoft.com/t5/ask-the-performance-team/powershell-core-ssh-remoting/ba-p/394234</guid>
      <dc:creator>CraigMarcho</dc:creator>
      <dc:date>2019-04-03T21:47:40Z</dc:date>
    </item>
    <item>
      <title>Welcome Back AskPerf!</title>
      <link>https://techcommunity.microsoft.com/t5/ask-the-performance-team/welcome-back-askperf/ba-p/386881</link>
      <description>&lt;P&gt;Hello Everyone! Welcome to the new home of the AskPerf blog. We have recently moved, and many things have changed in the years since the last post here. The owners of the blog have moved on to bigger and better things, so I have decided to bring it back to life, and bring some new fresh content to help the community. The Performance team has actually been split to two teams internally at Microsoft, one is still called "Performance" and the other is called "User Experience", or UEX. Between the two teams, we will still provide information on all of the topics that we cover, here under one roof. So welcome back, and we will be providing some information here soon.&lt;BR /&gt;&lt;BR /&gt;-Craig Marcho&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2019 17:22:00 GMT</pubDate>
      <guid>https://techcommunity.microsoft.com/t5/ask-the-performance-team/welcome-back-askperf/ba-p/386881</guid>
      <dc:creator>CraigMarcho</dc:creator>
      <dc:date>2019-03-25T17:22:00Z</dc:date>
    </item>
    <item>
      <title>WOW...are folks still reading this blog???</title>
      <link>https://techcommunity.microsoft.com/t5/ask-the-performance-team/wow-are-folks-still-reading-this-blog/ba-p/375660</link>
      <description>&lt;HTML&gt;
 &lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;
  &lt;STRONG&gt;
   First published on TECHNET on Mar 05, 2018
  &lt;/STRONG&gt;
  &lt;BR /&gt;
  We haven't posted any blogs for ~2 years, yet it seems that people are still reading/commenting on previous posts.&amp;nbsp; For me, I've moved on to the Security Team here at Microsoft, and there really is no more Performance team.&amp;nbsp; They've been broken up into smaller support teams that support certain topics.&amp;nbsp; From a Security standpoint, I might be able to provide a few posts from time to time regarding the topic if your interested.&amp;nbsp; Thoughts?&amp;nbsp; -Blake
 
&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Mar 2019 12:51:15 GMT</pubDate>
      <guid>https://techcommunity.microsoft.com/t5/ask-the-performance-team/wow-are-folks-still-reading-this-blog/ba-p/375660</guid>
      <dc:creator>CraigMarcho</dc:creator>
      <dc:date>2019-03-16T12:51:15Z</dc:date>
    </item>
    <item>
      <title>AskPerf Blog transition…</title>
      <link>https://techcommunity.microsoft.com/t5/ask-the-performance-team/askperf-blog-transition-8230/ba-p/375659</link>
      <description>&lt;HTML&gt;
 &lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;
  &lt;STRONG&gt;
   First published on TECHNET on Mar 28, 2016
  &lt;/STRONG&gt;
  &lt;BR /&gt;
  Hello AskPerf!
  &lt;BR /&gt;
  &lt;BR /&gt;
  Wanted to send you a very long overdue note on the current status of the AskPerf Blog site. We are in a transition period on ownership of this blog site going forward. I personally have moved on to another team, and the remaining Performance folks have as well. With that said, a decision will be made hopefully soon, on the future of this blog.
  &lt;BR /&gt;
  &lt;BR /&gt;
  Thank you as always for your support and active participation in our posts.
  &lt;BR /&gt;
  &lt;BR /&gt;
  -Blake
 
&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Mar 2019 12:51:11 GMT</pubDate>
      <guid>https://techcommunity.microsoft.com/t5/ask-the-performance-team/askperf-blog-transition-8230/ba-p/375659</guid>
      <dc:creator>CraigMarcho</dc:creator>
      <dc:date>2019-03-16T12:51:11Z</dc:date>
    </item>
  </channel>
</rss>

