Jboss performance

I have a JVM which is configured to have 12 gig of memory. My VM has 16 gig in total. The instance in task manager only appears to show 8 gig no matter what the load on the server. Is this correct or is there an issue on vmware?
LVL 6
Sid_FAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Sharon SethCommented:
JRE version and OS ? For a sever jvm , I guess it would be 1/4 of the physical memory , where physical memory is > 1 GB
0
Sid_FAuthor Commented:
2008 Server R2 V7 java. ?My question is really why the instance in task manager is showing only 8 gig if the xms and xmx value is set to 12
0
Sharon SethCommented:
There is a cap on how much memory you can assign to xms and xmx . So , even if you set xms to 12 , the JVM can start with only 8
0
Managing Security & Risk at the Speed of Business

Gartner Research VP, Neil McDonald & AlgoSec CTO, Prof. Avishai Wool, discuss the business-driven approach to automated security policy management, its benefits and how to align security policy management with business processes to address today's security challenges.

Sid_FAuthor Commented:
Ah interesting! now that makes sense.  I can't seem to find any documentation to back this up. Are you aware of anything to indicate this.
0
girionisCommented:
I don't think there is a limit on how much memory a JVM can use. Are you sure that 2008 Server R2 V7 does not limit the memory per process?
0
Sid_FAuthor Commented:
I am not sure if 2008 has a limit but again would need some documentation to back this up.
0
girionisCommented:
Allocating memory to a Java application is a native process. A JVM can have as much memory as you allocate to it. If you allocate it 16GB but it only uses 8GB this tells me that it has to do with os-specific settings. Can you try the same on a Linux or Unix box and see if you get the same results?
0
Sid_FAuthor Commented:
I can't as I don't have a linux or unix box and also cannot install the software on another server.
0
girionisCommented:
By the way allocating 12GB of memory does not mean that it will use all of them. The JVM reserves 12GB of memory but it will only use them if it needs them.
0
girionisCommented:
I can't as I don't have a linux or unix box and also cannot install the software on another server.

Do something else then. Write a very basic programme, with a main method and a single line

System.out.println(Runtime.getRuntime().maxMemory());

Open in new window


and start your programme with 12GB of memory. Then see what the above line displays. If it shows a value of 12GB (it will be a long value) then it means that the memory is allocated correctly.
0
Sid_FAuthor Commented:
Sorry I'm not experienced at all with programming. With regard to the jvm only using what it needs, I presume if 12 gig is allocated for XMX and XMS then the Windows process will start with 12 gig regardless and inside the JVM memory management will move the memory stack up and down as it needs but as far as the OS is concerned it's 12 gig.
0
girionisCommented:
I presume if 12 gig is allocated for XMX and XMS then the Windows process will start with 12 gig regardless and inside the JVM memory management will move the memory stack up and down as it needs but as far as the OS is concerned it's 12 gig.

Yes this is true.
0
Sid_FAuthor Commented:
Ok thanks for confirming. So something is not working correctly or there is a limit somewhere if my 12 gig xms and xmx limits are only producing an 8 gig Windows process... but what is the cause
0
girionisCommented:
It's not producing 8 gigs, it produces 12 but you only see 8 since it's only using 8 . When it starts using more you will see more on the task manager (I guess this is where you view the memory consumption). To test this try to cause an OOME in your application and keep an eye on the memory consumption.

In Java the actual allocated memory is called committed memory. This is the memory a Java application can use. If the used memory reaches the committed memory then a garbage collection occurs. You can see the committed memory from the task manager if you show the Memory - Committed column (View -> Select Columns -> Memory Commit Size), like in the following picture:

http://prntscr.com/1w78un

(115.284 is the memory in use, the 307.360 the committed). The committed memory does not always fit the physical memory, since virtual memory can also be used.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Sid_FAuthor Commented:
Thank you
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.