How To Purge Java Service Memory Linux
Purpose
Coffee applications like JIRA, Crowd and Confluence run in a "Java virtual motorcar" (JVM), instead of direct within an operating arrangement. When started, the Coffee virtual automobile is allocated a certain amount of memory, which information technology makes available to applications like Confluence. Past default, Coffee virtual machines are allocated 64Mb of memory, no matter how many gigabytes of memory your server may actually have available. 64Mb is inadequate for most Confluence installations, and and then this needs to be increased.
Diagnosis
Solution
Step 1: Increase Available Retentiveness
We aren't really able to requite a concrete recommendation for the corporeality of memory to allocate, considering that will depend greatly on your server setup, the size of your user base, and their behavior. You volition need to find a value that works for you, i.e. no noticeable GC pauses, and no OutOfMemory errors.
For reference, the iii most common parameters used to modify the memory (heap) resource allotment are:
- Xms - the minimum size of the heap
- Xmx - the maximum size of the heap
-
-Xx:MaxPermSize - the maximum size of PermGen (this is not used in Java 8 and higher up)
In case you demand advice regarding how much memory you should use please check this page for some examples of hardware specifications.
If you do determine to increase the retention settings, there are a few general guidelines to follow:
- Increase Xmx in pocket-sized increments (eg 512mb at a fourth dimension), until you no longer experience the OutOfMemory mistake. This is considering increasing the heap across the capabilities of your server to fairly Garbage Collect tin can crusade other problems (eg performance/freezing)
-
If your error is coffee . lang . OutOfMemoryError : PermGen space, increment the -XX:MaxPermSize parameter in 256mb increments until the fault stops occurring.
- If your fault does not reference PermGen, in that location is no need to increase information technology. In a simplistic caption, PermGen is used to store classes, and is generally quite static in size, and has been removed in Java viii. More info here.
- Consider setting Xms and Xmx to the same value, as this can decrease the time GC takes to occur, equally it will not attempt to resize the heap downwards on each collection.
- It is possible to set up the Xms and Xms values in either a gigabyte or megabyte format.
When setting these values in megabytes, gear up the value past multiplying the desired memory level past 1024. For case, to set up the retentiveness at 2 gigabytes, configure the Xms and Xmx to 2048m (2GB 10 1024MB):
For the same example using gigabytes, simply utilise the post-obit:
When setting the value in gigabytes, practice non use .5 increments every bit this volition cause the JVM to non start properly.
Linux
Windows (starting from .bat file)
Windows Service
Step 2: Verify Your Settings
To verify what settings are in place, check Viewing System Information. You should see a section chosen "Coffee Runtime Arguments".
Await for Xmx (maximum) and Xms (minimum) settings.
Alternatively, on Linux, run
to see the environment parameters.
How To Purge Java Service Memory Linux,
Source: https://confluence.atlassian.com/confkb/how-to-fix-out-of-memory-errors-by-increasing-available-memory-154071.html
Posted by: richardsonscance.blogspot.com
0 Response to "How To Purge Java Service Memory Linux"
Post a Comment