• Post Reply Bookmark Topic Watch Topic
  • New Topic

Minimum memory usage for java application

 
Steve Jiang
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I try to find the minimum memory usage for java application and set the minimum parameter as "-Xmx2M -Xms2M -XX:MaxPermSize=2m" , jvm doesn't let me set as 1M , and throw the error for too small heap size.




After that, I use Yourkit to monitor the usage , I get

Heap Memory
Used : 2.3 M
allocated: 3.5M
limit : 7m

non-heap memory
Used : 7.5M
allocated: 22M
limit 68M

My questions is :

1, Can we still decrease the memory usage for java applciation?
2, Is the JVM paramter "-Xmx2M -Xms2M -XX:MaxPermSize=2m" should limit the heap size as 2M, and non-heap size as 2M? Looks above the memory usage data, it is over the paramter setting.
Should we use other paramter to limit the heap size and non-heap memory size?


Thanks

 
Tim Holloway
Bartender
Posts: 18412
58
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The JVM itself uses over 100MB of RAM. A memory allocation of 2MB would be a bit absurd.

I think the actual allowable minimum on the config is 128M.
 
Steve Jiang
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I also monitor the memory usage for this testing program from Mac Activity Monitor, I can see the memory usage is around 10M for testJVMusage. It is similar with YourKit profiler data.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!