Memory when stress test with JMeter

Posted on 2011-04-28
Last Modified: 2012-05-11
Hi Guys,

We're using JMeter to load test our web based Java application, deployed in Linux server, web server : apache tomcat.

We run it for 25 concurrent users. And the memory spike into 2GB.

Then we stop the test on JMeter, but the memory is still on 2Gb, why the memory doesn't decrease although we had stopped the test in JMeter?
Question by:softbless
    LVL 86

    Expert Comment

    >> but the memory is still on 2Gb

    For how long, and measured by what means?

    Author Comment

    Well, actually only 2 minutes after stopping the testinng.

    We're using like a task manager in CentOs.

    is it a common behavior? how many minutes, the memory will get normal approximately?
    LVL 92

    Accepted Solution

    because the memory is still being referenced, and/or the gc has not run or needed to free it up.
    LVL 92

    Assisted Solution

    And the memopry shown in OS is the memory allocated to the java process. It is not the amount of heap used by the application.
    Typically it will increase (to the limit specified by -Xmx) , but not decrease
    LVL 11

    Assisted Solution

    by:Phil Phillips
    Like other experts have said, the memory usage isn't really indicative of what the application itself is using.  The java process itself won't free up the OS memory... but you can look into the java heap to see what your application is using.

    jstat is a good command line tool to check the JVM memory.

    If you want a more comprehensive GUI, you can try jconsole
    LVL 26

    Assisted Solution

    You need to be clear on the difference between the allocated memory for the process (which won't decline on Linux) and the amount actually in use (which should decline after garbage collection).

    The best tool today for looking at all of this, and tons of other cool profiling is visualvm (  Today it's bundled with JDK6 and it's really an amazing tool.  I'm sure it's putting many of the commercial profilers out of business.


    Author Comment

    Hi Guys,

    Fyi, the program that running Java only 1 application.

    Thanks for the input, maybe you are interested to answer how to free the memory for this case, the question is in :

    Author Closing Comment


    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Suggested Solutions

    Introduction I've been in the software industry for over 20 years. I've interviewed at lots of companies, from start ups in stealth mode to some of the biggest and most successful. I've also conducted lots of interviews, especially as I've become a…
    In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
    Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
    This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now