Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Cannot allocate heap space when 80% of RAM free  RSS feed

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everybody,
we have a Windows 2012 SP2 on AWS with 64GB. We are running "plenty" of Java applications and others as well. Task manager shows that 22% of the memory is used. We try to start Java applications with Xmx128M or lower and we get "Cannot allocate heap space". How can that be?

I know that 22% may not represent the reality. It may be that more space has been allocated for (Java) applications... but still there is plenty of space free! Could that be a problem related to the way AWS EC2 instances distribute memory... BTW both jdk 8 installed are 64bit, although somebody had incorrectly installed a 32bit jdk at the beginning- now removed. Could it be, that some of the 32bit config (maybe in the registry?) are interfering?

This is a very weird case... Any helps or assumptions are appreciated

Kind regards,
Kostas
 
Marshal
Posts: 59119
180
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which version of Java® are you using? Have a look at this link about JVM ergonomics for Java8. you should find details for older versions from this recent post. I couldn't find anything about minimum permissible heap sizes; I think it said the that the minimum for -Xmx is 2MB.
 
author
Sheriff
Posts: 23510
138
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, I would ask how many is "plenty"?  There is a difference between 10 java applications, compared to say 1000 java applications.

Henry
 
Lasagna is spaghetti flvored cake. Just like this tiny ad:
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!