1

I have a machine with 8 GB RAM with 32 bit JVM on linux and i want to make JVM to use maximum USE OF RAM , I think if i increase Heap size memory then Garbage Collector will become slow. Is there other solution to improve processing speed ?. thanks in advance.

lakhaman
  • 125
  • 1
  • 3
  • 11
  • Do you have an option to install/use 64 bit JVM ? – Santosh Jun 15 '12 at 05:55
  • You will not be able to use all ram with a 32 bit JVM. However, your question is a bit unclear, why do you need to use the ram? Increasing the team could make GC slower...or faster depending on your settings and the characteristics of object creation. Processing speed could be related to ram, but please tell us some more of what you are doing and more details of what you want to improve. – Roger Lindsjö Jun 15 '12 at 06:25
  • @RogerLindsjö That's false. There's no limit to how much RAM a 32-bit JVM can use. Any RAM the OS can use, the JVM can use. The 32-bit limit is on virtual address space, not RAM. There is no particular limit on how much RAM a 32-bit process can use -- if the OS can use it, the process can use it. – David Schwartz Nov 09 '14 at 02:33
  • @DavidSchwartz if the virtual address space is limited to a 32 bit pointer, then it can not address more than 4 GB. See also http://stackoverflow.com/questions/1434779/maximum-java-heap-size-of-a-32-bit-jvm-on-a-64-bit-os which have references to oracle FAQ – Roger Lindsjö Nov 09 '14 at 07:38
  • @RogerLindsjö It doesn't have more than 4GB of address space, yes. But the question was about *RAM*, not address space. There are many ways to use more RAM than address space. (The most obvious, reading and writing to and from a file that remains entirely in RAM due to the disk cache.) – David Schwartz Nov 10 '14 at 02:17
  • @DavidSchwartz I stand corrected. However, I still read the actual question as regarding memory since it talks about heap size and GC. – Roger Lindsjö Nov 10 '14 at 07:51
  • @RogerLindsjö The question could not possibly state more clearly that it's about use of *RAM*, not address space, virtual memory, or anything else. He talks about heap size and GC because he thinks that will help him use more RAM. Read the question again. – David Schwartz Nov 10 '14 at 18:06

3 Answers3

1

Install a 64-bit version of Linux and Java.

If you have a 64-bit processor, you can run a 64bit VirtualBox on a 32bit OS. Source

Community
  • 1
  • 1
JustinDanielson
  • 3,155
  • 1
  • 19
  • 26
1

If it is an Oracle JVM you cannot use all that memory.

Upgrade to a 64 bit JVM suitable for the platform.

Thorbjørn Ravn Andersen
  • 73,784
  • 33
  • 194
  • 347
1

may be run 2 32 bit Java virtual machines. There is no other way to utilize 8GB, if you cant upgrade to 64 bit.

Subin Sebastian
  • 10,870
  • 3
  • 37
  • 42