X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=help%2Fhelp%2Fhtml%2Fmemory.html;h=ec57530a42f937fdf5387179d64e7ca4573710ef;hb=b8781bdce3e54b27102f53d1e3cb5fe2c9d27b6c;hp=9437a60e1c8619787181a43ddd8e1c51356099ba;hpb=44d68d55d9c85bf7b28853feeebc4b901c4a8392;p=jalview.git diff --git a/help/help/html/memory.html b/help/help/html/memory.html index 9437a60..ec57530 100755 --- a/help/help/html/memory.html +++ b/help/help/html/memory.html @@ -28,18 +28,22 @@ Memory Usage Settings for Jalview +
When launched as an Application, Jalview will automatically + configure the amount of memory allocated to the program to be 90% of + physical memory, or 32GB - which ever is smaller.
- Jalview sometimes runs out of memory. This is because of the way
- that Java runs on a computer - what is actually run is a program
- called a virtual machine (the JVM) which executes the java
- instructions. The JVM has limits on the memory that can be allocated
- to the java program - and you might need to increase them if you are
- working with particularly large datasets.
If Jalview has
- not explicitly told you that it has run out of memory, then a common
- sign is that a function that normally works seems to have no effect
- when working with a larger set of sequences (this might include open
- dialog boxes for saving PNG files, or when interpreting the result
- of a web service calculation).
+ This behaviour might not be ideal if you are working on a machine
+ that runs other memory intensive processes, and (since
+ Jalview 2.11.2) can be changed via the Startup Preferences panel.
+
+ Signs that Jalview is Running out of Memory
If
+ Jalview has not explicitly told you that it has run out of memory,
+ then a common sign is that a function that normally works seems to
+ have no effect when working with a larger set of sequences (this
+ might include open dialog boxes for saving PNG files, or when
+ interpreting the result of a web service calculation).
Jalview Memory Usage Monitor: If you are concerned about @@ -52,105 +56,104 @@ window's background.
- Increasing the memory available to Jalview
The way
- you increase the memory settings for the JVM depends on which
- installation of Jalview you use:
+ Increasing the memory available to Jalview
The
+ amount of memory allocated is defined wheb Jalview is launched
+ because of the way that Java runs on a computer - what is actually
+ run is a program called a Java virtual machine (a JVM) which
+ executes the java program instructions. The JVM has limits on the
+ memory that can be allocated to the java program - and it is often
+ necessary to adjust them if you are working with particularly large
+ datasets, or need to make room for other processes on the machine.
+
Jalview 2.11 includes a launcher that automatically
+ configures the proportion of memory allocated to Jalview's JVM. By default it requests up to 90% of available memory whilst ensuring that at least 0.5G is available to the operating system and at least 0.5G is available to the Java runtime platform, or a specified 'maximum memory limit' - which ever is smaller. The amount of memory requested can be altered in a number of different ways:
- JavaWS sets the JVM parameters through special tags in the JNLP
- file. You can obtain a JNLP file with modified memory settings
- from our service with the following link (replace 2G with
- desired memory in G or M):
http://www.jalview.org/services/launchApp?jvm-max-heap=2G
-
- Alternatively, if you want to create your own JNLP file then - please download the latest JNLP file from http://www.jalview.org/webstart/jalview.jnlp - and modify the max-heap-size parameter for the j2se tag in the - <resources> element. e.g. -
-<j2se version="1.7+" initial-heap-size="500M" max-heap-size="1000M"/> -In both cases, you should save your new jnlp file somewhere and then - either point your web browser at the file's url, launch it from - your file browser, or from a terminal window run javaws (located - in your Java installation's bin directory) with the file location - as its argument. The file's url is something like :
-file://<full path to file> -If Jalview doesn't start up, see below. - You'll have to edit the above settings in the JNLP file using a - text editor, save it, and try starting Jalview with it once more. -
You need to change the InstallAnywhere configuration - settings for the application. These are found in different - places depending upon which operating system you have : +
+ jalview.jvmmempc=50In Windows and in macOS you can then launch + Jalview by double clicking on this file, and your memory setting + will be used instead of the default value.
+ /PATH_TO_JALVIEW/Jalview /path/to/file/mymemorysetting.jvlIf you + want to use a memory setting like this and open a file you can use + both the jvl and alignment files as command line arguments, but + you must put the jvl file first, e.g.
+ /PATH_TO_JALVIEW/Jalview /path/to/file/mymemorysetting.jvl /path/to/alignments/myalignment.fa+ Alternatively, you can use the standard Jalview command line + arguments with or without the jvl file (first), e.g.
+ /PATH_TO_JALVIEW/Jalview /path/to/file/mymemorysetting.jvl -open https://www.jalview.org/examples/jpred_msa.fasta -annotations https://www.jalview.org/examples/jpred_msa.seq.concise -colour Clustal+ You can use command line arguments to control memory settings in + Windows and macOS too:
+ \PATH_TO_JALVIEW\Jalview.exe %HOMEPATH%\mymemorysetting.jvl -open %HOMEPATH%\myalignment.fa+ In macOS you can use the macOS open command like this:
+ open /Applications/Jalview.app --args ~/mymemorysetting.jvl -open ~/myalignment.fa(put + all the Jalview arguments after the --args parameter) +
jalview.jvmmemmax = 32G+ Adjusting this default (via a JVL file, above) will allow larger amounts (or can limit the amount) of memory to be allocated to Jalview in conjunction with the jalview.jvmmempc setting. +
java -jar jalview-all-2.11.1.0-j1.8.jar -jvmmempc=50 -jvmmemmax=20g+ (this example will launch Jalview with a maximum heap size of the smaller of 20GB or 50% of physical memory detected). +
+ -Xmx8gJalview binaries for Windows and macOS are distributed + with their own JVM which you will find in
Take a look inside the Jalview program installation - directory (this might be in C:\Program Files\Jalview on - windows). You should find a file called 'Jalview.lax' in it - - make a backup, and then add the following lines to the end - of the original file : -
-lax.nl.java.option.java.heap.size.max=1000m -lax.nl.java.option.java.heap.size.initial=500m -Case and (lack of) spaces are important here! Do not add any spaces - after the m in each line, and do not put any spaces before - 'lax'.
- The lines you need to change are in the Info.plist - file inside the Jalview.app/Contents directory - (which is where the installAnywhere installation was made) : - - -
-<key&ht;VMOptions</key&ht; -<array> -! <string>-Xms2M</string> -! <string>-Xmx64M</string> -</array> -Exchange the above two string tags for :
-<string>-Xms500M</string> -<string>-Xmx1000M</string> --
\PATH_TO_JALVIEW\release+
/Applications/Jalview.app/Contents/Resources/app/release+ and on linux or unix
/PATH_TO_JALVIEW/release+
+ java -Xmx1500m -cp "/PATH_TO_RELEASE_DIR/*" jalview.bin.Jalview +Or on Windows
+ java.exe -Xmx1500m -cp "\PATH_TO_RELEASE_DIR\*" jalview.bin.Jalview +Note: for this to work the classpath argument wildcard must be simply + a '*' and not '*.jar'.
- Please Note: We do modify the default memory settings in - Jalview from time to time, so you may find different numbers to - those shown in the examples above. -
- Jalview doesn't start... What do the - memory settings mean ? - -The 1000m value corresponds to the maximum number of megabytes - of space that java objects can occupy. The 500m is the initial heap - size that java will run in - increasing this can speed up memory - allocation if you know you will need 500 meg of memory to begin with - (ie it should speed up loading large alignments).
-If, after setting the initial and maximum heap size to some - large value, you cannot actually start Jalview, then the max and - initial sizes are too big for your machine (there seems to be a - physical limit related to physical RAM - email the usual address to - enlighten us if you know better!). Our experiments found 1000m to be - the biggest setting that could be used on a 1GB machine. Just try - reducing the sizes until Jalview starts up properly!
-- We increased the default memory in Jalview 2.10.5 to 1G. To launch - Jalview with the pre 2.10.5 default memory allocation, use the Jalview - 256MB JNLP. -
-