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

  • SEARCH
  • Home
  • 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 1081961
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T22:14:12+00:00 2026-05-16T22:14:12+00:00

Heap memory size thrashes between 2gigs and ~8gigs about once a minute (see picture).

  • 0

Heap memory size thrashes between 2gigs and ~8gigs about once a minute (see picture).

Relevant details:

  • High traffic site
  • Lots of physical memory
  • Redhat 5.5
  • Java 1.6.0_07
  • Glassfish 2.2.1 (yes, I know it’s old. no, we can’t upgrade. yes, i know it’s unusual to use as a production app server).
  • -XX:MaxPermSize=192m -XX:+AggressiveHeap -Xms14336m -Xmx14336m

I have little experience with memory tuning, but it seems like MaxPermSize is out of whack with Xms and Xmx. Or is this normal?

jConsole heap thrashing

  • 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-05-16T22:14:12+00:00Added an answer on May 16, 2026 at 10:14 pm

    Why does my JVM heap size thrash from 2gigs to 8 gigs?

    There is no evidence that the system is thrashing in the normal (harmful) sense. The sawtooth pattern indicates that objects are being allocated (the up slope) and the GC is then reclaiming them. The allocation rate seems a bit high, but there is every sign that the GC is running efficiently. Indeed, the fact that the heap size is always dropping back to ~2Gb is a good sign, as is the fact that the % CPU usage is low.

    I have little experience with memory tuning, but it seems like MaxPermSize is out of whack with Xms and Xmx. Or is this normal?

    It looks kind of normal.

    Certainly, there’s no need to increase the size of permGen. (PermGen is used for objects that are anticipated to never be garbage collected; typically intern’d Strings1 and code segments. Normal application objects are never allocated in or moved to permgen space.)

    Hypothetically, if you didn’t have lots of memory, the high allocation rate might be a cause for concern. However, you cannot address that by tweaking the GC parameters. You’d need to do some profiling to see what is creating so many objects and see if it is sensible to try to reduce the creation rate. Depending on the application, it may not even be sensible to try.


    1 – In fact, starting with Java 7 intern’d strings live in the regular heap not permgen.

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

Sidebar

Related Questions

The question is not about the maximum heap size on a 32-bit OS, given
I want to preload (load into memory) about 10 jpg pictures (size 3264px x
I see that the Heap Size is automatically increased as the app needs it,
I have a fairly memory intensive process that can cause the heap size to
I am seeing very Large Heap Size in my Application, but used memory is
So - jnlp files can request heap memory size thusly: <j2se version=1.6+ href=blah max-heap-size=1g/>
I want to increase the default virtual memory heap size of my avd .
I know the default Java heap memory is 128 MB. Since it is the
Can anybody explain to me how objects are stored and removed from heap memory
We know that malloc() and new operation allocate memory from heap dynamically, but where

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.