Jump to content

Admin Console - Java Settings


jwagner010
Go to solution Solved by MrBill,

Recommended Posts

  • Solution

After reading a stack overflow thread I decided to try using both.  (I don't have the link handy now but will try and locate it later).  Both seems to make startup noticeably faster for me.

-xms = selects the initial memory allocated

-xmx = selects the maximum that can be allocated.

What i wish I knew, was how much the admin console uses regularly.  I'm not smart enough (yet) to know how to see the amount of memory actually being used.

  • Like 1
Link to comment
59 minutes ago, MrBill said:

What i wish I knew, was how much the admin console uses regularly.  I'm not smart enough (yet) to know how to see the amount of memory actually being used.

On my iMac (Apple M1 chip running macOS Ventura 13.2) the Activity Monitor app reports that the ISY Launcher is using 1.81 GB of memory, using more memory than any other app on this system.

EDIT: That's the running footprint for the AC, not the startup values for the Java app that launches it.

Edited by Bumbershoot
Link to comment

Here's my notes on the subject. Can't remember where they came from.

JAVA runtime parameter, increased memory block
 -Xmx512m
Xmx sets the maximum memory heap size.
Xms sets the minimum memory heap size.


So doing -Xmx1024m -Xms128m should work.

-Xmsn
                Specify the initial size, in bytes, of the memory allocation
                pool. This value must be a multiple of 1024 greater than 1MB.
                Append the letter k or K to indicate kilobytes, or m or M to
                indicate megabytes. The default value is chosen at runtime
                based on system configuration. For more information, see
                HotSpot Ergonomics
                Examples:

                       -Xms6291456
                       -Xms6144k
                       -Xms6m

 -Xmxn
                Specify the maximum size, in bytes, of the memory allocation
                pool. This value must a multiple of 1024 greater than 2MB.
                Append the letter k or K to indicate kilobytes, or m or M to
                indicate megabytes. The default value is chosen at runtime
                based on system configuration. For more information, see
                HotSpot Ergonomics
                Examples:

                       -Xmx83886080
                       -Xmx81920k
                       -Xmx80m
 

Link to comment
15 minutes ago, vbphil said:

HotSpot Ergonomics

Oracle JAVA Ergonomics

After reading up on this it's probably best, for me, to just leave it alone. I don't suspect I have an issue with Java garbage only that I'd rather have a dedicated Windows program instead of a Java app. 🙂

Task Manager shows 407.7 MB memory consumed for the Universal Devices Administrative Console. I have 16 GB of ram, so the Oracle Java Ergonomics probably knows best on what to do.

Link to comment
2 hours ago, vbphil said:

Java garbage

Java allocates a workspace of a size that I'm not sure how is determined, it's hard to find documentation on this for Java 8.  The two parameters specify the Initial size and the maximum size.  if there isn't enough space to work with in RAM Java will swap to a swap file in /tmp. 

Specifying the -xmx or max size is likely an override to the default max size determined somewhere... thus allowing more to stay in memory, less swap file use, and by nature of that less garbage collection.

-xms is the starting size of the buffer, which might also be the minimum size because i'm not certain that it would ever shrink below the starting size.

With no parameters the admin console might be slow or freeze because the loaded admin console might be quite large.  We need to realize at this point that the loaded admin console will be a different size for everyone and that the more devices a person has the larger it will be be.  Likewise those of us who use long naming conventions eat more memory.  If java allocates too small of a working memory and doesn't think it can upsize it the results will be slow because it has to use a swapfile.

if we increase the maximum size, that's probably enough eliminate the slowness and freezing, because it will make the buffer bigger as it needs to up the max size of the 512m or 1024m as set by -Xmx.  On the other hand if it has to keep making the buffer bigger as the ISY is loading it values that likely makes the process slow.

therefor when we use -Xms to specify a starting or minimum size we allocate a giant area of memory and java can just use it without having to do any rearranging. 

My laptap has 16gb of memory and windows is really using more than half.  As a result I have no issue creating a 1gb or 1024m block of memory for the admin console to use.  

I'm not sure we can determine the size needed tho based on what the task manager or activity manager says is being used.. because we don't know the size of the swap file that's also being used.

i can't seem to find the exact stack overflow thread i read on this topic...

Link to comment
Guest
This topic is now closed to further replies.

×
×
  • Create New...