Polycephaly – finding the sweet spot
Recently I have written posts about the benefits of using Polycephaly. If you were at Smalltalk Solution 2011, you probably saw my presentation about using it, and descriptions of experiments I ran.
The sweet spot refers to the question: “How many virtual machines should I run (using Polycephaly) to maximize my throughput?”.
Many times you can run iterations of the test, using a different number of vm’s for each run and benchmark it.
Another general approach is to use a rule of thumb guide of 1.5 vm’s per core. This seems to work pretty well.
The 1.5 vm’s per core seems to work pretty well, maybe too well! It may be the ideal for maximizing the throughput on a server. However, I ran into an issue using this. Using 1.5 vm’s per core so thoroughly utilized the full power of the cpu cores, that I rendered my machine largely unresponsive for browsing the web, reading email, or running another application – a victim of my own success! :-)
My main machine has a quad core cpu, so I was running 6 additional vm’s. In the task manager, a process is maxing out the core when it show the maximum 25% utilization (25% overall of cpu). Running 1.5 vm’s per core means that when a vm takes a “breather” – performs IO or some other non cpu intensive task, that another process is there waiting to utilize the cpu to its full extent.
I found the solution to be fairly obvious. If I wished to make use of my machine for other tasks, I simply ran three virtual machines, to do the work. This meant that three vm’s were usually maximizing three cores of the cpu; the main image collected information from these three, but did not overly tax the cpu’s fourth core when it was allocated time. The fourth core was essentially available to make my machine responsive in browsing the web, reading email, or running another application. So for a small reduction in maximum throughput, the benefit was a usable versus non-usable computer, a very beneficial tradeoff!
Have you come across any gems or keen insights in using Polycephaly? Please share!