JAL-3224 JAL-3225 Fixed help image mangling, moved help to help/help and added this...
[jalview.git] / help / help / html / memory.html
1 <html>
2 <!--
3  * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
4  * Copyright (C) $$Year-Rel$$ The Jalview Authors
5  * 
6  * This file is part of Jalview.
7  * 
8  * Jalview is free software: you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License 
10  * as published by the Free Software Foundation, either version 3
11  * of the License, or (at your option) any later version.
12  *  
13  * Jalview is distributed in the hope that it will be useful, but 
14  * WITHOUT ANY WARRANTY; without even the implied warranty 
15  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
16  * PURPOSE.  See the GNU General Public License for more details.
17  * 
18  * You should have received a copy of the GNU General Public License
19  * along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
20  * The Jalview Authors are detailed in the 'AUTHORS' file.
21  -->
22 <head>
23 <title>Memory Settings</title>
24 </head>
25 <body>
26   <h2>
27     <center>
28       <strong>Memory Usage Settings for Jalview</strong>
29     </center>
30   </h2>
31   <p>
32     Jalview sometimes runs out of memory. This is because of the way
33     that Java runs on a computer - what is actually run is a program
34     called a virtual machine (the JVM) which executes the java
35     instructions. The JVM has limits on the memory that can be allocated
36     to the java program - and you might need to increase them if you are
37     working with particularly large datasets.<br> If Jalview has
38     not explicitly told you that it has run out of memory, then a common
39     sign is that a function that normally works seems to have no effect
40     when working with a larger set of sequences (this might include open
41     dialog boxes for saving PNG files, or when interpreting the result
42     of a web service calculation).
43   </p>
44   <p>
45     <em>Jalview Memory Usage Monitor</em>: If you are concerned about
46     memory, or think that things might be behaving strangely because of
47     a shortage of memory, then you can check this by enabling the memory
48     usage monitor. This is done by selecting the <strong>Tools&#8594;Show
49       Memory Usage</strong> option. Once enabled, the memory usage monitor
50     displays the currently available memory, the total memory, and the
51     percentage free at the bottom left hand side of the Jalview Desktop
52     window's background.
53   </p>
54   <p>
55     <em>Increasing the memory available to Jalview</em><br> The way
56     you increase the memory settings for the JVM depends on which
57     installation of Jalview you use:
58   </p>
59   <ul>
60     <li><em><font size="3">Web Start Version</font></em>
61       <p>
62         JavaWS sets the JVM parameters through special tags in the JNLP
63         file. You can obtain a JNLP file with modified memory settings
64         from our service with the following link (replace 2G with
65         desired memory in G or M):<br /> <a
66           href="http://www.jalview.org/services/launchApp?jvm-max-heap=2G">http://www.jalview.org/services/launchApp?jvm-max-heap=2G</a>
67       </p>
68       <p>
69         Alternatively, if you want to create your own JNLP file then
70         please download the latest JNLP file from <a
71           href="http://www.jalview.org/webstart/jalview.jnlp">http://www.jalview.org/webstart/jalview.jnlp</a>
72         and modify the max-heap-size parameter for the j2se tag in the
73         &lt;resources&gt; element. e.g.
74       <pre>
75 &lt;j2se version="1.7+" initial-heap-size="500M" max-heap-size="1000M"/&gt;
76 </pre> In both cases, you should save your new jnlp file somewhere and then
77       either point your web browser at the file's url, launch it from
78       your file browser, or from a terminal window run javaws (located
79       in your Java installation's bin directory) with the file location
80       as its argument. The file's url is something like :<br> <pre>
81 file://&lt;full path to file&gt;
82 </pre> If Jalview doesn't start up, see <a href="#memsetting">below</a>.
83       You'll have to edit the above settings in the JNLP file using a
84       text editor, save it, and try starting Jalview with it once more.
85       </p></li>
86     <li><em><font size="3">Install Anywhere version</font></em>
87       <p>You need to change the InstallAnywhere configuration
88         settings for the application. These are found in different
89         places depending upon which operating system you have :
90       <ul>
91         <li><em>Unix/Windows</em>
92           <p>Take a look inside the Jalview program installation
93             directory (this might be in C:\Program Files\Jalview on
94             windows). You should find a file called 'Jalview.lax' in it
95             - make a backup, and then add the following lines to the end
96             of the original file :
97           <pre>
98 lax.nl.java.option.java.heap.size.max=1000m
99 lax.nl.java.option.java.heap.size.initial=500m
100 </pre> Case and (lack of) spaces are important here! Do not add any spaces
101           after the m in each line, and do not put any spaces before
102           'lax'.<br> Also there MUST be a carriage return after the
103           final line.
104           <p></p></li>
105         <li><em>Mac OSX</em>
106           <p>
107             The lines you need to change are in the <em>Info.plist</em>
108             file inside the <em>Jalview.app/Contents</em> directory
109             (which is where the installAnywhere installation was made) :
110
111           
112           <pre>
113 &lt;key&ht;VMOptions&lt;/key&ht;
114 &lt;array&gt;
115 ! &lt;string&gt;-Xms2M&lt;/string&gt;
116 ! &lt;string&gt;-Xmx64M&lt;/string&gt;
117 &lt;/array&gt;
118 </pre>Exchange the above two string tags for : <pre>
119 &lt;string&gt;-Xms500M&lt;/string&gt;
120 &lt;string&gt;-Xmx1000M&lt;/string&gt;
121 </pre>
122           <p></p></li>
123       </ul>
124     <li><font size="3"><em>In all cases</em></font><br> Save
125       the file and try to start Jalview in the normal way. If it doesn't
126       start, see below...</li>
127   </ul>
128   <p>
129     <em>Please Note:</em> We do modify the default memory settings in
130     Jalview from time to time, so you may find different numbers to
131     those shown in the examples above.
132   </p>
133   <font size="3"><em>Jalview doesn't start... What do the
134       memory settings mean ?<a name="memsetting"></a>
135   </em></font>
136   <p>The 1000m value corresponds to the maximum number of megabytes
137     of space that java objects can occupy. The 500m is the initial heap
138     size that java will run in - increasing this can speed up memory
139     allocation if you know you will need 500 meg of memory to begin with
140     (ie it should speed up loading large alignments).</p>
141   <p>If, after setting the initial and maximum heap size to some
142     large value, you cannot actually start Jalview, then the max and
143     initial sizes are too big for your machine (there seems to be a
144     physical limit related to physical RAM - email the usual address to
145     enlighten us if you know better!). Our experiments found 1000m to be
146     the biggest setting that could be used on a 1GB machine. Just try
147     reducing the sizes until Jalview starts up properly!</p>
148   <p>
149     We increased the default memory in Jalview 2.10.5 to 1G. To launch
150     Jalview with the pre 2.10.5 default memory allocation, use the <a
151       href="http://www.jalview.org/webstart/jalview_256MB.jnlp">Jalview
152       256MB JNLP</a>.
153   </p>
154   <p>&nbsp;</p>
155 </body>
156 </html>