NOTICE! This is a static HTML version of a legacy Fiji BugZilla bug.

The Fiji project now uses GitHub Issues for issue tracking.

Please file all new issues there.

Bug 305 - Memory value in ijm.cfg file is ignored - it is always 758MB
Memory value in ijm.cfg file is ignored - it is always 758MB
Status: RESOLVED FIXED
Product: Fiji
Classification: Unclassified
Component: ImageJ1
unspecified
PC Windows
: P1 critical
Assigned To: Johannes Schindelin
Depends on:
Blocks:
 
Reported: 2011-05-04 15:34 CDT by Sebastian Rhode
Modified: 2012-01-05 23:58 CST
0 users

See Also:

Description Sebastian Rhode 2011-05-04 15:34:43 CDT
Start Fiji and enter 1532MB for the memory.
Check ijm.cfg file --> "-Xmx1532m"  -->  OK
Restart Fiji and check the ijm.cfg file again --> still -Xmx1532m --> OK
Check the availbale memory under Edit/Options/ Memory & Threads --> Maximum Memory is 758MB
recheck the ijm.cfg file --> "-Xmx758MB" --> the value was changed.

The system has much more Memory available (4GB), so 1532MB should work.
What confues me, inside the information below, it says

os.name = WindowsXP - but the system is Windows7 Ultimate SP1 with 8 cores.

Cheers,  Sebi 


Information about your version of Java - this information is useful for the Fiji developers:

  os.arch => x86
  os.name => Windows XP
  os.version => 5.1
  java.version => 1.6.0_24
  java.vendor => Sun Microsystems Inc.
  java.runtime.name => Java(TM) SE Runtime Environment
  java.runtime.version => 1.6.0_24-b07
  java.vm.name => Java HotSpot(TM) Client VM
  java.vm.version => 19.1-b02
  java.vm.vendor => Sun Microsystems Inc.
  java.vm.info => mixed mode
  java.awt.graphicsenv => sun.awt.Win32GraphicsEnvironment
  java.specification.name => Java Platform API Specification
  java.specification.version => 1.6
  sun.cpu.endian => little
  sun.desktop => windows
  file.separator => \

The up-to-date check says: Up-to-date

Information relevant to JAVA_HOME related problems:

  JAVA_HOME is set to: C:\PROGRA~1\TILLPH~1\LIVEAC~1\Fiji/java/win32/jdk1.6.0_24/jre
  fiji.dir => C:\PROGRA~1\TILLPH~1\LIVEAC~1\Fiji

....

was too long to copy & paste it.
Comment 1 Johannes Schindelin 2011-05-05 09:39:51 CDT
On 32-bit Windows, you cannot reserve more than 2G (unless you reboot Windows into a special mode where you can use 3G). Often, not even 1.5G are possible due to user-space libraries fragmenting the address space. My guess is that this is happening on your side, and that Fiji is trying to restart reserving a smaller amount of memory. You should see a message to that end, at least when starting Fiji from the command-line with the option "--console".

Unless your CPU is 64-bit (in which case you can switch to fiji-win64), there is not much we can do, I am afraid...
Comment 2 Sebastian Rhode 2011-05-05 11:18:55 CDT
Hi Johannes,

i am not sure about your answer. We tried to serve 500MB or 1532MB or ...

The problem is, even so the entry inside the ijm.cfg file is changed, after the restart of Fiji, the old value 758MB was recoverd from somewhere ...

And today I tested on my on PC (WinXP 32 bit). There Fiji displays 1532MB. I tried to change it to 500MB, but no sucess.
After the restart I ended up with the 1532MB again. So We have no idea, where Fiji recovered this old value from?

Cheers,

Sebi
Comment 3 Sebastian Rhode 2011-05-05 11:37:36 CDT
Hi Johannes,

we tested an older Fiji (the orignal release for March). And there there it works fine. We can change the memory and it works. So something broko afterwards.
I also tried editing my FIJI shortcut to:

"C:\Programme\TILL Photonics\Live Acquisition\Fiji\fiji-win32.exe" --mem 1528m

And after starting FIJI we got 1524MB memory, which is fine.

Cheers, Sebastian
Comment 4 Johannes Schindelin 2011-05-05 12:11:08 CDT
Thanks for investigating further. Unfortunately, I lack the time to dive into that detail these days, so hopefully somebody else will be able to look into this.
Comment 5 Sebastian Rhode 2011-07-14 17:03:25 CDT
Hi,

since today my Fiji (up-to-date) is only able to allocate 896MB of memory and all attempts to change this do not work.
- I tried to set the memory bach to 1500MB (I use Windows XP with 3GB RAM) from inside FIJI --> no sucess, after the restart = 896MB
- I tried to edit the ijm.cfg file and restarted FIJI --> no sucess, 896MB
- and I tried to start FIJI from the command line " ...\Fiji\fiji-win32.exe --mem=1500m --< but no sucess, after the restart = 896MB

And now I ran out of ideas what the problem might be. A while ago I submitted a bug (ID 305). After doing that I added "--mem=1500m" to my FIJI shortcut. and that solution worked until yesterday. And now I am stuck with 896MB which is quite limiting for what I do. 
Comment 6 Johannes Schindelin 2011-07-14 18:16:04 CDT
Have you had a chance to start Fiji with the --console option? I am pretty certain that it tries to reserve as much heap as you ask it to, but fails, settling for less. Most likely another application got in the way and "fragments" the memory, i.e. disallows Java to use as much contiguous memory as it wants to.
Comment 7 Stephan Preibisch 2011-07-15 12:55:25 CDT
Hi Johannes,

I have the same problem under WindowsXP64 and Windows7-64, he simply ignores the memory settings, for example I also cannot set it to a lower value than the default one ...


Comment 8 Sebastian Rhode 2011-07-15 13:13:41 CDT
Hi,

i tried some things to pin down the problem.

- I shut down all unnecessary windows applications.
- I downlodead the FIJI relaese from the homepage and started Fiji --> 1532MB are the limit --> OK
- I ran FijiĀ“s updater --> end up with ImageJA 1.45k and all plugins updated --> 1148MB limit is now the limit

So a change within Fiji itself causes the decreased memory allocation?

And I started my normal ImageJ (ImageJA 1.45k) and end up with 1532MB limit, which is fine.

Hope this helps a bit.

Sebi
Comment 9 Johannes Schindelin 2011-07-15 13:33:39 CDT
What does --console --dry-run show?
Comment 10 Sebastian Rhode 2011-07-15 14:06:21 CDT
Hi,

i found out some more things. When I start Fiji via:

...\Fiji\fiji-win32.exe --system

the memory limit is 1532MB, which is fine. And to my knowledge the --system option forces fiji to use the installed windows JVM, which is 1.6.0_22. And my Fiji uses 1.6.0_24.

By the way, the update java option from the updater gives me an error:

Could not find form of method 'post' in http://oracle.com/technetwork/java/javase/downloads/index.html

Cheers,

Sebi
Comment 11 Sebastian Rhode 2011-07-18 09:30:32 CDT
-- console --dry-run shows:

C:\Programme\TILL Photonics\Live Acquisition\Fiji>javaw -Dpython.cachedir.skip=true -Dplugins.dir=C:
\\LIVEAC~1\\Fiji -Xmx1536m -Xincgc -XX:PermSize=128m -Djava.class.path=C:\\PROGRA~1\\TILLPH~1\\LIVEA
jar;C:\\PROGRA~1\\TILLPH~1\\LIVEAC~1\\Fiji/jars/ij.jar -Dsun.java.command=Fiji -Dfiji.dir=C:\\PROGRA
~1\\Fiji -Dfiji.defaultLibPath=bin/client/jvm.dll -Dfiji.executable=fiji-win32.exe -Djava.library.pa
LPH~1\\LIVEAC~1\\Fiji/lib/win32 -Dsun.java2d.noddraw=true fiji.Main -port7
Comment 12 Johannes Schindelin 2011-10-20 02:33:22 CDT
I just fixed this in commit http://fiji.sc/cgi-bin/gitweb.cgi?p=fiji.git;a=commitdiff;h=313b2b70a665b00c5c273c54cf026b085512525b

Please download http://fiji.sc/snaps/fiji-win32.exe (or fiji-win64.exe) and test.
Comment 13 Johannes Schindelin 2012-01-05 23:58:53 CST
Ah, no complaints in over a month! That surely means that the bug is fixed.