[英]Spring boot Java app misbehaving with Hyper-V dynamic memory
I have several spring boot Java applications which intermittently misbehave when hyper-v is configured with dynamic memory. 我有几个spring boot Java应用程序,当hyper-v配置了动态内存时,它们会间歇性地出现异常。 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.
我没有指定最小或最大Java内存选项,因为我不知道每个应用程序需要多少,因此我更希望Java为我做出决定。 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.
我怀疑它与来自hyper-v的动态内存分配有关,但是因为它有时可以长时间工作,所以我不知道是什么原因造成的。 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.
当我的应用程序运行时,VM会使用虚拟机看到的50%到80%的内存,并且似乎并没有一直扩展到动态允许的最大内存数量。 Any ideas on how to determine if it is memory related to hyper-v dynamic memory?
关于如何确定它是否与Hyper-v动态内存相关的任何想法? 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.
物理hyper-v服务器正在运行2012 R2,而虚拟机正在运行Windows Server2016。Java版本1.8.0_71 Java SE Runtime内部版本1.8.0_171-b11 Java Hotspot 64位服务器VM内部版本25.171-b11,混合模式。
I would check the size of the process in your HV. 我会在您的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.
Java将使用的内存不仅仅是堆,因此,如果您的堆是虚拟机的80%,它将超过分配的内存并进行大量交换,这肯定会使该进程似乎停止运行。 Most likely this would occur on a GC making the process non-responsive.
这很可能会在GC上发生,从而使过程无响应。
The first thing I would check is how much IO read/writes it is performing and free memory your OS has when this happens. 我要检查的第一件事是发生这种情况时,IO正在执行多少IO读写操作,以及OS拥有的可用内存。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.