Strabon
changeset 879:47b0fb531588
changed option -MM to take an argument MULT that specifies a multiple of ${BASE_MEMORY} (currrently 1024).
use it as follows: strabon -MM 3 query size
The above will execute strabon with java heap size up to 3072 MB
use it as follows: strabon -MM 3 query size
The above will execute strabon with java heap size up to 3072 MB
author | Babis Nikolaou <charnik@di.uoa.gr> |
---|---|
date | Fri Feb 22 19:28:42 2013 +0200 (2013-02-22) |
parents | cdfe73ee5c85 |
children | 0a6878442590 66d551b85cd6 |
files | scripts/strabon |
line diff
1.1 --- a/scripts/strabon Fri Feb 22 18:36:24 2013 +0200 1.2 +++ b/scripts/strabon Fri Feb 22 19:28:42 2013 +0200 1.3 @@ -71,15 +71,15 @@ 1.4 # further options for java 1.5 JAVA_OPTS= 1.6 1.7 +# base max memory memory 1.8 +BASE_MEMORY=1024 1.9 + 1.10 # more memory 1.11 MORE_MEMORY="-Xms512M -Xmx1024M" 1.12 1.13 # much more memory 1.14 MMORE_MEMORY="-Xms512M -Xmx1536M" 1.15 1.16 -# much much more memory 1.17 -MMMORE_MEMORY="-Xms512M -Xmx3072M" 1.18 - 1.19 # flag for not setting the memory limit more than once 1.20 MEMORY_INCREASED=false 1.21 1.22 @@ -108,9 +108,9 @@ 1.23 echo " -d : don't run, just print what shall be executed" 1.24 echo " Variable for configuration file: \`DEBUG'" 1.25 echo " Values: \`true' or \`false'" 1.26 - echo " -m : use more memory \`${MORE_MEMORY}' (useful in \"out of memory exceptions\"" 1.27 - echo " -M : use much more memory \`${MMORE_MEMORY}' (useful in \"out of memory exceptions\"" 1.28 - echo " -MM : use much much more memory \`${MMMORE_MEMORY}' (useful in \"out of memory exceptions\"" 1.29 + echo " -m : use more memory \`${MORE_MEMORY}' (useful in \"out of memory exceptions\")" 1.30 + echo " -M : use much more memory \`${MMORE_MEMORY}' (useful in \"out of memory exceptions\")" 1.31 + echo " -MM MULT : use MULT * ${BASE_MEMORY} MB of memory (useful in \"out of memory exceptions\")" 1.32 echo " -i : include URI prefixes in the SPARQL query. Prefixes are taken from file" 1.33 echo " \`prefixes.sparql'" 1.34 echo " -e DATABASE : the database engine to connect (one of \`postgis' (default) or \`monetdb')" 1.35 @@ -227,8 +227,15 @@ 1.36 shift 1.37 ;; 1.38 -MM) 1.39 + shift 1.40 + if ! test $# -gt 1; then 1.41 + help 1.42 + exit 1 1.43 + fi 1.44 + MULT=${1} 1.45 + 1.46 if ! ${MEMORY_INCREASED}; then 1.47 - JAVA_OPTS="${JAVA_OPTS} ${MMMORE_MEMORY}" 1.48 + JAVA_OPTS="${JAVA_OPTS} -Xms512M -Xmx$((${MULT}*${BASE_MEMORY}))M" 1.49 MEMORY_INCREASED=true 1.50 else 1.51 echo "${CMD}: memory has already been increased; option \`${1}' will be ignored."