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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T18:17:26+00:00 2026-05-12T18:17:26+00:00

Recently I heard Kirk Pepperdine speak about changing garbage collectors for better performance —

  • 0

Recently I heard Kirk Pepperdine speak about changing garbage collectors for better performance — but what exactly does that mean and what makes one garbage collector better or different than the other?

  • 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-12T18:17:26+00:00Added an answer on May 12, 2026 at 6:17 pm

    You ask two questions:

    What does it mean to change garbage collectors in Java for better performance?

    This is a huge topic, and like some of the other responders, I urge you to do some reading. I recommend Java SE 6 HotSpot[tm] Virtual Machine Garbage Collection Tuning from Sun. The information below mostly comes from there. The “turbo-charging” java article recommended in another answer is older.

    In brief, one of the many options we have when running the JVM is to select a garbage collector, of which there are presently three:

    • The serial collector (selected with the -XX:+UseSerialGC option) – this uses a single thread to do all collection work, and everything waits while it happens.
    • The parallel collector (selected with the -XX:+UseParallelGC option) – this does minor collections (of the young generation) in parallel, but everything waits during the major collections.
    • The concurrent collector (selected with the -XX:+UseConcMarkSweepGC option) – this allows most collection operations to happen while the application is running.

    What makes one garbage collector better than another?

    Your application does. Each of the garbage collectors has a “sweet spot” – a range of application profiles for which it is the superior collector.

    First, know that the VM is pretty good at selecting a collector for you, and as with most optimizations, you should not consider second-guessing it until you’ve identified that your application is not performing well, and that garbage collection is the likely culprit.

    In that case, you have to ask these questions: 1) is your app running on a single-processor machine, or multi? 2) Are you more concerned with “minimizing pause time”, or with “maximizing throughput”? That is, if you had to choose between the application never pausing but getting less work done overall, versus getting more work done overall, but pausing from time to time, which would you pick?

    Roughly speaking, as a starting point:

    • On a Multi-processor machine, mostly concerned with minimizing pause time, you’d tend to use the Concurrent collector (consider enabling incremental mode)
    • On a Multi-processor machine, mostly concerned with maximizing throughput, you’d tend to use the Parallel collector (consider enabling parallel compaction)
    • On a Single-processor machine, with small datasets (up to roughly 100Mb), you’d tend to use the Serial collector
    • On a Single-processor machine, mostly concerned with maximizing throughput, you’d tend to use the Serial collector
    • On a Single-processor machine, mostly concerned with minimizing pause time, you’d tend to use the Concurrent collector (consider enabling incremental mode)

    Again, though, the VM does a pretty good job of selecting a collector for you, and you’re better off not overriding that unless and until you discover that it’s not working well enough for your application.

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

Sidebar

Related Questions

I recently heard about nedtries and decided to try implementing them, but something bothers
Recently I heard about bit vectors, but i cant really find any useful info
I know what CSS Reset is, but recently I heard about this new thing
I just recently heard of duck typing and I read the Wikipedia article about
I've recently heard about Qt and read about how fun it is to develop
I heard this term recently. What are subscription applications(for a mobile platform). Does this
I recently heard about ternary search in which we divide an array into 3
I have recently heard a lot of people argue about using PHP testing features
I am currently using JQuery and recently heard about RightJS . RightJS seems to
I use visual studio 2005 , but recently I've heard that there is 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.