With such a high productivity
factor that Smalltalk gives us, reaction times to market changes have enabled us to beat most of our competitors.

Dr. Colin Lewis, Vice-President, JPMorgan

Polycephaly: Finding the Sweet Spot

Arden Thomas, the Cincom Smalltalk Product Manager, recently wrote on his blog:

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 (VM) 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.

Some observations:

  1. 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!
  2. 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.

Solution?

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!

– Arden Thomas

  • To read more on Arden’s blog, click here.
  • To watch his Polycephaly presentation, click here.
  • To view his Polycephaly presentation, click here.
  • To learn more about Polycephaly, click here.