在VMware软件中的VM Guest的JVM无法加载

question

 how does running a Java server on a hypervisor such as VMware ESX affect the Java heap?

  • Access to JVM heap is random from the OS/hypervisor perspective
  • It is difficult to for guest OS or hypervisor to optimize memory that is randomly accessed
  • Given this, can the hypervisor detect unused pages in JVM heap?

The conventional wisdom for Java server applications is that performance is best if you allocate all the heap at JVM startup, rather than allowing the heap to be dynamically resized as the need arises. In other words, if you set the heap size to 1GB, your Java process will grab 1GB of contiguous virtual address space (+ whatever is needed for the binaries), memory which is no longer available to other applications.

Solution

so in this case, make sure that Reservation = OS vRAM + JVM + heap size hope this helps.

but meanwhile, The following are general recommendations from VMware KB site:

Size the virtual machine memory to leave adequate space for the Java heap, the other memory demands of the Java virtual machine code and stack, and any other concurrently executing process that needs memory from the guest operating system.

Set the memory reservation value in the VMware Infrastructure Client to the size of memory for the virtual machine. As any type of Memory Swapping (physical or virtual) is detrimental to performance of JVM heap especially for Garbage Collection.

Determine the optimal number of virtual CPUs for a virtual machine that hosts a Java application by testing the virtual machine configured with different numbers of virtual CPUs at different times with the same load.

If you are using multiple Garbage Collector threads in your JVM, match the number of those threads to the number of virtual CPUs that are configured in the virtual machine.

For easier monitoring and load balancing, use one JVM process per virtual machine.

If your ESX Server is overcommitted, ensure the the Balloon Driver is running within the virtual machine so that memory is optimally managed.

Papers

Related to my question:

Here is a PDF that provides a broad overview of considerations for running Java on VMware guests: link text




评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值