如何改善在.net中的WMI性能? [英] How can I improve WMI performance in .NET?

查看:175
本文介绍了如何改善在.net中的WMI性能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我继承code,使多个远程WMI调用。当我反复暂停执行并查看调用堆栈它几乎总是在 ManagementScope.Connect()通话。一个新的连接,似乎可与每个WQL查询进行。

I've inherited code that makes numerous remote WMI calls. When I repeatedly pause execution and look at the call-stack it's almost always in a ManagementScope.Connect() call. A new connection seems to be made with each WQL query.

尽管有限的试验和错误,我还没有发现任何大的胜利但在改善WMI的性能要求。

Despite limited trial and error, I haven't found any big wins yet in improving the performance of the WMI calls.

我已经试过缓存previous结果,重用连接,避免了可怕的选择* 。这些都没有给我的性能改进,我想。我有兴趣了解环境对WMI性能的影响,但code需要在各种各样的可能是我无法控制的环境中运行。

I've tried caching previous results, reusing connections, and avoiding the dreaded "select *". These haven't given me the performance improvements that I'd like. I'm interested to understand the impact of environment on WMI performance, but the code needs to run in a wide variety of environments that are probably beyond my control.

如果有,是什么做的和做的导向,.NET WMI访问?不是的性能

If any, what are the do's and don't's of performance oriented WMI access in .NET?

推荐答案

不是我的专业领域,但是这可能会有所帮助:

Not my area of expertise, but this might be of some help:

<一个href="http://blogs.msdn.com/wmi/archive/2009/06/27/wmi-improving-your-wmi-application-performance-in-fan-out-scenario.aspx">WMI:改善扇出场景中的WMI应用程序的性能

在这篇博客中,我将讨论连接到远程计算机上使用WMI执行多个WMI操作,其性能上的差异约三种不同的方式。

"In this blog, I will talk about three different ways of connecting to a remote machine using WMI to perform multiple WMI operations, and their performance differences."

这篇关于如何改善在.net中的WMI性能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆