How to increase memory for Cytoscape
from Notes on memory consumption, Cytoscape User Manual
For users interested in loading large networks, the amount of memory needed by Cytoscape will increase. Memory usage depends on both number of network objects (nodes+edges) and the number of attributes. Here are some rough suggestions for memory allocation:
Suggested Memory Size Without View
Number of Objects (nodes + edges) |
Suggested Memory Size |
0 - 70,000 |
512M (default) |
70,000 - 150,000 |
800M |
Suggested Memory Size With View
Number of Objects (nodes + edges) |
Suggested Memory Size |
0 - 20,000 |
512M (default) |
20,000 - 70,000 |
800M |
70,000 - 150,000 |
1G |
Changing memory allocations on Windows, Mac, and Linux machines
Option A: Change memory allocation at command line startup
If you are opening Cytoscape from the command line using the command
java –Xmx512M –jar cytoscape.jar –p plugins
then you can increase the value of –Xmx to the desired amount of memory. For example:
java –Xmx800M –jar cytoscape.jar –p plugins
Option B: Change default memory allocation in cytoscape.bat (Windows systems)
- Open the cytoscape.bat file in a text editor (eg. right-click and select Open With Notepad).
- Increase the value of the –Xmx tag (found in the last line of the file), as per Option A. Do not modify other parts of the file.
- Save and close the file.
- Open Cytoscape by double-clicking on cytoscape.bat.
Option C: Change default memory allocation in cytoscape.sh (UNIX, Linux, and Mac OS X systems)
- Open the cytoscape.sh file in a text editor.
- Increase the value of the –Xmx tag (found in the last line of the file), as per Option A. Do not modify other parts of the file.
- Save and close the file.
- Open Cytoscape by running cytoscape.sh from the command line.
Option D: Change default memory allocation when launching Cytoscape from its icon (under construction)
- Open the cytoscape.lax file in a text editor.
- Increase the numerical value (bytes of memory) of the heap size and stack size lines. The original code looks like this:
lax.nl.java.option.java.heap.size.max=512000000
and
lax.nl.java.option.native.stack.size.max=512000000
Do not modify other parts of the file.
- Save and close the file.
- Open Cytoscape by double-clicking on the icon.