Can Java handle this much data?

Reply

Join Date: Jul 2008
Posts: 49
Reputation: OffbeatPatriot is an unknown quantity at this point 
Solved Threads: 0
OffbeatPatriot OffbeatPatriot is offline Offline
Light Poster

Can Java handle this much data?

 
0
  #1
22 Days Ago
To keep things simple I have a spreadsheet that lists x and y values. I'm not sure how many of these data points there are but 13.5 million is a safe lower bound. Anyway, I wrote a program to parse this file and plot the points in jfreechart and the program ran out of memory.

I tried messing with the heap size, I have 4GB of RAM so I tried passing -Xms1024m -Xms2048m to java and was told it couldn't allocate that much space, I then halved those values and the program ran, didn't run out of memory, but the chart kind of just showed it's window border and I got that weird effect were the chart moved but didn't erase it's old position when I moved it(basically the program broke).

I could do all this fine in C so I'm wondering if I should just go back to it. Another thing is that I'd like to let less computer savvy people use this program and I doubt that they would want to mess with Heap Sizes, or use the command line. So can I adjust the heap from within the program(set the heap at the start of the main method or let the user set the heap through a dialog box)?
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 2,612
Reputation: adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of 
Solved Threads: 464
Moderator
adatapost's Avatar
adatapost adatapost is offline Offline
Posting Maven
 
1
  #2
22 Days Ago
You may increase to 4GB on a 32 bit system. If you are on a 64 bit system you can go higher.

use the cmd-line flags.

>java -Xmx6144M -d64
Failure is not fatal, but failure to change might be. - John Wooden
Reply With Quote Quick reply to this message  
Reply

Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC