Windows 2003 上的 .NET 应用程序性能问题

发布于 2024-08-10 05:50:57 字数 326 浏览 9 评论 0原文

我们有一台 2 个四核 Xeon 服务器,配备 8GB RAM,并安装了 Windows Server 2003 Enterprise。我们在其上安装了基于.NET Framework 3.5 的应用程序服务器。服务器采用SQL Server 2005作为数据库服务器。

当我们安装应用服务器时,它曾经具有超快的性能,一切都很好。一旦我们将其加入到我们的域中,它的性能就会急剧下降。例如,之前需要 1 秒才能完成的任务,现在大约需要 30 秒。这非常奇怪,因为只有基于 .NET 的应用程序的性能受到了这种性能影响,但其他应用程序仍然以正常速度运行。

有谁知道为什么会发生这种情况?非常感谢任何帮助或建议。

We have a 2 x Quad Core Xeon server with 8GB of RAM and Windows Server 2003 Enterprise installed on it. We installed our application server which is based on .NET Framework 3.5 on it. The server uses SQL Server 2005 as its database server.

When we installed the application server, it used to have ultra fast performance and everything was fine. Once we joined it into our domain, its performance decreased dramatically. For example a task that took 1 sec to complete, now takes about 30 sec. This is very strange since only .NET based applications' performance got this performance hit but the other applications still run at their normal speed.

Does anyone have any idea about why is this happening? Any help or suggestion is much appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

苍白女子 2024-08-17 05:50:57

不幸的是,可能需要更多才能回答您的问题。发生这种情况的可能原因有很多,其中大多数都涉及您的代码。

根据您加入域然后事情开始引起麻烦的症状,我想说您正在做很多网络工作,以前可以在您的计算机上本地完成,而现在的延迟实际上是造成麻烦。

但这是基于还没有足够信息的疯狂猜测。

我建议你分析一下你的代码。找出执行过程中您的大部分时间都花在哪里,然后在此处发布代码或其经过净化的版本,以便我们可以帮助您优化它。

Unfortunately, more is probably needed to answer your question. There are a host of possible reasons why this is occurring, and most of them involve your code.

Based on the symptom that you joined the domain and then things started causing trouble, I'd say you've got a lot of networking that you're doing that previously was able to be done locally on your machine and the latency is now actually causing trouble.

But that's a wild guess based on not nearly enough information.

I'd suggest you profile your code. Find out where the majority of your time is spent during execution and then post the code or a sanitized version of it here so we can help you optimize it.

兮颜 2024-08-17 05:50:57

我确实找到了问题的答案,所以我认为在这里分享可能会很好。当 CLR 尝试加载程序集时,它希望为具有authenticode 签名的程序集生成发布者证据。在我们的例子中,CLR 尝试连接到 clr.microsoft.com,但我们服务器的 Internet 访问被阻止,因此每当应用程序服务器尝试加载新程序集时都会造成巨大的延迟。

以下文章介绍了如何禁用此功能:

绕过启动时的 Authenticode 签名检查

I did find the answer to my question so i thought it might be good to share it here. The CLR want generate publisher evidence for assemblies with authenticode signature when it tries to load the assemblies. In our case CLR was trying to connect to clr.microsoft.com but our server's internet access was blocked so it caused huge delay whenever the application server tries to load a new assembly.

The following post describes how you can disable this feature:

Bypassing the Authenticode Signature Check on Startup

等风来 2024-08-17 05:50:57

我将在这里进行猜测,并认为您正在谈论 Web 应用程序。如果这是正确的,您可能需要查看您在网络服务器上设置的应用程序池。您的应用程序可能会在开始运行时对将自己设置在哪个池中感到困惑。

另一件需要检查的事情可能是您的数据连接,并确保您关闭了所有已打开的内容。

最后一件事,就像 Randolpho 所说的那样,您实际上必须使用某种分析器来跟踪代码执行,并查看哪些地方发生了问题。

祝你好运!

I'm going to make a guess here and think that you're talking about a web application. If this is correct, you might want to take a look at the application pools you have setup on the webserver. Your application might be getting confused about which pool to set itself in when it starts running.

Another thing to check might be your data connections and make sure that you're closing everything that's been opened.

The last thing, like Randolpho said, you're just really going to have to follow your code execution with some kind of profiler and see where things are getting tied up.

Good luck!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文