在 64 位操作系统中运行 32 位 .NET 应用程序速度很慢
我的环境:asp.net 3.5框架与xp
我有一个疑问。我们使用 32 位开发我们的产品。当我们部署在64位机器(windows 2008虚拟机)上时,与32位版本的iis相比,它看起来非常慢。 我们是否需要在 64 位机器中重新编译程序集才能在 64 位环境中获得更快的响应?
或者64位机器上是否需要进行任何配置? 如果 dll 是在 32 位中编译的,是否明智的做法是仅在 32 位 iis 中运行以获得更快的性能 干杯 桑杰
My environment : asp.net 3.5 framework with xp
I have a query. We developed our product using 32 bit. When we deployed in 64 bit machine(windows 2008 virtual machine) it seems very slow when compared to 32 bit version of iis.
Do we need recompile our assembly in 64 bit machine to get faster response in 64 bit environment ?
or Is ther any configuration need to be done in 64 bit machine?
if a dll is complied in 32 bit is it wise to run only in 32 bit iis to get faster performance
cheers
sanjay
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
你确定你有足够的内存吗? 64 位 .NET 应用程序使用更多内存。
您的应用程序是否以 64 位运行?你是否为“任何CPU”编译了它?
一些应用程序在 64 位上运行速度较慢,仅仅是因为它们“接触”了更多内存(类的每个实例的开销更高+对对象的每个引用都是 64 位而不是 32 位) - 导致 CPU 必须从 RAM 获取数据更频繁地访问 CPU 缓存。
根据我的经验,数据处理/文本处理应用程序在 64 位上运行速度稍慢,但大量使用浮点的应用程序运行速度更快。然而,在几乎所有情况下,差异都小于 20% - 除非 64 位应用程序没有足够的内存,导致操作系统开始将 RAM 分页到磁盘。
Are you sure you have enough memory? 64 bit .NET applications use more memory.
Is your application running as 64 bit? Did you compile it for "Any CPU"?
Some applications run slower on 64 bit simply because they "touch" more memory (overhead for each instance of a class is higher + every reference to an object is 64 bits instead of 32 bits) - causing the CPU to have to fetch data from RAM to the CPU cache more often.
In my experience, data handling / text processing applications run somewhat slower with 64 bit but applications which make heavy use of floating point run faster. However, in almost all cases the difference is <20% - unless the 64 bit application does not have enough memory causing the OS to start paging RAM to disk.
配置应用程序池以启用 32 位应用程序可能会成功。
相关阅读:
Configure the application pool to enable 32-bit applications may do the trick.
Related readings:
虚拟机?因为 .net 在 64 位上运行 32 位时,性能会急剧下降,这并不常见。
Virtual machine? Because it's not usual case for .net when performance dramatically degrade in case of 32bit running on 64bit.