Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8086809
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T18:33:51+00:00 2026-06-05T18:33:51+00:00

Possible Duplicate: Limit jvm process memory on ubuntu In my application I’m uploading documents

  • 0

Possible Duplicate:
Limit jvm process memory on ubuntu

In my application I’m uploading documents to a server, which does some analyzing on it.

Today I analyzed my application using jconsole.exe and heap dumps as I tried to find out if I’m having memory issues / a memory leak. I thought I might suffer of one since my application is growing very much on RAM while the application is running.

As I watched the heap / codecache / perm gen etc. memory with jconsole after some runs, I was surprised as I saw the following:

check

picture link: https://www7.pic-upload.de/13.06.12/murk9qrka8al.png

As you can see at the jconsole on the right, the heap is increasing when I’m doing analyzing-related stuff, but it’s also decreasing again to its normal size when the work is over. On the left you can see the “htop” of the sever the application is deployed on. And there it is: The RAM is, although the heap acts normally and it also seems the garbage collector is running correct, incredible high at almost 3,2gb.

This is now really confusing me. I was thinking if my java vm stack could have to do something with this? I did some research and what I found spoke about the vm stack as a little memory with only a few megabytes (or even only kb).

My technical background:

  • The application is running on glassfish v.3.1.2
  • The database is running on MySQL
  • Hibernate is used as ORM framework
  • Java version is 1.7.0_04
  • It’s implemented using VAADIN
  • MySQL database and glassfish are the only things running on this server
  • I’m constructing XML-DOM-style documents using JAXB during the analysis and save them in the database
  • Uploaded documents are either .txt or .pdf files
  • OS is linux

Solution?

Do you have any ideas why this happens and what I can do for fixing it? I’m really surprised at the moment, since I thought the memory problems came from a memory leak which causes the heap to explode. But now, the heap isn’t the problem. It’s the RAM that goes higher and higher while the heap stays on the same level. And I don’t know what to do to resolve it.

Thanks for every thought you’re sharing with me.

Edit: Maybe I should also state out that this behaviour is currently making me impossible to really let other people use my application. When the RAM is full and the server doesn’t respond anymore I’m out.

Edit2: Maybe I should also add that this RAM keeps increasing after every successfull further analyzation.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T18:33:52+00:00Added an answer on June 5, 2026 at 6:33 pm

    There are lots more things that use memory in a JVM implementation than the Heap Settings.

    The Heap settings via -Xmx only controls the Java Heap, it doesn’t control consumption of native memory by the JVM, which is consumed completely differently based on implementation.

    From the following article Thanks for the Memory ( Understanding How the JVM uses Native Memory on Windows and Linux )

    Maintaining the heap and garbage collector use native memory you can’t control.

    More native memory is required to maintain the state of the
    memory-management system maintaining the Java heap. Data structures
    must be allocated to track free storage and record progress when
    collecting garbage. The exact size and nature of these data structures
    varies with implementation, but many are proportional to the size of
    the heap.

    and the JIT compiler uses native memory just like javac would

    Bytecode compilation uses native memory (in the same way that a static
    compiler such as gcc requires memory to run), but both the input (the
    bytecode) and the output (the executable code) from the JIT must also
    be stored in native memory. Java applications that contain many
    JIT-compiled methods use more native memory than smaller applications.

    and then you have the classloader(s) which use native memory

    Java applications are composed of classes that define object structure
    and method logic. They also use classes from the Java runtime class
    libraries (such as java.lang.String) and may use third-party
    libraries. These classes need to be stored in memory for as long as
    they are being used. How classes are stored varies by implementation.

    I won’t even start quoting the section on Threads, I think you get the idea that
    the Java Heap isn’t the only thing that consumes memory in a JVM implementation, not everything
    goes in the JVM heap, and the heap takes up way more native memory that what you specify for
    management and book keeping.

    Native Code

    App Servers many times have native code that runs outside the JVM but still shows up to the OS as memory associated with the process that controls the app server.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Equivalent of LIMIT and OFFSET for SQL Server? this is a mysql
Possible Duplicate: Why does the 260 character path length limit exist in Windows? I'm
Possible Duplicate: Does the Facebook 'like' have a limit? Facebook like button updates the
Possible Duplicate: Does sleep time count for execution time limit? If the max execution
Possible Duplicate: How to write a (MySQL) LIMIT in SQL Server? How do I
Possible Duplicate: How do I add a limit to update-query in Zend Framework? I
Possible Duplicate: Difference Between Equals and == in which cases equals() works exactly like
Possible Duplicate: Transparent images with C# WinForms I am coding an app which will
Possible Duplicate: JavaScript: formatting number with exactly two decimals How do I limit the
Possible Duplicate: How to format a decimal How can I limit my decimal number

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.