It hangs at some points or becomes very slow when I do certain operations.
When I see the stack trace I came to know that Garbage collection is taking lots of time.
My system RAM is 3 GB.
I couldn't allocate more than 1.5 gb to JVM. If I do allocate my app is even not loading. Maybe because other applications are also consuming some memory.
So while looking for the solution I came to know about Bigmemory( EhCache) from Terracotta.
Ramesh Sunkara wrote:I couldn't allocate more than 1.5 gb to JVM. If I do allocate my app is even not loading. Maybe because other applications are also consuming some memory.
It's because Windows doesn't allow any 32-bit program to use more than 1.5GB of memory. The only way to get a "normal" JVM to run with more than 1.5GB is to run a 64-bit JVM on a 64-bit Windows. If you can't then you're limited to 3rd party systems like the one you mentioned.