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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T08:45:43+00:00 2026-06-03T08:45:43+00:00

In my work environment, we have a number of Enterprise Java applications that run

  • 0

In my work environment, we have a number of Enterprise Java applications that run on Windows Server 2008 hardware. An external consultant has been reviewing the performance of our Java applications and have suggested that we change out initial and maximum memory values to be identical.

So, at present, we’re running an application with 1GB initial and 2GB maximum memory. Their recommendation is to change the initial and maximum memory both to 2GB.

Their reasoning is 2-fold…

  1. By allocating the initial and maximum at 2GB, when the Java application is started it will grab a 2GB block of memory straight up. This prevents any other applications from accessing this memory block, so this memory will always be available to the Java application. This is opposed to the current situation, where it would get an initial block of 1GB only, which means potentially other applications could consume the remaining available memory on the server, and the enterprise Java application wouldn’t be able to grow to the 2GB memory maximum.
  2. There is a small performance hit every time that Java needs to allocate memory between the initial and maximum size. This is because it need to go to Windows, assign the new block of the required size, then use it. This performance hit will occur every time that memory is required between the initial size and the maximum size. Therefore, setting them both to the same value means that this performance impact is removed.

I think their 1st point is valid from a safety perspective, as it means the java application will always have access to the maximum memory regardless of what other applications are doing on the server. However, I also think that this could be a negative point, as it means that there is a big block of memory that can’t be used by other applications if they need it, which could cause general server performance problems.

I think the performance impact they discuss in point 2 is probably so negligible that it isn’t worth worrying about. If they’re concerned about performance, they would be better off tuning things like the garbage collection aspect of Java rather than worrying about the tiny performance impact of allocating a block of memory.

Could anyone please tell me whether there is real benefit in their request to assign the initial and maximum memory to the same value. Are there any general recommendations either way?

  • 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-03T08:45:45+00:00Added an answer on June 3, 2026 at 8:45 am

    setting them the same increase predictability. If you don’t set them the same when the GC decides it needs more memory it will take time to allocate and shuffle around objects to make room. This is in addition to the GC activities. While this is happening requests are slower and your throughput will suffer. On a 2GB heap you will probably be allocating around 400mb of memory each time more is needed and 100mb removed each time the memory isn’t needed. Increase the heap size and these numbers increase. The heap would be ever changing between your values, it isn’t like it just allocates and keeps that memory.

    For the argument #1 on ensuring the OS always has the memory available for you I believe is a moot point. If your server is hurting for memory and you are already capping out the machine to run the software then you are running it on the wrong server. Get the hardware you need and give it room to grow. If you say your application could use 2GB, personally I would have that on a machine with 4GB or more free. If my client/user base grows the freedom is there to increase the heap to accommodate new users.

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

Sidebar

Related Questions

A number of delphi applications that I work with use an activex chartfx control.
In the software development environment where I work we have a group of developers
In your enterprise work environment, how are engineers held accountable for performing code inspections
i work in lamp environment . i search script that know to take a
I always work in windows environment and most often to write the program in
We have a pretty big perl codebase. Some processes that run for multiple hours
I have some code I have in the Arduino environment that requires x (in
I have a POM-based Java project. It contains a number of servlets for deployment
We have developed a number of custom approval workflows in visual studio 2008. They
I'm maintaining a number of console applications at work and one thing I've been

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.