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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T04:51:37+00:00 2026-05-16T04:51:37+00:00

I am looking at the JVM configuration options for running Alfresco, mainly this document

  • 0

I am looking at the JVM configuration options for running Alfresco, mainly this document on the Alfresco Wiki. One of the recommendations is to use the JVM flags -Xcomp and -Xbatch. The justification of this is:

If you wish to have Hotspot precompile the classes, you can add [-Xcomp and -Xbatch]. This will, however, significantly increase the server startup time, but will highlight missing dependencies that can be hit later.

From what I have read elsewhere about the -Xcomp and -Xbatch flags, I am wondering whether they really provide any benefit.

  • -Xcomp gets HotSpot to compile all code beforehand with maximum optimization, thus foregoing any profiling that the VM will get through the standard running of the system.
  • -Xbatch stops background compiling, meaning the thread which caused the code to be compiled blocks until the compile is complete. However, after the compile is finished, the previously-blocked thread will not run the compiled code, it will still run the interpreted code. This was a change in Java 6 (Mustang) – before Mustang, threads blocked for compiling by the presence of the -Xbatch flag were guaranteed to run in the compiled code as soon as the compile was completed. Therefore, I am guessing that the recommendation of the -Xbatch flag is a relic of running Alfresco on older VMs.

Does anyone have any thoughts? My inclination is to get rid of these two flags and rely on the VM to get things right.

I would like to add two things, first of all that I don’t yet have access to an Alfresco instance to test this on and secondly I don’t really know what spec of machine is hosting Alfresco other than that by looking at the other configuration options it must be a 64 bit VM. Despite this, I hope the community will have some useful input, perhaps from a general HotSpot-tuning point of view.

  • 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-16T04:51:37+00:00Added an answer on May 16, 2026 at 4:51 am

    Generally speaking, it’s always preferable to let HotSpot compiler tune itself. Even using Server VM (-server) is default for 64bits and some ‘server-class’ machines.

    -Xbatch was intended mostly for debugging as described in Steve Goldman’s blog you pointed:

    So the -Xbatch switch is not a particularly useful switch even in the pre-mustang days. It is somewhat useful for jvm developers since it tends to make a run more predictable and reproducible.

    -Xcomp removes the ability to gather information for efficient compilation. From an Alex Turner’s post:

    One might think that -Xcomp would be a good idea from a performance point of view. However, it is not! The JIT compiler uses those 1000 iterations before compilation to gather information on how the method should be compiled for optimal efficiency. -Xcomp removes its ability to do so and thus we can actually see performance slip.

    Without performance in mind, I’ve never seen using those flags to detect missing dependencies (and it may not work if some code is still interpreted) so IMHO, I would get rid of both.

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

Sidebar

Related Questions

Looking back at my past projects I often encounter this one: A client or
I've been looking at this: http://calumleslie.blogspot.com/2008/06/simple-jvm-sandboxing.html regarding sandboxing the JVM. However, that was written
Looking at options for embedding the 3D Secure page inside my own order form,
I am looking for the appropriate settings to configure the JVM for a web
I am looking for potentially a JDI API to pause the JVM at any
I am looking for a more recent versions of JVM specifications, an JVM internals,
Looking for continuous integration server hosting or service for JVM-based projects which is free
I'm looking for a really simple / limited scripting language for the JVM or
looking into hosting sites (for a play framework application) i have noticed 2 options
I'm looking for some simple tasks like listing all the running process of 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.