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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T10:38:57+00:00 2026-06-10T10:38:57+00:00

While reading some notes on performance tuning, I did notice a recommendations while setting

  • 0

While reading some notes on performance tuning, I did notice a recommendations while setting memory size:

Java application should size both initial and maximum permanent generation size to the same value since growing or contracting the permanent generation space requires a full GC. Similar suggestion is given while setting the heap size, I.e. -Xmx=-Xms.

My question is, then why do we have -Xms setting at all?

Also,
Why GC gets triggered often if I”ve different value for -Xmx and -Xms, and not when I”ve same size for -Xmx and -Xms.

To add more to my second question, If I start with minimum heap size of 64M and Max 512 M, I believe full GC will not get triggered unless memory utilized by my app reaches 512M.

Similarly If I start with 512M for both -Xmx and -Xms, still JVM will trigger full GC when my app memory use reaches this limit. So why it’s advised to set both max and min to the same value?

  • 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-10T10:38:58+00:00Added an answer on June 10, 2026 at 10:38 am

    The setting flags were designed before the VM had generational, incremental collection. In that case complete collections were all there were. In more modern collectors full collections are rare. That’s good because incremental collections are normally a few milliseconds, so the UI experience doesn’t change. Complete collections of big arenas can take several seconds ore more. Changing the arena size – as the document says – is guarenteed to cause a full collection every time.

    The guidance isn’t perfect 100% of the time. There are few kinds of apps where allowing the arena to grow is reasonable.

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

Sidebar

Related Questions

While I was doing some reading on system calls, I did a search for
While reading some programming books, I notice that the authors says that, in OOP,
I am new to vbscript and while reading i found some code as Do
While reading cocoa tutorials i've noticed that some of the tutorials use AppDelegate and
I have been reading about Scala for a while and even wrote some small
I'm experiencing some terrible performance with reading data off the OracleDataReader object compared to
While reading this class BitmapFactory I noticed that almost all methods inside are static.
While reading the K&R 2nd edition I noticed that the programs always began with
While reading from serial port I am using serialport.read(xyz,0,4) where xyz is a byte
While reading from a configuration file in Perl there might be cases when a

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.