programming4us
programming4us
DESKTOP

Windows Server 2012 : Comprehensive Performance Analysis and Logging (part 1) - Establishing performance baselines - Tracking per-process resource usage

2/3/2015 8:37:35 PM

Establishing performance baselines

Resource Monitor, Reliability Monitor, and Performance Monitor are the tools of choice for monitoring a system’s reliability and performance. One of the key reasons for tracking performance information is to establish a baseline for a computer that allows you to compare past performance with current performance. There are several types of baselines you can use, including the following:

  • Postinstallation baselines A postinstallation baseline is a performance level that is meant to represent the way a computer performs after installing all the roles, role services, features, and applications that will be used on the system.

  • Typical usage baselines A typical usage baseline is a performance level that is meant to represent average usage conditions and serve as a starting point against which you can measure future performance.

  • Test baselines A test baseline is a performance level that you use during testing of a system. In the test lab, you might want to simulate peak usage loads and test how the system performs under these conditions.

Although it is important to obtain postinstallation and typical usage baseline values, the more important of the two is the typical usage baseline. This is the baseline you get when you simulate user loads or when users actually start working with a server. Ideally, it represents typical or average loads. After you have a typical usage baseline, you can gather information in the future to try to determine how resource usage has changed and how the computer is performing comparatively.

To be able to establish a baseline, you must collect a representative set of performance statistics. By that, I mean collect the data that you actually need to determine resource usage and performance in future scenarios. If possible, you should also collect several data samples at the same time each day over a period of several days. This will give you a more meaningful data sample.

You must work to keep the baseline in sync with how the server is used. As you install new roles, role services, features, and applications, you must establish new baselines. This ensures that future comparisons with the baseline are accurate and that they use the most current system configuration to determine how resource usage has changed and how the computer is performing comparatively.

Tracking per-process resource usage

You can use Task Manager to determine the overall utilization of system resources. The Processes and Details tabs in Task Manager provide information about resources being used by running processes. What’s missing from Task Manager, however, is the ability to take a deep look at how processes are using resources, and this deep-look capability is exactly what Resource Monitor provides.

You can start Resource Monitor by selecting the related option on the Tools menu in Server Manager. Alternatively, type Resource Monitor in the Apps Search box and press Enter.

When you start Resource Monitor, shown in Figure 1, you’ll see that the statistics provided are organized into five general categories:

  • Overview

  • CPU

  • Memory

  • Disk

  • Network

Each of these categories can be used for comprehensive performance analysis, and in the sections that follow, I’ll show you how.

Using Resource Monitor to get detailed information about per-process resource utilization.
Figure 1. Using Resource Monitor to get detailed information about per-process resource utilization.

Getting an overview of resource utilization

The Overview tab in Resource Monitor, shown in Figure 2, provides a detailed overview of resource utilization. Top-level utilization statistics are tracked in the graphs and on the panel bars. As per the legend shown on the panel bars, the values are plotted in either green or blue on the corresponding graph. The statistics tracked include the following:

  • % CPU usage

  • CPU maximum frequency

  • Disk I/O bytes per second

  • Disk % highest active time

  • Network I/O bytes per second

  • % Network utilization

  • Memory hard faults per second

  • % Physical memory used

The Overview tab in Resource Monitor provides an overview of the resource usage.
Figure 2. The Overview tab in Resource Monitor provides an overview of the resource usage.

At first glance, the information provided seems similar to that available in Task Manager. What’s different, however, is that when you select one or more processes on the CPU panel, you see related utilization statistics for the processes on the Disk panel, Network panel, and Memory panel. You also see related activity plotted in orange on the CPU, Disk, Network, and Memory graphs.

Note

The CPU, Disk, Network, and Memory panels show a subset of the information available on the related tabs. Your process selections are applied globally so that you can determine exactly how the selected processes are using CPU, disk, network, and memory resources.

In the example, I selected three processes for tracking: sqlservr.exe, System, and sqlwriter.exe. I chose these processes because I already determined in Task Manager that these were some of the most active processes on the server and I wanted to determine how these processes were affecting the server. I quickly learned that these processes weren’t affecting the CPU nearly as much as I thought. Although the processor utilization on the server was performing well at about 70 percent, these processes seemed to be using few actual CPU resources. On the other hand, they were high consumers of disk and network resources (and, in fact, accounted for nearly all of the disk and network activity).

By examining the disk and network activity, I was able to identify exactly which activities were using these resources. Although some of the disk I/O activity was related to SQL Server, the bulk of the activity was related to large data transfers. One data transfer in particular involved a large data set that was being moved from another file server to the server I was analyzing. You can see this in the three entries under Disk and the first entry under Network. Under Disk, a large write is in progress for the C:\Shares folder. Under Network, a large data set is being received from another server.


Tracking per-process CPU utilization

The CPU tab in Resource Monitor shows the current CPU utilization and the maximum CPU frequency. If you expand the Processes panel (by tapping or clicking the options button), as shown in Figure 3, you’ll see a list of currently running executables. Each process is listed according to the following categories:

  • Average CPU The average percentage of CPU utilization for the process in the last minute

  • CPU The percentage of CPU utilization for the process (across all physical and logical processors)

  • Description The name of the process (and sometimes other information as well)

  • Image The name of the process or executable running the process

  • PID The numeric identifier for the process

  • Status The execution status of the process

  • Threads The number of threads that the process is using

The CPU tab in Resource Monitor provides detailed per-process information about CPU utilization.
Figure 3. The CPU tab in Resource Monitor provides detailed per-process information about CPU utilization.

If you press and hold or right-click any column header and then choose Select Columns, you’ll see a dialog box that allows you to add columns to the CPU panel. The additional columns that are available include the following:

  • Average Cycle The average percentage of CPU cycle time for the process (over a 60-second interval).

  • Cycle The current percentage of CPU cycle time being used by the process.

  • Elevated The elevation status of the process. An entry of Yes indicates an elevated process.

  • Operating System Context The operating system context in which the process is running, such as Windows Server 2012 or Windows Vista.

  • Platform The platform on which the process is running, either 32-bit or 64-bit.

  • User Name The name of the user or service that is running the process.

Select one or more processes on the Processes panel to get more detailed information about how those processes are using CPU resources. As you select processes for tracking, keep in mind your selections are global. The same selections will appear in the other tabs in Resource Monitor.

When you select one or more processes for tracking, you’ll see additional details on these panels:

  • Services Shows the name of the service running a process or processes, along with process identifiers, the status, descriptions of the services, percentage of CPU utilization, and the average percentage of CPU utilization.

  • Associated Handles Shows the names of the handles associated with the selected processes, listed by the executable name of the process, the process identifier, the handle type, and the handle file path.

  • Associated Modules Shows the names of modules loaded by the selected processes, listed by the executable name of the process, the process identifier, the module name, the module version, and the module file path.

Use this information to help you identify which services are running processes, as well as which handles and modules a process is using. No additional details can be added to the Services, Associated Handles, or Associated Modules panels.

TROUBLESHOOTING: Resolve the CPU performance issue

For troubleshooting performance issues related to a server’s processors, you might want to evaluate whether it makes sense to move applications and services from an overutilized server to another, less-utilized server. You also might want to evaluate whether additional processing power is needed to ensure adequate performance. Faster or additional processors might resolve a performance issue related to high CPU utilization.

Tracking per-process memory utilization

The Memory tab in Resource Monitor shows how processes are using memory, focused primarily on physical memory. As shown in Figure 4, the percent utilization of physical memory, the current commit charge, and the hard memory faults are graphed over time. On the Processes panel, individual processes are listed by the following categories:

  • Image The name of the process or executable running the process.

  • PID The numeric identifier for the process.

  • Hard Faults/Sec The average number of hard memory faults per second in the last minute.

  • Commit The commit charge for the process, measured in kilobytes (KB). The commit charge represents the amount of virtual memory reserved by the operating system for the process.

  • Working Set The amount of physical memory the process is currently using.

  • Shareable The nonprivate working set for the process, representing the amount of physical memory in use by the process that can be shared with other processes.

  • Private The private working set for the process, representing the amount of physical memory in use by the process that cannot be shared with other processes.

The Memory tab in Resource Monitor provides detailed per-process information about CPU utilization.
Figure 4. The Memory tab in Resource Monitor provides detailed per-process information about CPU utilization.

On the Physical Memory panel, you’ll see a graph showing the composition of in-use and available memory and related usage statistics. Although the details provided are similar to those provided in the Task Manager Performance tab, they are more precise and you’ll see specific values listed for the following:

  • Available Memory The nonallocated physical memory (which includes the system’s standby memory and free memory).

  • Cached Memory Part of the available physical memory. This memory is used for system caching (and includes the system’s modified memory and standby memory).

  • Free Memory Nonallocated memory and part of the available memory. This memory doesn’t contain any valuable data and will be used first whenever more memory is needed.

  • Hardware Reserved Memory Memory reserved for BIOS and some drivers for other peripherals.

  • In-Use Memory Currently allocated physical memory. The size of the paging file is the difference between the current commit charge and the in-use memory.

  • Installed Memory The total amount of physical memory installed on the system, inclusive of the hardware-reserved memory.

  • Modified Memory Part of the cached memory. This memory needs to be written to disk before becoming available.

  • Standby Memory Part of the cached memory. This memory contains cached data and code not actively being used.

  • Total Memory The total amount of physical memory installed on the system, not including hardware-reserved memory.

Use this information to help you identify how processes are using memory and whether there are performance issues related to memory. No additional details can be added regarding memory usage.

TROUBLESHOOTING: Resolve the memory performance issue

For troubleshooting performance issues related to memory, you might want to evaluate whether it makes sense to move applications and services from a highly utilized server to another, less-utilized server. You also might want to evaluate whether additional physical or virtual memory is needed to ensure adequate performance. Additional memory might resolve a performance issue related to high memory utilization.

Tracking per-process disk utilization

The Disk tab in Resource Monitor shows the number of kilobytes per second being read from or written to disk and the highest percentage usage. As shown in Figure 5, processes with disk activity are listed by name, process ID, number of bytes being read per minute, number of bytes being written per minute, and total read/write bytes per second.

The Disk tab in Resource Monitor provides detailed per-process information about CPU utilization.
Figure 5. The Disk tab in Resource Monitor provides detailed per-process information about CPU utilization.

Select one or more processes on the Processes With Disk Activity panel to get more detailed information about how those processes are using disk resources. As you select processes for tracking, keep in mind your selections are global. The same selections will appear in the other tabs of Resource Monitor.

When you select one or more processes for tracking, you’ll see additional details on the Disk Activity and Storage panels. To help you quickly identify disk-related performance issues, the Disk Activity panel identifies the files a particular process is reading or writing along with the bytes read per second, bytes written per second, and total read/write bytes per second for each file. Also shown are the I/O priority and the response time.

The Storage panel provides information about the underlying logical and physical disks. The Logical Disk column shows the drive letters of logical disks with I/O activity. The Physical Disk column identifies the specific physical disk where the logical disks were created. If there are performance issues with a server’s disks and files are being read from and written to multiple logical disks residing on the same physical disk (or a relative few physical disks as compared to the number of available physical disks), you might be able to improve performance by changing the storage configuration so that I/O activity is spread more evenly across the server’s physical disks. You also can try to balance the workload by moving applications and services from an overutilized server to another, less-utilized server.

Tracking per-process network utilization

The Network tab in Resource Monitor shows the current network bandwidth utilization in kilobytes and the percentage of total bandwidth utilization. As shown in Figure 6, processes that are transferring or have transferred data on the network are listed by name, process ID, number of bytes being sent per minute, number of bytes received per minute, and total bytes sent or received per minute.

The Network tab in Resource Monitor provides detailed per-process information about network utilization.
Figure 6. The Network tab in Resource Monitor provides detailed per-process information about network utilization.

Select one or more processes on the Processes With Network Activity panel to get more detailed information about how those processes are using network resources. As you select processes for tracking, keep in mind your selections are global. The same selections will appear in the other tabs of Resource Monitor.

When you select one or more processes for tracking, you’ll see additional details on these panels:

  • Network Activity Identifies the name or IP address of the computer to which a process is connected, along with the average number of bytes sent per second in the last minute, the average number of bytes received per second in the last minute, and the total number of bytes transferred per second in the last minute.

  • TCP Connections Shows the TCP connections for processes with network activity according to the local addresses, local ports, remote addresses, and remote ports being used. Also shown are the percentage of packets lost during the connection and the roundtrip latency in milliseconds.

  • Listening Ports Shows the specific listening ports being used by processes with network activity, along with the firewall status.

If there are performance issues with a server’s network connections, you might be able to improve performance by installing multiple network adapters in the server and teaming the network cards. You configure network interface card (NIC) teaming using Server Manager, either through a local logon or using a remote desktop connection. Either way, once you are logged on to the server, you can configure NIC teaming by selecting Local Server in the left pane of Server Manager and then tapping or clicking the link provided for NIC teaming. Next, tap or click Tasks under Teams and then select New Team. Enter a name for the teamed network adapters, such as Team Set 1, select the member adapters, and then tap or click OK.

If you can’t add or team network adapters, you can try to reduce the server’s network activity by moving applications and services from an overutilized server to another, less-utilized server.

Other  
 
GTS - youtube channel
video
 
Video tutorials
- How To Install Windows 8

- How To Install Windows Server 2012

- How To Install Windows Server 2012 On VirtualBox

- How To Disable Windows 8 Metro UI

- How To Install Windows Store Apps From Windows 8 Classic Desktop

- How To Disable Windows Update in Windows 8

- How To Disable Windows 8 Metro UI

- How To Add Widgets To Windows 8 Lock Screen

- How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010
programming4us programming4us
programming4us
 
 
programming4us