File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Performance and the fly likes How to handle large heap requirement Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Performance
Bookmark "How to handle large heap requirement" Watch "How to handle large heap requirement" New topic
Author

How to handle large heap requirement

Atul Prajapati
Greenhorn

Joined: Oct 24, 2005
Posts: 7
Hi,

Our Application requires large amount of heap memory to load data in memory for further processing.

Application is load balanced and we want to share the heap across all servers so one server can use heap of other server.
Server1 and Server2 have 8GB of RAM and Server3 has 16 GB of RAM.

If any request comes to server1 and if it requires some more heap memory to load data, in this scenario can server1 use serve3’s heap memory?

Is there any mechanism/product which allows us to share heap across all the servers? OR Is there any other way to handle large heap requirement issue?


Thanks,
Atul
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12761
    
    5
Memory used by one JVM can not be seen by another one on another server so a shared heap is out of the question.

Are you really sure that processing a single request requires the entire heap?

Sharing large amounts of data is commonly done with a database.

Bill
Atul Prajapati
Greenhorn

Joined: Oct 24, 2005
Posts: 7
Thanks for your reply.

Let us try distributed cache.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12761
    
    5
When you get that working, it would be great if you could follow up with a post outlining how you did it.

Bill
Gupta Tarun
Greenhorn

Joined: Sep 16, 2010
Posts: 22

Please check if something like Terracotta (http://www.terracotta.org) solves your problem

Regards
Tarun
Atul Prajapati
Greenhorn

Joined: Oct 24, 2005
Posts: 7
Yes Tarun we are planning to try EHcache with Terracotta/Big Memory.

I will update this thread once we are done with this.

Thanks,
Atul
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to handle large heap requirement
 
Similar Threads
Test 252: Mock exam
Passing an object from one server to another
Suggestion for filter saving
HttpServletRequest , HttpServletSession are they serializable
How to copy datas in RAM to harddisk before the server shutdown?