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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T17:05:51+00:00 2026-05-15T17:05:51+00:00

Is it conceivable that the rate at which new objects are created by a

  • 0

Is it conceivable that the rate at which new objects are created by a Java program somewhat exceeds the rate at which these objects are garbage collected in the young generation ?

…Thus causing an ever greater backlog of new objects sitting on the heap until a full gc is triggered ?

Any metrics I could collect to identify/verify this scenario ?

The objects created have a maximum lifespan of around 1 second. Most are alive for about 400 milliseconds, on average.

Thanks.

  • 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-15T17:05:52+00:00Added an answer on May 15, 2026 at 5:05 pm

    When the GC kicks in and moves objects out from Young (to S0 or S1) then dead object are not copied and therefore thrown away. The objects are moved a number of times back and forth between S0 and S1 until they die or they become old enough to be transfered to Old space.

    S0 and S1 is storage space between the Young(Eden) and the Old space.

    The GC runs so long there are objects to copy, throwing away all dead ones. Full GC is executed when memory actually needs to be recovered, example objects needs to be removed from Old space.

    The fastest way to clean Young space is actually to wait until most of the objects are dead, cause then you do not have to copy as many to S0|S1 and later to Old.

    So filling up the memory, and then taking the penalty of a longer GC run is actually more effective then letting the GC run with very short intervals. This is why you see your memory growing and growing until it is almost full, and then it all drops down to almost nothing again.

    A full GC is StopTheWorld this is needed to rearrange the objects on the heap in Old space, it is not needed in Young space. If young space becomes to full to fast objects can be promoted to Old space. This is not a good case and this is the case you are thinking of.

    To avoid Full GCs, you can calculate how much memory you will need in Young Space with the creation rate you have to make sure that objects are not promoted before necessary. It is also possible to tune the size of the S0 and S1 space and how many times objects will bounce between them before they end up in Old Space (requiring a Full GC to be removed).

    A good link but a bit old is this one on Tuning Garbage Collection

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

Sidebar

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.