Memory Report from Performance Console

This section provides a tutorial example on how to use Performance console in Control Panel to verify memory usage numbers reported by the System.Diagnostics.Process class.

Another way to verify memory usage numbers reported by the System.Diagnostics.Process class is use the Performance console in Control Panel.

1. Run the tutorial example program used in the previous section, LongSleep.exe.

Current process: System.Diagnostics.Process (LongSleep)
Private Memory: 8740864
Virtual Memory: 89157632
Working Set: 5591040
Paged Memory: 8740864
Paged System Memory: 100228
Non-paged System Memory: 3988

2. Click "Start" > "Control Panel" > "Performance and Maintenance" > "Administrative Tools" > "Performance". The "Performance" console shows up.

3. Click the Add icon or press <Ctrl>-I, The "Add Counters" dialog box shows up.

4. Select "Process" in "Performance object:" field. Select "LongSleep" in "Select instances from list:". Check "All counters" checkbox. Click "Add" button and "Close" button.

5. Click the Report icon or press <Ctrl>-R.
Performance in Control Panel

Memory usage numbers reported for LongSleep are:

Process:           LongSleep
Page File Bytes:     8884224
Pool Nonpaged Bytes:    3860
Pool Paged Bytes:     100364
Private Bytes:       8884224
Virtual Bytes:      89227264
Working Set:         6045696

6. Compare the program output and the "Performance" console report, we can map "Performance" console values to System.Diagnostics.Process properties:

     Performance console     System.Diagnostics.Process

         Page File Bytes  =  ?
     Pool Nonpaged Bytes  =  Non-paged System Memory
        Pool Paged Bytes  =  Paged System Memory
           Private Bytes  =  Private Memory
           Virtual Bytes  =  Virtual Memory
             Working Set  =  Working Set

Table of Contents

 About This Book

 Introduction of C# (C Sharp)

 Data Type and Variables

 Logical Expressions and Conditional Statements

 Arrays and Loop Statements

 Data Type Features

 Floating-Point Data Types

 Passing Parameters to Methods

 Execution Environment Class

 Visual C# 2010 Express Edition

 Class Features

 C# Compiler and Intermediate Language

 Compiling C# Source Code Files

 MSBuild - Microsoft Build Engine

Memory Usages of Processes

 Using "Process" Class to Show Memory Usages

 Private/Virtual Memory and Working Set

 Footprints of Private and Shared Memories

 Virtual Memory Upper Limit

 Memory Report from Windows Task Manager

Memory Report from Performance Console

 Multithreading in C#

 Async Feature from C# 5

 System.IO.FileInfo Class

 System.Diagnostics.FileVersionInfo Class

 WPF - Windows Presentation Foundation

 Partial Classes and Partial Methods

 Archived Tutorials

 References

 Full Version in PDF/ePUB