Posted by
ctrueden on
URL: http://imagej.273.s1.nabble.com/Flush-clear-memory-in-ImageJ-Fiji-tp3682491p3682494.html
Hi Jay,
So does the typical FIJI launcher disable the java garbage collector?
>
No, there isn't really an alternative for managing memory inside the JVM.
But as Albert indicated there are lots of ways to tune
it<
http://www.oracle.com/technetwork/java/gc-tuning-5-138395.html>
.
Buying more RAM doesn't improve things if you are running 32-bit windows.
> Of course, perhaps I should buy a 64-bit machine, but I find it hard to
> require all of my users to buy such machines
>
Now that 64-bit is becoming ubiquitous and 8GB+ of RAM is commonplace,
you'll have a harder and harder time supporting older 32-bit OSes. Rule #6
of software programming: "Software expands to consume all available
resources." :-)
On a side note, I have experienced memory leaks/inefficient memory freeing
> with a recent version of LOCI even with using the garbage collector. These
> are especially problematic when opening leica files which require large
> amounts of RAM to browse, but not necessarily to load. One of my users
> could only open a few images before having to crash and restart ImageJ. I
> rolled back to the second most recent version and that seemed to fix things.
>
We would very much like to fix any memory leaks in Bio-Formats. Would you be
willing to send more specific details? Which kind of Leica files? How much
RAM did you have allocated? Which OS? Is it possible to reliably reproduce
with a macro or script on your systems? Which version do you mean by "second
most recent"?
Thanks,
Curtis
On Fri, Oct 21, 2011 at 11:52 AM, Unruh, Jay <
[hidden email]> wrote:
> So does the typical FIJI launcher disable the java garbage collector? In
> regular ImageJ I am typically successful in clearing out memory with the
> garbage collector. Buying more RAM doesn't improve things if you are
> running 32-bit windows. Of course, perhaps I should buy a 64-bit machine,
> but I find it hard to require all of my users to buy such machines or come
> to a central facility to process their images (In that case, many of them
> may opt out of ImageJ anyway).
>
> On a side note, I have experienced memory leaks/inefficient memory freeing
> with a recent version of LOCI even with using the garbage collector. These
> are especially problematic when opening leica files which require large
> amounts of RAM to browse, but not necessarily to load. One of my users
> could only open a few images before having to crash and restart ImageJ. I
> rolled back to the second most recent version and that seemed to fix things.
>
> Jay
>
> -----Original Message-----
> From: ImageJ Interest Group [mailto:
[hidden email]] On Behalf Of
> Albert Cardona
> Sent: Wednesday, October 19, 2011 11:44 AM
> To:
[hidden email]
> Subject: Re: Flush/clear memory in ImageJ/Fiji
>
> 2011/10/19 mjlm <
[hidden email]>:
> > Hi there,
> > Is there a way (e.g. a macro command) to clear out unused, but still
> > allocated memory in ImageJ (I'm using Fiji under Win7 64bit)? When I
> > open a large file and then close it, the memory used for that large
> > file is sometimes not cleared. When I then try to open another large
> > file, I get a warning of insufficient memory.
> >
> > I've tried to trigger Java garbage collection with
> > call("java.lang.System.gc"), but it didn't have any effect. My problem
> > usually occurs when opening large files using the LOCI tools.
>
>
> Matthias,
>
> launch the JVM with different flags. Fine-tuning the JVM is an art all by
> itself. Here are the parameters that worked for me, along with some
> explanations:
>
>
>
http://fiji.sc/wiki/index.php/TrakEM2#Running_fiji_for_heavy-duty.2C_memory-intensive.2C_high-performance_TrakEM2_tasks>
>
> Of course, the cheapest of all solutions is to buy more RAM.
>
> Albert
>
> --
>
http://albert.rierol.net>
http://www.ini.uzh.ch/~acardona/>