简体   繁体   中英

How much RAM Does My Program Use? Memory Profiling Report Visual Studio

I am trying to figure out how much RAM my program needs. I am running a C# console application that access a SQL Database. When I check it out in the Task Manager, it is in the neighborhood of 27 MB but when I run the Memory Profiling Report, I get the results below. I would greatly appreciate it if anyone could help me understand this. I have searched the internet and SO and have not been able to figure out a number that I can count on. I would ballpark it but the results are just too different. Thanks for any help at all :)

To clarify: Knowing this, what can I tell my hardware person when they ask me how much memory to specify for the server for this process?

内存性能分析报告“已分配的总字节数”

if you want to gain are usages which related to your application (sql usage which use resource to execute your command) i can not possible because they are use ram as different resources.

first you should know that we have different type of memory and each tool show the one of them , for more info you can see this article Memory Usage if you want to calculate your own application you have multiple options :

1.you can run your program under debug mode in vs 2015 or higher and activate diagnosis tool and see ram usage of your program

2.you can install jetBrains tool or some similar tools that which help you to see how much your application used memory and even its give you much more details such as how many your methods had been called.

  1. you can use some .net method which used for calculating ram usage

RAM only contributes as a random access. Computing power is dictated by processing speed/power, therefore, if a heavily fluctuating RAM usage is noticeable, upgrading the RAM itself is not ideal. From what I can tell, it appears that the program requires at least 2gb of RAM to run smoothly and not affect other programs running simultaneously on the same processor.

Another method is to calculate an "average" RAM usage during peak processing (ie. while the program is running during full use). Record the RAM consumption at 2 minute intervals for 20 minutes and divide by 10 to get the average "recommended" RAM.

But, like I said, RAM is only part of the power.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM