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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T12:14:25+00:00 2026-06-18T12:14:25+00:00

Although, the question is very basic, I am willing to understand how JVM’s maximum

  • 0

Although, the question is very basic, I am willing to understand how JVM’s maximum memory allocation is done to an application. I have an application running on a Windows 2008 server that hosts about 60 virtual managed servers [that is 60 JVMs]. Each managed server is set a maximum heap of 1024m. The Windows is configured with a 32 GB RAM.

Now the question, how is maximum memory allocation to a JVM done? Is it done at one go or on a incremental growth basis? If at one go, how does Windows handle all 60 managed servers hosted my application in a 32-GB-RAM-packed system?

Any views are much appreciated. Thank you.

  • 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-18T12:14:26+00:00Added an answer on June 18, 2026 at 12:14 pm

    The JVM actually does allocate all memory requested by -Xmx at startup time, along with additional memory to hold the JVM executable and internal work areas. And when you create threads, it also allocates memory for the stacks used for those threads.

    This works because (1) the JVM doesn’t actually use this memory, and (2) the OS provides a paging file. When the JVM requests an allocation, it creates a commitment by the OS but does not actually use all RAM requested. As it actually uses the RAM, the OS will swap pages to/from the pagefile. If all processes were actively using their RAM, the OS would have to swap pages in and out constantly; this is called “thrashing.”

    The -Xms parameter specifies the initial heap size, within the overall heap size. The JVM will attempt to keep memory within these bounds, but is permitted to expand the bounds if it cannot reclaim enough garbage. However, these heap increases do not incrementally request more memory from the OS. If they did, the heap would be fragmented and a large array allocation might fail (because it wouldn’t fit in contiguous memory).

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

Sidebar

Related Questions

[Sorry, I'm new in Python. Although it seems to be a very basic question,
I have a very basic question about MVC web applications in Java. Since the
I have a very basic question about SQL server and Visual Studio 2010. I'm
I realize that this is probably a very basic question, but I have spent
I'm new to Python and have what is probably a very basic question about
Hopefully a simple question although one I have found impossible to answer myself using
I had another question and although it was answered i dont understand WHY the
I have a question, although I can't really go into specifics. Will the following
Although this question fancies PostgreSQL, it is still a general DB question. I have
My question is really very important . When i program i have seen that

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.