[Solved] High memory usage?

Beta release announcements and discussion around them
Post Reply
silversword
Posts: 24
Joined: Sat Aug 27, 2016 8:53 pm

Wed Sep 07, 2016 9:55 pm

1.3GB+ seems a little high, is this just java bloat or something else?

Image
User avatar
Tomas
Posts: 1206
Joined: Sat Jun 25, 2016 12:33 pm

Wed Sep 07, 2016 10:32 pm

Here is how that works:

In Java, a software package can specify its memory limitations, or it can use the default ones provided by the JVM installed.
In case of x86 Oracle JVM, that is 1GB. In case of x64 Oracle JVM, default max memory usage is 4GB.
By default, Unimus will use these pre-defined limitations set by the JVM.

So why is Unimus using this much memory? Basically, because Java.
The philosophy is that if all the stuff you need is in memory, the application is faster (or course, at the expense of memory usage). This basically means that the garbage collector is not executed by the JVM until memory consumption of the application gets close to the limit, or until system memory starts running out.
So the actual RAM utilization of Unimus will depend on how many devices you have, how often you run backups, etc. - basically on how utilized the software is.

Now you can influence all of this. You can create a file named "Unimus.l4j.ini" for "Unimus.exe" (this is for running in .exe mode, its different for .jar and .war modes). If the .exe is named differently, the .l4j.ini name needs to be adjusted.
In this file, you can specify RAM limitations for Unimus. For example:

Code: Select all

-Xms128m
-Xmx768m
This would assign 128MB of RAM to Unimus from the start, and allow it to only grow to 768MB of RAM utilization (you might see more usage in Task Manager, due to JVM overhead).

There is of course a trade-off, the less RAM you assign to Unimus, the more often the garbage collector will need to run, which will increase the CPU utilization.
Also if you assign too little memory, the application can crash with "not enough memory" errors.

Hope that answers it :)

EDIT: we have added a Wiki article that provides more details:
https://wiki.unimus.net/display/UNPUB/C ... mory+usage
Post Reply