在 ASP.NET IIS 托管的 WCF 应用程序中偶尔调用需要 5 秒
我们有一个应用程序,其中低响应时间至关重要。 一切都工作正常,除了每周有几次,其中 1 个随机调用需要大约 5000 毫秒才能完成,而其他调用则需要 200 毫秒。调用是在几秒钟之前进行的,因此与正在卸载的 dll 无关。时间是随机的,不涉及应用程序池回收。
IIS 花费时间:5000ms
ASP.NET\Request 执行时间:5000ms
代码中的计数器:200ms(在执行开始和结束时记录)
在我们的代码被执行之前,调用似乎被卡在了某个地方。我们监控性能计数器,当发生这种情况时,呼叫不会排队,也没有等待时间。
IIS 配置已使用自定义 processModel 值进行了优化(如 http://support.microsoft.com/kb/ 中所述821268)以获得更好的吞吐量。
我们监控了磁盘、网络、内存和 CPU,一切看起来都很好。
什么可能导致这样的峰值(也许是 IIS 线程分配?) 除了明显的 ASP.NET、.NET CLR、System、Thread 之外,还有什么其他计数器可以帮助我们?
配置: Windows 2003 SP2(托管在 VMWare ESX 上)
IIS 6
.NET Framework 3.5
We have an application where a low response time is crucial.
Everything is working fine except for a few time per week where 1 random call takes around 5000ms to complete vs 200ms for other calls. A call is made a few seconds before so it is not related to the dlls being unloaded. The time is random, there is no App pool recycling involved.
IIS Time taken : 5000ms
ASP.NET\Request Execution Time : 5000ms
Our counters in the code : 200ms (Log at the beginning and at the en of execution)
It seems the call is stuck somewhere before our code is hit. We monitored the perf counters and when this happens the call is not queued and there is no wait time.
IIS config has been optimized with custom processModel values (as described in http://support.microsoft.com/kb/821268) for better throughput.
We monitored the disks, network, memory and CPU and everything looks okay.
What could cause such a spike (IIS thread allocation maybe?)
What other counter beside the obvious ASP.NET, .NET CLR, System, Thread, could help us?
Config :
Windows 2003 SP2 (hosted on VMWare ESX)
IIS 6
.NET Framework 3.5
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我将从这篇文章开始 WCF 请求限制和服务器可扩展性
特别是限制调整部分:
I would start with this article WCF Request Throttling and Server Scalability
In particular the Throttling Tuning section:
您是否尝试过跟踪服务和客户端,以查明是否存在安全谈判或类似的东西会减慢您的速度?
请参阅:SVC 跟踪查看器 (msdn)
Have you tried tracing the service and the client to find out if there are secutrioty negotiations or stuff like that slowing you down?
See: SVC Trace viewer(msdn)