何时创建网络花园
我有一个应用程序当前正在 IIS 6.0 上运行,有一个工作进程(默认)。我正在尝试确定创建网络花园是否会提高性能。我读过很多文章,说网络花园并不适合每个人(因为它会重复资源、缓存不共享等)。我找不到一篇文章对使用网络花园有明确的理由(微软的网站提供了三个要点,但找不到具体的例子)。我的情况如下:
- 我们在给定时间最多可以有 40 个并发用户。
- 我们的应用程序执行一系列计算(计算量为 1,000 次),最多可能需要 10 分钟才能完成。
- 我们有多个数据库调用,其中一些可能需要长达 30 秒才能完成。
创建网络花园会提高性能吗?还是应该简单地增加当前工作进程中的线程数量?什么时候应该使用网络花园?如果当前工作进程中的线程正在执行计算(运行.net代码)和/或调用数据库,其他线程是否可以同时运行(我假设是)。
谢谢。 瑞安
I have an application that is currently running on IIS 6.0 with one worker process (the default). I am trying to determine if creating a web garden will improve performance. I have read a bunch of articles that say that a web garden is not the right approach for everyone (since it duplicates resources, cache is not shared, etc). I could not find an article that had a clear rational for using a web garden (Microsoft's site provides three bullet points, but no specific examples can be found). My situation is as follows:
- We have can have up to 40 concurrent users at a given time.
- Our application performs a series of calcuations (on the magnitude of 1,000s of calculations) that can take up to 10 minutes to complete.
- We have multipe database calls some of which can take upwards to 30 seconds to complete.
Will creating a web garden improve performance, or should I simply increase the number of threads in the current worker process? When would be an example of when you should use a web garden? If a thread in the current worker process is performing calcuations (running .net code) and/or calling the database, can other threads run at the same time (I assume yes).
Thanks.
Ryan
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
就我个人而言,当我的 Web 应用程序需要频繁的工作进程回收时,我选择了使用网络花园。
在这种特定情况下,我们需要经常回收工作进程,因为我们使用 CodeDOM 动态发出程序集,根据定义,随着加载更多程序集,会出现内存泄漏。
拥有网络花园有助于避免每次回收工作进程时服务器响应的延迟。
Personally, I have gone the route of using a web garden when my web application required frequent worker process recycles.
In this specific case we needed to recycle the worker process often because we were using CodeDOM to emit assemblies dynamically, which has a memory leak by definition as more assemblies are loaded.
Having a web garden helped avoid a delay in server response every time the worker process was recycled.