Clearing memory on shell-launched IGV

319 views
Skip to first unread message

zak....@gmail.com

unread,
Oct 29, 2015, 5:48:22 PM10/29/15
to igv-help
I'm using IGV2.3.52 under Ubuntu, launching the program using igv.sh
When viewing bam files, I soon run out of memory (and get the memory error message) when viewing multiple loci, one after the other, as if IGV was unable to clear the cache from the previous views.
How can I clear the memory so that only the currently viewed region is stored?

Thanks

Jim Robinson

unread,
Oct 29, 2015, 5:59:45 PM10/29/15
to igv-...@googlegroups.com
Hi,

First try updating to the latest release and let us know if that resolves the problem.   Clicking the "refresh" icon on the toolbar should release all objects not in view, but you should not have to do that.

Jim
--

---
You received this message because you are subscribed to the Google Groups "igv-help" group.
To unsubscribe from this group and stop receiving emails from it, send an email to igv-help+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/igv-help/50d9f054-a842-4e01-a38f-48ffebc7f352%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

zak....@gmail.com

unread,
Oct 29, 2015, 6:35:51 PM10/29/15
to igv-help
Thanks for the reply. Just tried the development snapshot (because of the range indicator missing in v61) and getting the same problem. Actually even with the refresh button.
I also double checked that the previous views are in memory by going back to them and most of them load instantly, suggesting they are still in memory..

Jim Robinson

unread,
Oct 29, 2015, 6:40:15 PM10/29/15
to igv-...@googlegroups.com
That shouldn't be happening, unless the loci are very close to each other.    Could you send me the following details

(1) How much memory are you starting with,  this is controllable by editing igv.sh.   You can attach it if you aren't sure.
(2) What do you have loaded besides a bam file, including what reference genome? 
(3) There is a memory indicator in the lower right corner, what does it say before you have loaded any files?
(4) Have you modified any user preferences.   You can attach the file "prefs.properties" if you aren't sure.

zak....@gmail.com

unread,
Oct 29, 2015, 6:51:13 PM10/29/15
to igv-help
Thanks, I think I solved it. I didn't know that the default setting for memory was only 2 GB. I increased it to 15 GB in igv.sh and now the problem seems to have gone away.
The memory indicator in bottom right doesn't show 15 GB but the reads load correctly now.

Many thanks,
Jerry

Jim Robinson

unread,
Oct 29, 2015, 6:57:05 PM10/29/15
to igv-...@googlegroups.com
Well, its still curious because 2GB should be enough for most situations.   I will up the default to 4 for the next release,  it has most machines now come with substantially more than 2GB.

The memory setting is the max Java is allowed to allocate, so it will not start with 15GB.   There is another setting to tell it how much to initially allocate. 

You'll note there are 2 numbers in the lower right, the first is how much memory is actually being used.   The second is how much the Java process has allocated from the OS.  

Jim

zak....@gmail.com

unread,
Oct 29, 2015, 7:05:05 PM10/29/15
to igv-help
I think that might be just because my bam files are quite large - each one is about 10 GB and I was viewing 6 of them. So quite likely the memory requirement for certain highly covered genes exceeded 2 GB. I'm looking at one right now which is using 2,113 MB of 4,290 MB allocated. However this upper range does change each time I change the view so the Java memory allocation seems dynamic..

Thanks,
Jerry

Jim Robinson

unread,
Oct 29, 2015, 7:09:23 PM10/29/15
to igv-...@googlegroups.com
OK, yes 2GB is maybe not enough for that.   I'm still concerned that old views were not releasing memory.   I need to review the code for that.    If you allocate 15 GB both of those numbers might continue to grow until that limit is reached, because Java will not see any need to garbage collect.   Hitting the refresh button forces a garbage collection,  which should reduce the memory if there is anything that can be "thrown away".

Jim Robinson

unread,
Oct 29, 2015, 7:13:42 PM10/29/15
to igv-...@googlegroups.com
BTW, I just opened a git issue re the original report, because I still
think there might be an issue there. You can follow it here if you like

https://github.com/igvteam/igv/issues/178


Reply all
Reply to author
Forward
0 new messages