Java and .NET memory usage?
-
What is the real picture here? We have a project to create a Gantt control. The data format is still not done, and so I have decided to create a sample data format for testing (I am working on the main control). So, I downloaded Java application GanttProject and created a sample. With the sample project created, the Java application is shown 3 MB memory usage. For my incomplete control placed on a Windows forms with no data loaded, it is about 20 MB memory usage! What is the real stats here? anyone? Best regards, Paul.
Jesus Christ is LOVE! Please tell somebody.
How did you measure the memory usage? Is it working set size of VM size?
Regards Senthil [MVP - Visual C#] _____________________________ My Home Page |My Blog | My Articles | My Flickr | WinMacro
-
How did you measure the memory usage? Is it working set size of VM size?
Regards Senthil [MVP - Visual C#] _____________________________ My Home Page |My Blog | My Articles | My Flickr | WinMacro
There is not special measurement, just looking at the system task manager. Best regards, Paul.
Jesus Christ is LOVE! Please tell somebody.
-
There is not special measurement, just looking at the system task manager. Best regards, Paul.
Jesus Christ is LOVE! Please tell somebody.
That could be misleading though - the Mem Usage column in Task Manager shows the working set of a process i.e. the amount of physical memory currently taken up by it. In reality, the application could be using up a lot more virtual memory. The VM Size column in Task Manager is a more reliable way to check memory consumption ( the best way is to use perfmon). If the amount of virtual memory is the same, then it could be that the JVM and CLR have different algorithms to control working set size - Windows has a SetProcessWorkingSetSize[^] API to control that.
Regards Senthil [MVP - Visual C#] _____________________________ My Home Page |My Blog | My Articles | My Flickr | WinMacro
-
There is not special measurement, just looking at the system task manager. Best regards, Paul.
Jesus Christ is LOVE! Please tell somebody.
You're talking about the address spaces and not the actual memory being used by those two processes. Joe has a brief article on this: How big is my app[^]
It is a crappy thing, but it's life -^ Carlo Pallini
-
That could be misleading though - the Mem Usage column in Task Manager shows the working set of a process i.e. the amount of physical memory currently taken up by it. In reality, the application could be using up a lot more virtual memory. The VM Size column in Task Manager is a more reliable way to check memory consumption ( the best way is to use perfmon). If the amount of virtual memory is the same, then it could be that the JVM and CLR have different algorithms to control working set size - Windows has a SetProcessWorkingSetSize[^] API to control that.
Regards Senthil [MVP - Visual C#] _____________________________ My Home Page |My Blog | My Articles | My Flickr | WinMacro
Thanks for the information.
S. Senthil Kumar wrote:
The VM Size column in Task Manager is a more reliable way to check memory consumption ( the best way is to use perfmon).
It is worse, I will try using the perfmon later. Best regards, Paul.
Jesus Christ is LOVE! Please tell somebody.
-
What is the real picture here? We have a project to create a Gantt control. The data format is still not done, and so I have decided to create a sample data format for testing (I am working on the main control). So, I downloaded Java application GanttProject and created a sample. With the sample project created, the Java application is shown 3 MB memory usage. For my incomplete control placed on a Windows forms with no data loaded, it is about 20 MB memory usage! What is the real stats here? anyone? Best regards, Paul.
Jesus Christ is LOVE! Please tell somebody.
What I am about to say is mostly conclusion based on hear say and bare minimum investigation long time ago. But I'll bet, chances are, that "big" Java application are more system resources greedy than big .NET ones. Maybe small Java app are less greedy, that won't surprise me too much. It was meant to run in the browser, as a consumer oriented applet.
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station.... _________________________________________________________ My programs never have bugs, they just develop random features.
-
What I am about to say is mostly conclusion based on hear say and bare minimum investigation long time ago. But I'll bet, chances are, that "big" Java application are more system resources greedy than big .NET ones. Maybe small Java app are less greedy, that won't surprise me too much. It was meant to run in the browser, as a consumer oriented applet.
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station.... _________________________________________________________ My programs never have bugs, they just develop random features.
Super Lloyd wrote:
But I'll bet, chances are, that "big" Java application are more system resources greedy than big .NET ones.
Do you consider something like Eclipse big enough for this? Best regards, Paul.
Jesus Christ is LOVE! Please tell somebody.
-
Super Lloyd wrote:
But I'll bet, chances are, that "big" Java application are more system resources greedy than big .NET ones.
Do you consider something like Eclipse big enough for this? Best regards, Paul.
Jesus Christ is LOVE! Please tell somebody.
I would say so.... But you are going to tell me that Eclipse is quite lean, isn't it? I know at work I was wondering what does Sun benefit from Java. And one of my coworker draw from his past experience where they had a powerful server which run like a dog some Java ERP for only 32 user. And that tells me that server sales does benefit from Java....
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station.... _________________________________________________________ My programs never have bugs, they just develop random features.
-
What is the real picture here? We have a project to create a Gantt control. The data format is still not done, and so I have decided to create a sample data format for testing (I am working on the main control). So, I downloaded Java application GanttProject and created a sample. With the sample project created, the Java application is shown 3 MB memory usage. For my incomplete control placed on a Windows forms with no data loaded, it is about 20 MB memory usage! What is the real stats here? anyone? Best regards, Paul.
Jesus Christ is LOVE! Please tell somebody.
http://java.sys-con.com/node/37060[^]
Need custom software developed? I do C# development and consulting all over the United States. A man said to the universe: "Sir I exist!" "However," replied the universe, "The fact has not created in me A sense of obligation." --Stephen Crane
-
What is the real picture here? We have a project to create a Gantt control. The data format is still not done, and so I have decided to create a sample data format for testing (I am working on the main control). So, I downloaded Java application GanttProject and created a sample. With the sample project created, the Java application is shown 3 MB memory usage. For my incomplete control placed on a Windows forms with no data loaded, it is about 20 MB memory usage! What is the real stats here? anyone? Best regards, Paul.
Jesus Christ is LOVE! Please tell somebody.
Might it be that the Java app is drawing everything with custom paint logic and your .net app uses a lot of controls? (usually it's easy to tell from the looks of it, but I don't have Java in this PC so I can't try it)
-
Might it be that the Java app is drawing everything with custom paint logic and your .net app uses a lot of controls? (usually it's easy to tell from the looks of it, but I don't have Java in this PC so I can't try it)
Joaquim Rendeiro wrote:
Might it be that the Java app is drawing everything with custom paint logic and your .net app uses a lot of controls?
The applications are similar, list/grid, splitter and gantt chart view. The Java app has toolbar, menu and status bar, dialogs etc (a complete application). The .NET app is just started, no dialog etc and does no real drawing yet. Best regards, Paul.
Jesus Christ is LOVE! Please tell somebody.
-
What is the real picture here? We have a project to create a Gantt control. The data format is still not done, and so I have decided to create a sample data format for testing (I am working on the main control). So, I downloaded Java application GanttProject and created a sample. With the sample project created, the Java application is shown 3 MB memory usage. For my incomplete control placed on a Windows forms with no data loaded, it is about 20 MB memory usage! What is the real stats here? anyone? Best regards, Paul.
Jesus Christ is LOVE! Please tell somebody.
hi, we have had the same problems explaining this to the marketing team of a company we were developing an application for. They main reason is .NET allocates more space than the space really needed by the application to optimize performance, plus the memory footprint you see contain also some shared components of the framework. What you see is called the working size of the process if I remeber well (project was 3 years ago) and is not a good indicator of the memory footprint of the process. Said this, I think if you develop an application for windows, you should use .NET, but I don't want to start a flame. By the way, the solution to make the marketing team happy was, with their approval, to have a thread trim the working size each 5 seconds so in task manager the memory footprint was not high :doh: . Crazy what you have to do sometime!
-
hi, we have had the same problems explaining this to the marketing team of a company we were developing an application for. They main reason is .NET allocates more space than the space really needed by the application to optimize performance, plus the memory footprint you see contain also some shared components of the framework. What you see is called the working size of the process if I remeber well (project was 3 years ago) and is not a good indicator of the memory footprint of the process. Said this, I think if you develop an application for windows, you should use .NET, but I don't want to start a flame. By the way, the solution to make the marketing team happy was, with their approval, to have a thread trim the working size each 5 seconds so in task manager the memory footprint was not high :doh: . Crazy what you have to do sometime!
Agreed. Profile the app, if the results seem reasonable then I wouldn't worry about what the task manager reports. If the OS is having no problems giving resources to the app then it may just be there are a lot of objects waiting to be deleted but no real need to do garbage collection.
-
Joaquim Rendeiro wrote:
Might it be that the Java app is drawing everything with custom paint logic and your .net app uses a lot of controls?
The applications are similar, list/grid, splitter and gantt chart view. The Java app has toolbar, menu and status bar, dialogs etc (a complete application). The .NET app is just started, no dialog etc and does no real drawing yet. Best regards, Paul.
Jesus Christ is LOVE! Please tell somebody.
From experience I will tell you we created a Java application to handle routing for us (integrated with a logistic company's software) and it required massive tweaks to run on the client computer due to memory usage (and even then still often failed). The same .NET app required no tweaks and worked as we coded it. I'm certainly no expert in either technology.