我有我编写的 Windows 应用程序。
我将其安装在装有 Windows Server 2008 的虚拟服务器(VMware)上,由于某种原因,应用程序变得越来越大。我使用 perfmon 来查看是否存在内存泄漏 - 但据我了解,没有:
这是任务管理器中的过程:
还有两个进程使用大量内存和 CPU,但很稳定,不会像 SimeserManager.exe 那样增长。
内存增长会减慢该服务器所拥有的站点上的冲浪速度。
本周之前,我在 Windows Server 2003 的 Phizical 服务器上使用了我的应用程序,并且冲浪没有问题。我无法恢复网络机器中的情况,因为我不再拥有它了,但我不相信使用网络服务器时出现内存错误。
该应用程序是使用 Visual Studio 2010 用 c# .net 编写的。
可能存在什么问题?
我在哪里可以找到一些线索?
更新
我得到了 ANTS 内存分析器并尝试寻找问题所在。我创建了内存快照,结果如下:
现在我真的迷路了。
我尝试了标准过滤器,但没有找到问题的线索。在图像中您可以看到私有字节有所增加。这是否表明存在内存泄漏?
谁能给我一些如何继续的线索?
谢谢!
I have windows application I wrote.
I installed it on virtual server (vmware) that holds windows server 2008 and for some reason the application getting bigger and bigger. I used perfmon in order to see maybe there is a memory leak - but as I understand, there isn't:
Here is the proccess in task manager:
There are also two proccesses that use a lot of memory and cpu but are steady and not growing like SimeserManager.exe.
The memory growing slows the surfing on sited that this server holds.
Before this week I used the my application on phizical server with windows server 2003 and there were no problem with surfing. I can't restore the situtaion in the phizical machine since I don't have it anymore, but I don't believe there was memory error when using the phizical server.
The application is written in c# .net using visual studio 2010.
What can be the problem?
Where can I get some clues?
UPDATE
I get ANTS memory profiler and tried to seek for the problem. I created memory snapshots and here is the results:
Now I'm really lost.
I tryed the standart filters but didn't manage to find a clue for the problem. In the image you can see there is increase in the private bytes. Does that sais there is a memory leak?
Can anyone give me some clues how to continue?
Thanks!
发布评论
评论(1)
我们这里没有足够的信息来真正调试您的应用程序。但是,您可以使用一些工具来识别和解决应用程序中的此问题。我建议您使用 RedGate 的 ANTS Memory Profiler 来帮助您查找问题。这是它的链接:
http://www. red-gate.com/products/dotnet-development/ants-memory-profiler/
它不是免费的,但价格便宜且非常有效。获取 14 天免费试用版并在您的应用程序上运行。我什至可以说,如果没有发现问题,则问题可能不在于您的应用程序。
至于其他占用大量内存的进程,这是正常的。 SQL Server 尝试获取尽可能多的内存。如果您不小心,在与 SQL Server 相同的机器上运行其他应用程序可能会导致性能问题。这是一篇关于 SQL Server 如何使用内存的好文章:
http://sqlblog.com/blogs/jonathan_kehayias/archive/2009/08/24/troubleshooting-the-sql-server-memory-leak-or-understanding-sql-server-memory-usage.aspx
至于 IIS 内存使用情况(另一个使用大量内存的进程),可能有多种原因。我建议您通读此论坛,以更好地了解它可能是什么(如果确实是一个问题):
http://forums.iis.net/t/1150494.aspx
We don't have enough information here to really debug your application. However, there are tools you can use to identify and solve this issue in your application. I would suggest you use the ANTS Memory Profiler from RedGate to help you look for your problem. Here is a link to it:
http://www.red-gate.com/products/dotnet-development/ants-memory-profiler/
It isn't free but it is cheap and extremely effective. Get the 14-day free trial and run it on your application. I would go as far as to say that if it doesn't find the issue, the issue probably isn't with your application.
As for the other processes that are taking a lot of memory, this is normal. SQL Server tries to get as much memory as possible. Running other applications on the same box as a SQL server may cause you performance issues if you aren't careful. Here is a good article on how SQL Server uses memory:
http://sqlblog.com/blogs/jonathan_kehayias/archive/2009/08/24/troubleshooting-the-sql-server-memory-leak-or-understanding-sql-server-memory-usage.aspx
As for IIS memory usage (the other process that was using lots of memory), there could be multiple reasons for this. I would suggest you read through this forum to get a better idea of what it could be (if it truly is an issue):
http://forums.iis.net/t/1150494.aspx