性能指标Performance metrics

应收集指标,以了解群集及其中运行的应用程序的性能。Metrics should be collected to understand the performance of your cluster as well as the applications running in it. 对于 Service Fabric 群集,建议收集以下性能计数器。For Service Fabric clusters, we recommend collecting the following performance counters.

NodesNodes

对于群集中的计算机,建议收集以下性能计数器,以便更好地了解每台计算机上的负载,并做出相应的群集缩放决策。For the machines in your cluster, consider collecting the following performance counters to better understand the load on each machine and make appropriate cluster scaling decisions.

计数器类别Counter Category 计数器名称Counter Name
逻辑磁盘Logical Disk 逻辑磁盘可用空间Logical Disk Free Space
PhysicalDisk(per Disk)PhysicalDisk(per Disk) 平均值磁盘读取队列长度Avg. Disk Read Queue Length
PhysicalDisk(per Disk)PhysicalDisk(per Disk) 平均值磁盘写入队列长度Avg. Disk Write Queue Length
PhysicalDisk(per Disk)PhysicalDisk(per Disk) 平均值磁盘秒数/读取Avg. Disk sec/Read
PhysicalDisk(per Disk)PhysicalDisk(per Disk) 平均值磁盘秒数/写入Avg. Disk sec/Write
PhysicalDisk(per Disk)PhysicalDisk(per Disk) 磁盘读取数/秒Disk Reads/sec
PhysicalDisk(per Disk)PhysicalDisk(per Disk) 磁盘读取字节数/秒Disk Read Bytes/sec
PhysicalDisk(per Disk)PhysicalDisk(per Disk) 磁盘写入数/秒Disk Writes/sec
PhysicalDisk(per Disk)PhysicalDisk(per Disk) 磁盘写入字节数/秒Disk Write Bytes/sec
内存Memory 可用兆字节数Available MBytes
PagingFilePagingFile 使用百分比% Usage
Processor(Total)Processor(Total) 处理器时间百分比% Processor Time
Process (per service)Process (per service) 处理器时间百分比% Processor Time
Process (per service)Process (per service) ID 进程ID Process
Process (per service)Process (per service) 专用字节数Private Bytes
Process (per service)Process (per service) 线程计数Thread Count
Process (per service)Process (per service) 虚拟字节数Virtual Bytes
Process (per service)Process (per service) 工作集Working Set
Process (per service)Process (per service) 工作集 - 专用Working Set - Private
Network Interface(all-instances)Network Interface(all-instances) 读取的字节数Bytes recd
Network Interface(all-instances)Network Interface(all-instances) 发送的字节数Bytes sent
Network Interface(all-instances)Network Interface(all-instances) 总字节数Bytes total
Network Interface(all-instances)Network Interface(all-instances) 输出队列长度Output Queue Length
Network Interface(all-instances)Network Interface(all-instances) 放弃的出站数据包Packets Outbound Discarded
Network Interface(all-instances)Network Interface(all-instances) 放弃的已接收数据包Packets Received Discarded
Network Interface(all-instances)Network Interface(all-instances) 出站数据包错误Packets Outbound Errors
Network Interface(all-instances)Network Interface(all-instances) 已接收的数据包错误Packets Received Errors

.NET 应用程序和服务.NET applications and services

若要将 .NET 服务部署到群集,请收集以下计数器。Collect the following counters if you are deploying .NET services to your cluster.

计数器类别Counter Category 计数器名称Counter Name
.NET CLR Memory (per service).NET CLR Memory (per service) 进程 IDProcess ID
.NET CLR Memory (per service).NET CLR Memory (per service) 提交的字节总数# Total committed Bytes
.NET CLR Memory (per service).NET CLR Memory (per service) 保留的字节总数# Total reserved Bytes
.NET CLR Memory (per service).NET CLR Memory (per service) 所有堆中的字节数# Bytes in all Heaps
.NET CLR Memory (per service).NET CLR Memory (per service) 大型对象堆大小Large Object Heap size
.NET CLR Memory (per service).NET CLR Memory (per service) GC 句柄数# GC Handles
.NET CLR Memory (per service).NET CLR Memory (per service) 第 0 代集合数# Gen 0 Collections
.NET CLR Memory (per service).NET CLR Memory (per service) 第 1 代集合数# Gen 1 Collections
.NET CLR Memory (per service).NET CLR Memory (per service) 第 2 代集合数# Gen 2 Collections
.NET CLR Memory (per service).NET CLR Memory (per service) GC 中的时间百分比% Time in GC

Service Fabric 的自定义性能计数器Service Fabric's custom performance counters

Service Fabric 生成大量自定义性能计数器。Service Fabric generates a substantial amount of custom performance counters. 如果已安装 SDK,可以在 Windows 计算机上的“性能监视器”应用程序(“开始”>“性能监视器”)中看到综合列表。If you have the SDK installed, you can see the comprehensive list on your Windows machine in your Performance Monitor application (Start > Performance Monitor).

在要部署到群集的应用程序中,如果使用的是 Reliable Actors,请添加 Service Fabric ActorService Fabric Actor Method 类别的计数器(请参阅 Service Fabric Reliable Actors 诊断)。In the applications you are deploying to your cluster, if you are using Reliable Actors, add counters from Service Fabric Actor and Service Fabric Actor Method categories (see Service Fabric Reliable Actors Diagnostics).

如果使用 Reliable Services 或服务远程处理,可同样获得应从其中收集计数器的 Service Fabric ServiceService Fabric Service Method 计数器类别。请参阅使用服务远程处理进行监视Reliable Services 性能计数器If you use Reliable Services or Service Remoting, we similarly have Service Fabric Service and Service Fabric Service Method counter categories that you should collect counters from, see monitoring with service remoting and reliable services performance counters.

如果使用 Reliable Collections,建议通过 Service Fabric Transactional Replicator 添加 Avg. Transaction ms/Commit,以收集每个事务指标的平均提交延迟。If you use Reliable Collections, we recommend adding the Avg. Transaction ms/Commit from the Service Fabric Transactional Replicator to collect the average commit latency per transaction metric.

后续步骤Next steps