Memory settings added to help
[jalview.git] / help / html / memory.html
1 <html>\r
2 <head><title>Memory Settings</title></head>\r
3 <body>\r
4 <h2> \r
5   <center>\r
6     <strong>Memory Usage Settings for Jalview</strong> \r
7   </center>\r
8 </h2>\r
9 <p>Jalview sometimes runs out of memory. This is because of the way that Java \r
10   runs on a computer - what is actually run is a program called a virtual machine \r
11   (the JVM) which executes the java instructions. The JVM has limits on the memory \r
12   that can be allocated to the java program - and you might need to increase them \r
13   if you are working with particularly large datasets.<br>\r
14   If Jalview has not explicitly told you that it has run out of memory, then a \r
15   common sign is that a function that normally works seems to have no effect when \r
16   working with a larger set of sequences (this might include open dialog boxes \r
17   for saving PNG files, or when interpreting the result of a web service calculation).</p>\r
18 <p>The way you increase the memory settings for the JVM depends on which installation \r
19   of Jalview you use:</p>\r
20 <ul>\r
21   <li><em><font size="3">Web Start Version</font></em> \r
22     <p>JavaWS sets the JVM parameters through special tags in the JNLP file. You'll \r
23       need to make your own jnlp file and add the following parameter into the \r
24       &lt;resources&gt; element. \r
25     <pre>\r
26 &lt;j2se version="1.4+" initial-heap-size="500M" max-heap-size="1000M"/&gt;\r
27 </pre>\r
28     Save the jnlp file somewhere and then - if you start Jalview through your \r
29     web browser, point your browser at the file's url, othewise simply run javaws \r
30     with the file location as its argument. The file's url is something like :<br>\r
31     <pre>\r
32 file://&lt;full path to file&gt;\r
33 </pre>\r
34     If jalview doesn't start up, see <a href="#memsetting">below</a>. You'll have \r
35     to edit the above settings in the JNLP file using a text editor, save it, \r
36     and try starting Jalview with it once more. \r
37     <p></li>\r
38   <li><em><font size="3">Install Anywhere version</font></em> \r
39     <p> You need to change the InstallAnywhere configuration settings for the \r
40       application. These are found in different places depending upon which operating \r
41       system you have : \r
42     <ul>\r
43       <li><em>Unix/Windows</em> \r
44         <p> Take a look inside the Jalview program installation directory (this \r
45           might be in C:\Program Files\Jalview on windows). You should find a \r
46           file called 'Jalview.lax' in it - make a backup, and then add the following \r
47           lines to the end of the original file : \r
48         <pre>\r
49 lax.nl.java.option.java.heap.size.max=1000m\r
50 lax.nl.java.option.java.heap.size.initial=500m\r
51 </pre>\r
52         Case and (lack of) spaces are important here! Do not add any spaces after \r
53         the m in each line, and do not put any spaces before 'lax'.\r
54         <p></p>\r
55       </li>\r
56       <li><em>Mac OSX</em> \r
57         <p>The lines you need to change are in the <em>Info.plist</em> file inside \r
58           the <em>Jalview.app/Contents</em> directory (which is where the installAnywhere \r
59           installation was made) : \r
60         <pre>\r
61 &lt;key&ht;VMOptions&lt;/key&ht;\r
62 &lt;array&gt;\r
63 ! &lt;string&gt;-Xms2M&lt;/string&gt;\r
64 ! &lt;string&gt;-Xmx64M&lt;/string&gt;\r
65 &lt;/array&gt;\r
66 </pre>\r
67         Exchange the above two string tags for : \r
68         <pre>\r
69 &lt;string&gt;-Xms500M&lt;/string&gt;\r
70 &lt;string&gt;-Xmx1000M&lt;/string&gt;\r
71 </pre>\r
72         <p></p>\r
73       </li>\r
74     </ul>\r
75   <li><font size="3"><em>In all cases</em></font><br>\r
76     Save the file and try to start Jalview in the normal way. If it doesn't start, \r
77     see below... </li>\r
78 </ul>\r
79 <font size="3"><em>Jalview doesn't start... What do the memory settings mean ?<a name="memsetting"></a></em></font> \r
80 <p> The 1000m value corresponds to the maximum number of megabytes of space that \r
81   java objects can occupy. The 500m is the initial heap size that java will run \r
82   in - increasing this can speed up memory allocation if you know you will need \r
83   500 meg of memory to begin with (ie it should speed up loading large alignments). \r
84 </p>\r
85 <p> If, after setting the initial and maximum heap size to some large value, you \r
86   cannot actually start Jalview, then the max and initial sizes are too big for \r
87   your machine (there seems to be a physical limit related to physical RAM - email \r
88   the usual address to enlighten us if you know better!). Our experiments found \r
89   1000m to be the biggest setting that could be used on a 1GB machine. Just try \r
90   reducing the sizes until Jalview starts up properly! </p>\r
91 <p>&nbsp;</p>\r
92 </body>\r
93 </html>\r