Javaはガベージコレクションの関係でVMwareなどの仮想化と相性がわるいらしい

Twitterを眺めていたらちょっと気になるものを発見。
質問したら、情報源を教えてくれた。感謝。


:tree]



元ネタは、[twitter:@lumin]が以下の講演で聞いたものらしい。
VMware Virtualization Forum 2009
B56:vSphereパフォーマンスベストプラクティス


[twitter:@smzksts]からも資料を提示してもらった。
P10〜P11

Virtual CPUs and Threads for Garbage Collection
JVMs have options that allow the user to determine the number of garbage collection threads
that may be active at any one time. This feature is determined by the following JVM runtime
options:
-Xgcthreads<n> (for the IBM JVM)
-XXgcthreads<n> (for the JRockit JVM)
-XX:ParallelGCThreads=<n> (for the Sun JVM)

where <n> represents the number of GC threads to be used by the JVM. If the number of
virtual CPUs configured in the virtual machine containing a Java program is not equal to or
greater than the number of Java GC threads, then the performance gains that are expected
from using multiple GC threads will be affected. Since in that case there are not enough virtual
CPUs to schedule all of the GC threads at once, then some of the GC threads will be held up
and the time to complete GC events will likely be longer.

そのうち、VMwareJavaの性能がでないという話にはぶち当たりそうな気がするので、メモ。