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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T01:05:33+00:00 2026-05-15T01:05:33+00:00

Can anyone recommend a web site that includes up to date performance tips for

  • 0

Can anyone recommend a web site that includes up to date performance tips for Java? Most of the sites I have found seem to be old and I guess the newer versions (1.5 – 1.7) may have obsoleted some recommendations.

Edit:

I’m mostly concerned with reducing memory usage/garbage collection and making sure that simple methods can be inlined if necessary.

The code involves processing large amounts of data in threads using lots of small objects. Some objects are created for each data item, while others live longer. These objects usually implement an Interface or extending an abstract class.

  • 1 1 Answer
  • 2 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-15T01:05:34+00:00Added an answer on May 15, 2026 at 1:05 am

    Update: For me, the reference document to tune a Sun virtual machine is Java SE 6 HotSpotTM Virtual Machine Garbage Collection Tuning (that will also give you a methodology).

    As mentioned in a comment, the ergonomics feature does a pretty good job at tuning a modern JVM and should be tried first before to test more detailed controls.

    If you don’t get satisfying results, set the max Heap size and start to play with the generation sizes and more precisely the Young Generation. From the FAQ about Garbage Collection in the HotspotTM JavaTM Virtual Machine:

    The young generation should be sized large enough so that short-lived objects have a chance to die before the next young generation collection. This is a tradeoff since a larger young generation will allow more time for objects to die but may also take longer to collect. Experiment with the size of the young generation to optimize the young generation collection time or the application throughput.

    I’d follow the suggested approach:

    The rules of thumb for server
    applications are:

    • First decide the maximum heap size you can afford to give the virtual
      machine. Then plot your performance
      metric against young generation sizes
      to find the best setting.

      • Note
        that the maximum heap size should
        always be smaller than the amount of
        memory installed on the machine, to
        avoid excessive page faults and
        thrashing.
    • If the total heap size is fixed, increasing the young generation size
      requires reducing the tenured
      generation size. Keep the tenured
      generation large enough to hold all
      the live data used by the application
      at any given time, plus some amount of
      slack space (10-20% or more).
    • Subject to the above constraint on the tenured generation:
      • Grant
        plenty of memory to the young
        generation.
      • Increase the young
        generation size as you increase the
        number of processors, since allocation
        can be parallelized.

    Then, if the application does still not achieve the desired performance, start with a different collector (see Selecting a Collector).

    Unless your application has rather strict pause time requirements, first run your application and allow the VM to select a collector. If necessary, adjust the heap size to improve performance. If the performance still does not meet your goals, then use the following guidelines as a starting point for selecting a collector.

    1. If the application has a small data set (up to approximately 100MB), then
      • select the serial collector with -XX:+UseSerialGC.
    2. If the application will be run on a single processor and there are no pause time requirements, then
      • let the VM select the collector, or
      • select the serial collector with -XX:+UseSerialGC.
    3. If (a) peak application performance is the first priority and (b) there are no pause time requirements or pauses of one second or longer are acceptable, then
      • let the VM select the collector, or
      • select the parallel collector with -XX:+UseParallelGC and (optionally) enable parallel compaction with -XX:+UseParallelOldGC.
    4. If response time is more important than overall throughput and garbage collection pauses must be kept shorter than approximately one second, then
      • select the concurrent collector with -XX:+UseConcMarkSweepGC. If only one or two processors are available, consider using incremental mode, described below.

    Actually, just read the whole document carefully (and be sure to understand the implications of a bad decision 🙂 And don’t forget:

    If you cannot measure it, you cannot improve it. –Lord Kelvin

    References

    • Java SE 6 HotSpotTM Virtual Machine Garbage Collection Tuning
    • Java SE 6 Performance White Paper

    Below my initial answer that some readers might still find interesting:


    Java Performance Tuning is a well known reference for Java performance and still updated. You might also want to check the blog of the Kirk Pepperdine (which is actually a contributor of the previous site).

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

Sidebar

Related Questions

Can anyone recommend a Prolog compiler for .Net. The ones that I have been
Can anyone recommend a free module that will let me create web forms that
can anyone recommend a website crawler that can show me all of the links
I am studying usage of web services nowadays. Can anyone recommend some free web
Can anyone recommend a great CodeIgniter Registration/Login/Logout library for beginners to web development? I
Can anyone recommend a good Java game engine for developing simple tile-based games? I'm
Can anyone recommend guidelines for high-level documentation of Web services? This is the documentation
Can anyone recommend a tutorial or point me in the direction of some easily
Can anyone recommend a good cheat sheet for gbd? I'm experienced with windbg commands,
Can anyone recommend a based open source mailing list software ? The following would

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.