Find the Best Cosmetic Hospitals

Explore trusted cosmetic hospitals and make a confident choice for your transformation.

โ€œInvest in yourself โ€” your confidence is always worth it.โ€

Explore Cosmetic Hospitals

Start your journey today โ€” compare options in one place.

RESOURCE MONITOR (resmon.exe): Lab & Demo



๐ŸŽฏ Lab Objective

By the end of this lab, you will be able to:

โœ” Launch and use Resource Monitor
โœ” Analyze CPU, Memory, Disk, and Network usage for a .NET application
โœ” Identify performance bottlenecks
โœ” Detect high CPU, memory leaks, disk thrashing, and network issues
โœ” Use Resource Monitor to troubleshoot real-time .NET app problems

This lab is hands-on, and every step includes expected results + observations.


————————————

๐Ÿงช LAB 0 โ€” Prerequisites

————————————

Before starting:

โœ” Windows 10/11 or Windows Server

โœ” .NET 6 or .NET 7 runtime installed

โœ” A sample .NET app (API, console, or background worker)

If you donโ€™t have one, you can create a quick sample API:

dotnet new webapi -n DemoApi
cd DemoApi
dotnet run
Code language: JavaScript (javascript)

This will run on:
http://localhost:5000 or http://localhost:5241 (depending on your version)


————————————

๐Ÿงช LAB 1 โ€” Launch Resource Monitor

————————————

Step 1: Open ResMon

Press:

Win + R โ†’ resmon

OR

Ctrl + Shift + Esc โ†’ Task Manager โ†’ Performance โ†’ Open Resource Monitor

Expected Output

You see an interface with tabs:

  • Overview
  • CPU
  • Memory
  • Disk
  • Network

————————————

๐Ÿงช LAB 2 โ€” Monitor CPU Usage of .NET App

————————————

Step 1: Run your .NET application

Example:

dotnet run

Step 2: Open Resource Monitor โ†’ CPU Tab

Step 3: Filter by the .NET process

Look for:

  • dotnet.exe
  • w3wp.exe (if IIS hosted)
  • yourapp.exe (self-contained builds)

Check these fields:

  • Image
  • PID
  • Threads
  • CPU %
  • Average CPU

Step 4: Simulate load

Use a separate terminal:

for /l %i in (1,1,1000) do curl http://localhost:5000/weatherforecast
Code language: JavaScript (javascript)

Or use Postman runner.

Observe:

  • CPU usage rises
  • Thread count increases
  • Your .NET process moves to the top of the CPU list

Step 5: Analyze Wait Chain for Deadlocks

Right-click your .NET process โ†’
Analyze Wait Chain

Expected Result

  • No wait chain = no deadlock
  • If threads wait for each other โ†’ potential deadlock

————————————

๐Ÿงช LAB 3 โ€” Memory Analysis for .NET App

————————————

Step 1: Open Memory tab

Filter your .NET process.

Look at:

  • Commit (KB)
  • Working Set (KB)
  • Private (KB)
  • Shareable
  • Hard Faults/sec

Step 2: Trigger .NET memory usage

Modify API or run a loop:

var data = new List<byte[]>();
for(int i=0; i<50000; i++)
{
    data.Add(new byte[1024 * 50]); // 50 KB
}
Code language: PHP (php)

Run load test again.

Expected Observations

  • Working Set increases
  • Commit size increases
  • Hard Faults/sec spikes if system memory is low

Step 3: Identify memory leak behavior

If Working Set grows continuously without dropping โ†’ possible memory leak.


————————————

๐Ÿงช LAB 4 โ€” Disk I/O Analysis for .NET

————————————

This is crucial for:

  • Logging-heavy applications
  • APIs that write large files
  • Upload/download endpoints
  • Apps with heavy DB operations

Step 1: Open Disk tab

Filter by your dotnet.exe process.

Observe:

  • Read (B/sec)
  • Write (B/sec)
  • Total (B/sec)
  • Disk Queue Length
  • Response Time
  • File path being accessed

Step 2: Simulate Disk Load

Create a .NET endpoint that writes files:

[HttpGet("write")]
public IActionResult WriteDemo()
{
    System.IO.File.WriteAllText("test_" + Guid.NewGuid() + ".txt", new string('A', 1000000));
    return Ok();
}
Code language: PHP (php)

Call it multiple times:

for /l %i in (1,1,200) do curl http://localhost:5000/write
Code language: JavaScript (javascript)

Expected Observations

  • Disk write activity spikes
  • Resource Monitor shows file names like:
    C:\path\yourapp\test_*.txt
  • Disk Queue Length increases
  • Response Time shows milliseconds โ†’ indicates I/O latency

Interpretation

  • High queue length โ†’ Disk bottleneck
  • High response time โ†’ slow disk (SSD/HDD issue)
  • Heavy writes โ†’ Logging too much

————————————

๐Ÿงช LAB 5 โ€” Network Analysis for .NET

————————————

Step 1: Go to Network Tab

Filter by your .NET process.

Observe:

  • Send (B/sec)
  • Receive (B/sec)
  • Total bytes/sec
  • Remote Address
  • Port
  • TCP connections
  • Failures

Step 2: Simulate High Network Load

Run:

for /l %i in (1,1,300) do curl http://localhost:5000/weatherforecast
Code language: JavaScript (javascript)

Or:

Use Postman runner (10โ€“100 requests/sec).


Expected Observations

  • Network usage increases
  • You can see your API responding on port:
    • 5000
    • 5241
    • custom hosted port
  • TCP connections show:
    • Local Address
    • Remote Address
    • State (Established)

Advanced Scenario

If your .NET app calls external APIs, you can see:

  • Outgoing IP
  • Latency issues
  • Failed connections

————————————

๐Ÿงช LAB 6 โ€” Isolate and Focus on a Single Process

————————————

Resource Monitor allows FILTERING by process.

Step 1: Check the box next to dotnet.exe

Now the entire UI filters:

โœ” CPU โ†’ Only your threads
โœ” Disk โ†’ Only your files
โœ” Network โ†’ Only your connections
โœ” Memory โ†’ Only your segments

This is the most powerful feature in Resource Monitor.


————————————

๐Ÿงช LAB 7 โ€” Detect Thread Starvation / Deadlocks

————————————

Step 1: CPU Tab โ†’ Expand Threads

Look for:

  • A single thread using high CPU
  • Many threads blocked

Step 2: Right-click โ†’ Analyze Wait Chain

Expected

  • App may show:
    โ€œOne or more threads are waiting on each otherโ€ โ†’ Deadlock

This helps catch:

  • async/await deadlocks
  • database blocking
  • file I/O blocking
  • network blocking

————————————

๐Ÿงช LAB 8 โ€” Performance Optimization Decision Points

————————————

Using Resource Monitor, collect findings:

1. CPU Bottleneck โ†’ Optimize

  • Reduce JSON serialization
  • Optimize LINQ projections
  • Use async I/O
  • Reduce heavy loops
  • Add caching

2. Memory Bottleneck โ†’ Optimize

  • Fix memory leaks
  • Reduce LOH allocations
  • Use pooling
  • Dispose unmanaged resources

3. Disk Bottleneck โ†’ Optimize

  • Reduce logging
  • Use async disk I/O
  • Move logs to separate drive
  • Optimize temp-file usage

4. Network Bottleneck โ†’ Optimize

  • Add connection pooling
  • Reduce large payloads
  • Enable compression
  • Optimize external API calls

————————————

๐Ÿงช LAB 9 โ€” Final Validation

————————————

After optimization:

Re-run load

  • Use curl/Postman
  • Generate real load

Re-check Resource Monitor

  • CPU should stabilize
  • Disk writes reduced
  • Hard faults minimized
  • Network calls optimized
  • Memory usage flattened

————————————

LAB END: Summary

————————————

After completing this lab, you can:

โœ” Use Resource Monitor to analyze:

  • CPU
  • Memory
  • Disk
  • Network

โœ” Filter by .NET process
โœ” Identify bottlenecks
โœ” Detect deadlocks, file locks, port usage
โœ” Optimize .NET application performance using real-time signals

Resource Monitor is a real-time diagnostic powerhouse for Windows and crucial for effective .NET performance optimization.


Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services โ€” all in one place.

Explore Hospitals
I'm Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms. I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.

Related Posts

Complete Guide to AI Guest Posting with GuestPostAI

In the fast-evolving digital marketing landscape, search engine optimization (SEO) remains the ultimate catalyst for sustainable organic growth. Among the myriad of off-page SEO strategies, guest posting…

Read More

WizBrand Review: The Ultimate All-in-One Digital Marketing Platform for Growth

In the rapidly evolving digital ecosystem, running a successful online marketing strategy often feels like juggling spinning platesโ€”marketing teams routinely find themselves bouncing between disconnected platforms for…

Read More

Best Invoice and Payment Management Software for Growing Businesses

In the fast-paced modern economy, business growth relies heavily on healthy cash flow and efficient financial operations. Yet, countless organizations find themselves bogged down by administrative bottlenecks….

Read More

Mastering Generative AI Workflows: Why You Need the Ultimate AI Prompt Management Tool

Artificial intelligence has rapidly evolved from a futuristic novelty into the core operational engine of modern business, creative production, and software development. Whether you are using large…

Read More

Best KYC Software in 2026

You already know that KYC is a compliance requirement. What most comparisons skip is the part that actually matters once you are past procurement: how these platforms…

Read More

Free Content Publishing Platforms: The Ultimate FreePostFinder Directory

In today’s competitive digital landscape, distributing your content effectively is just as critical as creating it, yet rising ad costs and unpredictable social media algorithms make organic…

Read More
Subscribe
Notify of
guest
2 Comments
Newest
Oldest Most Voted
Skylar Bennett
Skylar Bennett
8 months ago

What a clear and actionable lab demo of Resource Monitor (resmon.exe)! I love how the article walks through not just how to launch the tool โ€” via Run, Task Manager, or Start menu โ€” but also dives into realโ€‘time use across CPU, Memory, Disk, and Network tabs. The explanation of how to pinpoint resource hogs (CPU spikes, disk I/O, memory faults, networkโ€‘heavy processes) is extremely useful for anyone troubleshooting sluggish systems or diagnosing performance bottlenecks. For admins and developers alike, this kind of handsโ€‘on walkthrough demystifies systemโ€‘level monitoring and makes it practical rather than abstract. ๐Ÿ‘

Jason Mitchell
Jason Mitchell
8 months ago

This blog on using Resource Monitor (resmon.exe) provides an excellent hands-on guide for monitoring system performance. It walks through the process of analyzing CPU, memory, disk, and network usage, offering a clear understanding of how to detect system bottlenecks. The tutorial highlights how to identify problematic processes, track system resource usage, and troubleshoot issues such as memory leaks or deadlocks, all through practical examples. For those looking to improve their troubleshooting skills and optimize system performance, this post is a valuable resource that combines detailed instructions with insightful tips. Itโ€™s an ideal reference for both beginners and experienced professionals aiming to deepen their understanding of system resource management.

2
0
Would love your thoughts, please comment.x
()
x