Question
Can you use the Java Xmx and Xms options to limit the amount of memory used by the local license server (LLS)?
Answer
By default, Java uses around 1/4th of system memory as a heap. The heap will grow up to that limit.
You should not compare 32-bit with 64-bit processes with regard to memory usage, as 32-bit processes cannot acquire memory more than 4GB (that is the limit). For example, it is not an adequate comparison to say a 64-bit JVM uses 8GB for x requests while a 32-bit JVM uses 4GB for x-thousand requests.
It is not required to set -Xmx in a production environment, but you could limit heap usage for your testing by supplying the -Xmx switch to Java, such as:
java -Xmx4g -jar flexnetls.jar
Here are the results of one such in-house experiment (all tests were run on a 64-bit JVM).
Set -Xmx to something reasonable, such as -Xmx2g or -Xmx4g.
For 10k requests:
- Without
-Xmxswitch: 1.8GB - With
-Xmx512m: 650MB
For 100k requests:
- Without
-Xmxswitch: 1.8GB - With
-Xmx512m: 791MB
Your numbers may vary, depending on the other factors like number of request per second, number of licenses requested etc.
NOTE: Please note that, -Xms limits the heap usage only, but there are other factors involved in the JVM, such as native components, gc, etc. Hence you would see extra memory usage apart from the enforced 512MB (which is normal). But the biggest one is JVM heap.
NOTE: Also, once the JVM acquires the memory, it may not release it (even after the server is idle). Releasing/acquiring memory is an expensive operation, so the JVM tends to hang on to the acquired memory for future use.
Additional Information
You may have some customers who indicate the RAM usage is much higher than 1/4 of the system memory. In those situations, setting the Xmx limit can help.
You can pass these types of Java arguments to the license server when it is running as a service. For example, you can use the EXTRA_SYSPROPERTIES variable in flexnetls.settings to set the maximum heap size to 4G by using:
EXTRA_SYSPROPERTIES="-Xmx4G"
From the Java docs, -Xmx sets the maximum heap size, but the application can use more memory than that.
Related Articles
Is There an Option For a Non-Java Local License Server? 5Number of Views ndtrack process may use a large amount of memory and /tmp filesystem space when gathering data from Oracle Databases with … 1Number of Views "Error in FNE Protocol: Null" While Checking Out License From LLS (server) using Java Client Kit 6Number of Views HTTPS Certificates for Evaluating and Testing the Local License Server 11Number of Views Reasons for the Local License Server to crash 4Number of Views
Hi, I am Reva - Ask me anything.
No new updates
Thanks for the feedback!
Your feedback has been saved.Rate this response:
Add Additional feedback ( Optional )
Are you sure you want to cancel
the case creation?
Are you sure you want to cancel the case creation?
Are you sure you want to close this case
| Products | Region | Phone Numbers |
|---|---|---|
| FlexNet Operations FlexNet Embedded FlexNet Publisher FlexNet Connect FlexNet Code Insight InstallAnywhere InstallShield |
North America * |
+1 630-332-2513 (toll) +1 877-279-2853 (toll-free in North America) |
| Europe * |
+44 1925 944367 (toll) +44 800 047 8642 (toll-free in Europe) |
|
| Japan * | +81 3-4540-5335 (select option 2) | |
| Australia * |
+61 3 9895 2177 +61 1800 560 603 (toll-free in Australia) |
|
|
Usage Intelligence (formerly
Revulytics) Compliance Intelligence |
Please use the Case Portal to submit your support ticket or reach out to your Revenera contact. | |
Revenera Assistant
Case id: 00001065
Activity: Status change: 2 hours ago