3

我正在尝试对应该获得大量流量的 wcf Web 服务进行性能测试。哪些性能计数器可以使用以及用于什么目的......当然我正在查看CPU和RAM,但我想知道IIS何时排队以及何时遇到问题......

任何关于合理性能计数器的建议都非常感谢......

干杯亚历克斯

4

3 回答 3

2

MSDN has an entire section on WCF administration and diagnostics, and specifically, for performance counters in WCF.

There are also specific sections for performance counters hosted service calls, as well as for the endpoint and for operations.

I would suggest looking through those first, as there is a good amount of valuable information there.

于 2010-02-15T20:46:32.347 回答
0

分析性能计数器很复杂,需要大量练习,这就是我的说法,我没有足够的经验来给出一个完整的列表。

你将寻找一些具体的事情开始。首先当然是返回 web 服务调用需要多长时间。这会告诉您在该负载下是否存在性能问题。接下来大家看看CPU。然而,这并不能告诉你很多。RAM 很好,但您想知道应用程序分页到磁盘的频率,因此请检查 Page Faults/sec。检查您的逻辑和物理磁盘的当前磁盘队列长度。如果您的物理磁盘正在排队,那么您正在对磁盘进行大量读取/写入。

除此之外,您通常会试图找到一个特定且可能不为人知的问题。

我通常分阶段进行性能测试。使用基础知识进行第一次测试,如果特定页面出现问题,请查看它导致的负载。

如果整个生产服务器运行不充分,添加更多硬件会更容易,但我更喜欢查看正在运行的代码并使其变得更好。

于 2010-02-15T20:51:52.107 回答
0

在运行性能监视器之前,您需要添加注册表项:

HKLM/Services/CurrentControlSet/service/
  Add ServiceModelService 4.0.0.0
  under that add Performance then add a DWORD FileMappingFile.
  The size for that will be number of services exposed * 33 * 350.

然后在您的配置中添加

<system.ServiceModel>
  <diagnostics performanceCounters="ServiceOnly"/>
</system.ServiceModel>

您可以查看以下计数器:CPU / RAM(用于内存泄漏)/每个服务的呼叫和呼叫持续时间以及未完成呼叫

CPU will show you how heavily your are saturating your server
RAM will show if you have memory leaks if it continues to grow and grow and grow
Calls will show the number of calls you are getting accumulative, 
Calls Per Second will give you the volume you're handling
Calls Outstanding are clients that are waiting because your services could not handle the volume.

如果您在这些分组中发现一些有问题的数字,则开始查看其他元素,例如 Calls Faulted 或 Calls Failed。(不确定故障和故障之间的区别)

您很少需要深入研究这些问题,而不是仅提供数字服务。当您进入其他两组计数器时,您的共享内存利用率会变得非常高。

于 2012-06-26T20:54:40.807 回答