As in the title, I have one spring-mvc application which runs on both VMs.
My application needs to deal with large number of message import(I used a blocking executor, kept both queue
and threadPool
size very small). And I set the same JVM options for these 2 VMs. The benchmarks are as below:
But the result turns out to be quite different, on my windows
VM, I can run the MessageImport procedure as I want and never run into some OutOfMemory
error, while on the linux
VM, there will always be some memory error
after just several times of import. And from the JVisualVM
, I could see the used heap just explosed suddendly, GC
activities increase, it feels like the VM
is doing some GC
work.
I've tried to make all the parameters the same on both machine, and now, the only thing different between them seems to be this JVM.
So could anyone explain the difference between these two VMs?
UPDATE
Here I post 2 image of CPU & Heap by JVisual VM monitor.
Does anyone ever encounter the same problem, could anyone give some suggestions please? If necessary I think I'll start a bounty.
The problem is also due to synchronization.
Please check my other question if you have a similar problem.