[ 
https://issues.apache.org/jira/browse/GUACAMOLE-709?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16747541#comment-16747541
 ] 

Michael Jumper commented on GUACAMOLE-709:
------------------------------------------

{quote}
Should this sawtooth pattern be normal?
{quote}

The sawtooth pattern of heap consumption is normal for any Java application, 
yes. Under normal, healthy operation, you will see heap consumption grow until 
it reaches a threshold where the JVM performs a GC.

Here's a decent post going over the characteristics of leaky and non-leaky 
graphs: 
https://plumbr.io/blog/memory-leaks/memory-leaks-fallacies-and-misconceptions

{quote}
I realize it's doing garbage collection at the tip of the sawtooth but why is 
it growing?
{quote}

Java will not free up heap immediately. It waits for what the JVM deems is an 
opportune time to perform a GC and free up heap. What you are observing is not 
the heap _growing_ but the heap being _used_, which just about every Java 
function call will do. If heap usage were growing, the valley of the sawtooth 
would be gradually higher each time.

You may see some different behavior with newer JVMs with respect to the nature 
and timing of that GC, but what you're seeing here is normal and not indicative 
of a leak.

If you still suspect a leak, what you need to do is run things with VisualVM 
through multiple GC cycles (probably several hours at the rate shown in your 
graph), and see whether the graph still looks healthy.


> Possible Client Memory Leak
> ---------------------------
>
>                 Key: GUACAMOLE-709
>                 URL: https://issues.apache.org/jira/browse/GUACAMOLE-709
>             Project: Guacamole
>          Issue Type: Bug
>          Components: guacamole-client
>    Affects Versions: 1.0.0
>         Environment: Docker, debian:stable base
>            Reporter: Jason Bean
>            Priority: Major
>         Attachments: Screen Shot 2019-01-20 at 1.41.34 PM.png, Screen Shot 
> 2019-01-20 at 1.43.16 PM.png
>
>
> I have an all-in-one Docker I created, jasonbean/guacamole, and since I 
> modified it for 1.0.0 I'm seeing tomcat's java process using as much as 2.5GB 
> of memory. It starts at around 800MB.
> Since it's an all-in-one container I'm using debian:stable as the base and 
> using tomcat8 and java from the Debian repository. Do I need to be doing 
> something differently or could this be a problem with the client code?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to