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 a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I have worked at <a href="https://www.cotocus.com/">Cotocus</a>. I share tech blog at <a href="https://www.devopsschool.com/">DevOps School</a>, travel stories at <a href="https://www.holidaylandmark.com/">Holiday Landmark</a>, stock market tips at <a href="https://www.stocksmantra.in/">Stocks Mantra</a>, health and fitness guidance at <a href="https://www.mymedicplus.com/">My Medic Plus</a>, product reviews at <a href="https://www.truereviewnow.com/">TrueReviewNow</a> , and SEO strategies at <a href="https://www.wizbrand.com/">Wizbrand.</a> Do you want to learn <a href="https://www.quantumuting.com/">Quantum Computing</a>? <strong>Please find my social handles as below;</strong> <a href="https://www.rajeshkumar.xyz/">Rajesh Kumar Personal Website</a> <a href="https://www.youtube.com/TheDevOpsSchool">Rajesh Kumar at YOUTUBE</a> <a href="https://www.instagram.com/rajeshkumarin">Rajesh Kumar at INSTAGRAM</a> <a href="https://x.com/RajeshKumarIn">Rajesh Kumar at X</a> <a href="https://www.facebook.com/RajeshKumarLog">Rajesh Kumar at FACEBOOK</a> <a href="https://www.linkedin.com/in/rajeshkumarin/">Rajesh Kumar at LINKEDIN</a> <a href="https://www.wizbrand.com/rajeshkumar">Rajesh Kumar at WIZBRAND</a> <a href="https://www.rajeshkumar.xyz/dailylogs">Rajesh Kumar DailyLogs</a>

Related Posts

Top 10 AI Algorithmic Trading Assistants: Features, Pros, Cons & Comparison

AI Algorithmic Trading Assistants help traders, quants, brokers, fintech teams, hedge funds, portfolio managers, and active investors design, test, monitor, and improve trading strategies using automation, data…

Read More

Top 10 AI Portfolio Optimization Tools: Features, Pros, Cons & Comparison

AI Portfolio Optimization Tools help investment teams, wealth managers, asset managers, hedge funds, family offices, robo-advisors, fintech platforms, and financial analysts build smarter portfolios using artificial intelligence,…

Read More

Top 10 AI Trade Surveillance Platforms: Features, Pros, Cons & Comparison

AI Trade Surveillance Platforms help financial institutions, broker-dealers, exchanges, asset managers, hedge funds, wealth firms, crypto trading platforms, and compliance teams detect suspicious trading behavior. These platforms…

Read More

Top 10 AI Sanctions Screening Systems: Features, Pros, Cons & Comparison

AI Sanctions Screening Systems help banks, fintech companies, payment providers, crypto platforms, insurers, trade finance teams, remittance firms, marketplaces, and regulated businesses screen customers, counterparties, transactions, vessels,…

Read More

Top 10 AI AML Transaction Monitoring Tools: Features, Pros, Cons & Comparison

AI AML Transaction Monitoring tools help banks, fintech companies, payment providers, crypto platforms, remittance firms, insurance companies, and regulated financial institutions detect suspicious financial activity. These platforms…

Read More

Top 10 AI Collections Optimization Tools: Features, Pros, Cons & Comparison

AI Collections Optimization Tools help lenders, banks, fintech companies, NBFCs, telecom providers, utility companies, subscription businesses, and accounts receivable teams improve how they recover overdue payments. These…

Read More
Subscribe
Notify of
guest
2 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
Skylar Bennett
Skylar Bennett
6 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
6 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