Increasing memory v1.6

2013-05-29
2013-08-07
  • Noel Williams
    Noel Williams
    2013-05-29

    I have 12GB of memory on my Mac Pro. I use huge files and to avoid 'out of memory' messages prior to v1.6 I could increase the memory allocated by editing a line in the file 'oj_linux.sh'.

    JAVA_MAXMEM=${JAVA_MAXMEM-Xmx6B}

    If I attempt to do this with v1.6 (including 1.63) the program will not run.

    Has something changed? Am I doing something wrong?

     
  • Hi
    I thought it should just work when you put:
    JAVA_MAXMEM=4012m
    for instance?
    What happened is that in the script the amount of memory that can be assigned is now calculated depending on existing ram and natural limits (= JVM support) - but if you set it to the same amount as in your previous 1.5.X version, then it should work (…I hope so at least?).

    stefan

     
  • Noel Williams
    Noel Williams
    2013-08-03

    I've gone back to using 1.52 for several months now, because I haven't found a way of increasing the memory allocation with 1.6 (including the latest build today). I have tried amending 'oj_linux.sh' in various ways
    e.g.
    JAVA_MAXMEM=4012m
    or
    JAVA_MAXMEM="-Xmx6G"
    or
    JAVA_MAXMEM=${JAVA_MAXMEM--Xmx6G}

    but in each case the program fails to run (no error message).

    Do you have any other suggestions? Why does increasing the memory allocation work without any problems for 1.52?

     
  • mentaer
    mentaer
    2013-08-03

    Hi,

    ok: first thing is you can not assign more memory then you have. Also I think Java has a limit for handling memory.
    But anyway: check for the line

    JAVA_MAXMEM=${JAVA_MAXMEM--Xmx512M}<
    and change it to
    JAVA_MAXMEM="-Xmx2048M"< you should have 2 GB assigned

    also, try to use your 1.52 oj_linux.sh file with 1.6; it should work as well.

     
  • Noel Williams
    Noel Williams
    2013-08-03

    Thanks for your suggestion. That's interesting. Some progress.

    Using JAVA_MAXMEM="-Xmx2048M" works fine, as does JAVA_MAXMEM="-Xmx2G".

    However if I increase this to 3GB or above it does NOT work.

    I have 12GB of RAM and currently 'Free Memory = 9GB'. Strange!

     
  • Noel Williams
    Noel Williams
    2013-08-03

    If I copy oj_linux.sh from 1.52 and put it into 1.6 it does NOT work.

    1.52 works fine with JAVA_MAXMEM="-Xmx6G"

     
  • mentaer
    mentaer
    2013-08-06

    Ok, I asked our start-up script specialist and got this answer:

    "run it with a 64bit jre. oj_macos.command currently enforces 32bit mode. disable that and it should be possible.

    ..ede"

     
  • Noel Williams
    Noel Williams
    2013-08-07

    YES!
    In file 'oj_macosx.command' I commented out the line
    JAVA_OPTS_OVERRIDE="$JAVA_OPTS_OVERRIDE -d32"

    and it all works perfectly with JAVA_MAXMEM="-Xmx6G"

    A huge 'thank you'. You've made my day.