This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds and have James Denton on-line!
See this thread for details.
Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

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: 60091
188
  • 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: 23586
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!