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 4598470
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T23:24:13+00:00 2026-05-21T23:24:13+00:00

Our application requires very huge memory since it deals with very large data. Hence

  • 0

Our application requires very huge memory since it deals with very large data. Hence we increased our max heap size to 12GB (-Xmx).

Following are the environment details

OS - Linux 2.6.18-164.11.1.el5    
JBoss - 5.0.0.GA
VM Version - 16.0-b13 Sun JVM
JDK - 1.6.0_18

We have above env & configuration in our QA & prod.
In QA we have max PS Old Gen (Heap memory) allocated as 8.67GB whereas in Prod it is just 8GB.

In Prod for a particular job Old Gen Heap reaches 8GB, hangs there and the web URL become inaccessible. Server is getting down.
But in QA also it reaches 8.67GB but full GC is performed and its coming back to 6.5GB or something. Here its not getting hanged.

We couldn’t figure out a solution for this because both the environment and configuration on both the boxes are same.

I have 3 questions here,

2/3rd of max heap will be allocated to
old/tenured gen. If that is the case
why it is 8GB in one place and 8.67GB
in another place?

How to provide a valid ratio for New
and Tenure in this case(12GB)?

Why it is full GCed in one place and
not in the other?

Any help would be really appreciable. Thanks.

Pls let me know if you need further details on env or conf.

  • 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-21T23:24:14+00:00Added an answer on May 21, 2026 at 11:24 pm

    For your specific questions:

    1. The default ratio between new and old generations can depend on the system and what the JVM determines will be best.
    2. To specify a specific ratio between new and old generations with -XX:NewRatio=3.
    3. If your JVM is hanging and the heap is full it’s probably stuck doing constant GC’s.

    It sounds like you need more memory for prod. If on QA the request finishes then perhaps that extra 0.67GB is all that it needs. That doesn’t seem to leave you much headroom though. Are you running the same test on QA as will happen on prod?

    Since you’re using 12GB you must be using 64-bit. You can save the memory overhead of 64-bit addressing by using the -XX:+UseCompressedOops option. It typically saves 40% memory, so your 12GB will go a lot further.

    Depending on what you’re doing the concurrent collector might be better as well, particularly to reduce long GC pause times. I’d recommend trying these options as I’ve found them to work well:

    -Xmx12g -XX:NewRatio=4 -XX:SurvivorRatio=8 -XX:+UseCompressedOops
    -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+DisableExplicitGC
    -XX:+UseCMSInitiatingOccupancyOnly -XX:+CMSClassUnloadingEnabled
    -XX:+CMSScavengeBeforeRemark -XX:CMSInitiatingOccupancyFraction=68
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I have an application which requires very fast access to large volumes of
In our new very large MVC3 application, we have a security problem to solve.
Our application runs off MySQL, but a client has another application that requires SQL.
I have a project I'm working on that requires our WPF application read SMS
As a part of trying to tackle a memory leak in our application, we
In our application, we are using RMI for client-server communication in very different ways:
So, we have a very large and complex website that requires a lot of
Our large application (VB.Net, Framework 3.5) has been developed more or less from the
Our application requires a user to select a photograph from their camera. The cameras
Our application is interfacing with a lot of web services these days. We have

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.