ddavisqa / google-refine

Automatically exported from code.google.com/p/google-refine
0 stars 0 forks source link

bad error message when giving -m less than 256M #388

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. ./refine -m 128M
2. Get error "incompatible min and max heap size" or something.

What is the expected output? What do you see instead?

I expected it to just work, even on my little machine. It didn't. I discovered 
the -m argument. I expected it to work, it didn't. I read the shell script and 
realized I had to hack it to lower the default 256M to 128M.

What version of Google Refine are you using?  r1836

What operating system and browser are you using? Linux, Firefox

Is this problem specific to the type of browser you're using or it happens
in all the browsers you tried? No

Original issue reported on code.google.com by jeff.al...@gmail.com on 22 May 2011 at 10:48

GoogleCodeExporter commented 9 years ago
Jeff, that error message is produced by the JVM. You're right that it would 
confuse some users. But I think lowering the memory to below 256M is a really 
rare case. I'd expect people to use the default of 1024M, and then increase it 
to handle larger data sets. I'm inclined to close this as "Won't Fix", unless 
there's any objection.

Original comment by dfhu...@gmail.com on 23 May 2011 at 2:07

GoogleCodeExporter commented 9 years ago
I had to lower the memory to even get it to start at all, and there was no 
useful warning message explaining why it was failing. Here's what would have 
helped me get started with refine without having to read the shell script and 
file this bug:

mem=`awk '/MemTotal/ {print $2}' /proc/meminfo 
if [ "$mem" -lt 768000 ]; then
  echo "Warning: your machine has less than 768 megs of RAM. Starting Refine in low memory mode (-m 256M). You probably won't be able to edit larger projects without out of memory errors."
  REFINE_MEMORY=256M
fi

Thanks,
  -jeff

PS: It does work ok with less memory, at least to work through tutorial-sized 
experiments.

Original comment by jeff.al...@gmail.com on 23 May 2011 at 3:26

GoogleCodeExporter commented 9 years ago
Also, just before running the jvm, there should me a check that REFINE_MEMORY 
is not below 256M, or else you get the confusing error message.

Original comment by jeff.al...@gmail.com on 23 May 2011 at 3:29

GoogleCodeExporter commented 9 years ago
I agree with David that this is an exceedingly rare use case and would support 
closing the bug report, but I'll leave it to him to make the final decision.

Original comment by tfmorris on 25 May 2011 at 5:25

GoogleCodeExporter commented 9 years ago
I don't think it is rare. Here's how to reproduce it:

a. use a laptop from 2005 with 500 megs of RAM and no swap configured
b. download refine
c. run it
d. it won't work with a strange error message about memory
e. discover -m argument, try with 128M because there's no help suggesting 
another number
f. get a different error that's also misleading

I REALLY REALLY had to want to run Refine to overcome that out of box 
experience. Others won't.

Here's a simpler proposed fix: make the help message for -m say, "values less 
than 256M are not allowed", then add the code to prevent them.

'Nuff said.

Original comment by jeff.al...@gmail.com on 25 May 2011 at 7:21

GoogleCodeExporter commented 9 years ago
One problem is parsing & detecting memory, in a portable way (OS X, Linux, 
etc): the JVM supports suffixes like "2G" in the -Xm[sx] parameters etc; OS X 
doesn't have /proc/meminfo; etc.

One compromise might be -m '' which turns off all the heap settings. There's 
some argument to say that that's a useful thing in any case. Setting the heap 
sizes doesn't do what a lot of people expect it to...

Certainly, a comment in the wiki page and usage message seems worthwhile.

Original comment by paulm%pa...@gtempaccount.com on 25 May 2011 at 10:01