• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

How LRT2 and Java deal with memory

Offline
#1 Gunther
Every Java Program relies on the "Java Virtual Machine". So it lives in a Sandbox created by java. Java reserves a certain amount of memory for this sandbox. There is an initial amount and a maximum amount.

These settings are passed to the virtual machine when launching LRTimelapse.

The problem is, that we have to deal with machines with huge amount of RAM and with ones with small available RAM. Another problem is that Mac and PC behave a little bit different when dealing with Java-Memory allocation.

  1. On Mac: See http://forum.lrtimelapse.com/Thread-lrti...art-on-mac for some information how to increase allocated memory on mac.

  2. On windows: For LRT2 there are different launchers in the Start-Menu/LRTimelapse.

    The default launcher initially reserves 30% of tthe memory that is free when launching LRTimelapse and goes up to 90% (this is a compromise to be able to serve all machines). So if you have for example Lightroom started and a lot of other programs when launching LRT2 probably not much memory is reserved (see the memory indicator on the top right of the LRT2 window).

    For people that have machines with lots of RAM there is a "large memory" launcher. It will reserve between 2 and 4 GB of RAM. For people with few RAM there is an "1GB launcher" that will allocate no more than 1GB.

The difference to LRT1 is now that the memory display in LRT is more accurate reflecting what java does. And Java only releases Memory if it requires it. So after loading one large sequence, free memory goes down but you can still load several other sequences after that with no problem because Java will free memory if necessary.

I hope I could clarify the way Java and LRTimelapse deal with memory a bit.

If you work with large sequences I still recommend decreasing the preview size in the Settings and Shift Reload the sequence to rebuild the previews.
Subscribe to: LRTimelapse Newsletter, Youtube Channel, Instagram, Facebook.
Offline
#2 Ulli
The 2 to 4 GB reserved from the large memory launcher are only the initial reserved RAM and the amounbt will be increased if necessary? I'M a litte bit confused about that, because the maximum of 90% of the normal launcher would be much better in case of large memory?!?
Offline
#3 Gunther
Just use the launcher that suits your configuration best. You can see the Memory allocated in LRTimelapse.
Subscribe to: LRTimelapse Newsletter, Youtube Channel, Instagram, Facebook.
Offline
#4 Phil Hart
I think Ulli's question is a good one as I am struggling with the same issue.

I have a new Windows 7 PC with 32GB RAM, but can't get Java/LR Timelapse to use more than ~3.2GB, whether I use the 'Large Memory' version or the default. Even with Image Preview Size set to 150*100px, I am still getting out of memory warnings (and LR Timelapse shows 0 memory free) although it does keep working so far (on an all night sequence of ~5000 images).

Windows Resource Monitor also shows Java not going above ~3.2GB (private memory use) but with ~20GB free memory available.

I tried setting -Xmx8G in the Java control panel to increase max memory heap for Java but that has not made any difference. It appears that 3.2GB is a maximum setting determined by LR Timelapse, but for a machine with lots of memory there is plenty of scope to go higher.

Phil
Offline
#5 Gunther
Phil, have you installed the 64 bit Java Runtime?
You can get it here: http://www.java.com/en/download/manual.jsp

Make sure to uninstall the other java environments before.
Subscribe to: LRTimelapse Newsletter, Youtube Channel, Instagram, Facebook.
Offline
#6 Phil Hart
Yes.. I uninstalled Java and reinstalled today making sure to download the 64 bit version.

(2012-08-25, 09:16)gwegner Wrote: Phil, have you installed the 64 bit Java Runtime?
Offline
#7 Gunther
And your memory-allcation still doesn't get higher?
If so please try launching via the CMD file in the LRT2 program directory. Edit it before to set the memory demands there. Does that help?
Subscribe to: LRTimelapse Newsletter, Youtube Channel, Instagram, Facebook.
Offline
#8 Phil Hart
(2012-08-25, 09:42)gwegner Wrote: And your memory-allcation still doesn't get higher?
If so please try launching via the CMD file in the LRT2 program directory. Edit it before to set the memory demands there. Does that help?

Well I've upgraded to LR2 beta 3 and now it's very hard to get LRT to need more than 2-3GB of memory so the problem has gone away. whatever you've changed on the previews/memory management side of things certainly seems to be working!

Phil
Offline
#9 Gunther
Yes. The huge memory demand is fortunately history Wink
Subscribe to: LRTimelapse Newsletter, Youtube Channel, Instagram, Facebook.

...also check out: