I have several spring boot Java applications which intermittently misbehave when hyper-v is configured with dynamic memory. I am not specifying minimum or maximum Java memory options because I don't know how much or little each application needs so I prefer to have Java make that decision for me. All applications start and seem to be working, however sometimes they just stopped responding and the logs do not indicate any errors or that it is low on any resources. Other times the applications are working fine. I suspect that it has to do with the dynamic memory allocation from hyper-v but because it does work sometimes for long extended periods of time I don't know what is causing this. When I run it for my local machine I do not have this issue, however I am not running for extended periods of time on my local machine. When my applications are running the VM is using between 50% to 80% of the memory that the virtual machine sees and it seems to not be expanding all the way out to the maximum amount of ram allowed dynamically. Any ideas on how to determine if it is memory related to hyper-v dynamic memory? The physical hyper-v server is running 2012 R2 and the VM is running Windows Server 2016. Java version 1.8.0_71 Java SE Runtime build 1.8.0_171-b11 Java Hotspot 64-Bit Server VM build 25.171-b11, mixed mode.
I would check the size of the process in your HV. Java will use more memory than just the heap so if your heap is 80% of the virtual machine, it could exceed the allocated memory and be swapping heavily which would definitely make the process appear to stop running. Most likely this would occur on a GC making the process non-responsive.
The first thing I would check is how much IO read/writes it is performing and free memory your OS has when this happens.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.