= DAC 0.9.1 (comparison of the grid/cloud computing frameworks - part I) = == Test environment == DAC 0.9.1 has only single threaded workers. Because of that, we had to launch 40 workers in order to fully utilize available processing units. DAC is a centralized framework (with a single master node named broker), so we also had to run broker on one of the processors. You can see the architecture of the test environment on the following figure: {{{ #!html
}}} == Code == DAC operates on the computational units named '''agents'''. The main work was done in the '''AgentCMBF''' class: {{{ #!java public class AgentCMBF extends Agent { private static final long serialVersionUID = 1L; private String recipientIdentString; private String[] imageDesc; public AgentCMBF(String id) { super(id); } public AgentCMBF(String recipientIdentString, String[] imageDesc) { super(null); this.recipientIdentString = recipientIdentString; this.imageDesc = imageDesc; } public void execute() throws DACException { Worker cmbfWorker = new Worker(); FastBigInt128 result = cmbfWorker.countInImage(imageDesc); getAgentManager().putResult(recipientIdentString, new SingleResult(imageDesc, result)); } } }}} In order to perform computations, we had to divide problem into small agents and send them into broker: {{{ #!java Worker cmbfWorker = new Worker(); log.info("Generating tasks (n=" + n + ", level=" + level + "). Generating tasks for id " + receivingAgent.getIdentString()); for (int i = 1; i <= n; i++) { for (String[] imageDesc : cmbfWorker.generateImages(i, level)) { broker.sendAgent(new AgentCMBF(receivingAgent.getIdentString(), imageDesc)); sentTasks++; } } }}} After that we had to gather results: {{{ #!java while (receivedResults < sentTasks) { try { Thread.sleep(100); } catch (InterruptedException e) { log.debug(e); } List results = broker.receiveAgentResults(receivingAgent.getIdentString()); for (Object res: results) { receivedResults++; SingleResult sRes = (SingleResult) res; log.info("Image = " + receivedResults + "/" + sentTasks + " " + Arrays.toString(sRes.getImageDesc()) + ", result = " + sRes.getResult()); result.add(sRes.getResult()); } } }}} You can find all the above code in the DAC sample named usage_of_the_CMBF. In order to obtain DAC sources please visit its [http://www.dacframe.org/trac/dac/wiki/Download download] page. == Results == You can see all the results with std deviation and average values on the following table: {{{ #!html DAC 0.9.1 <-->
Average 306 076.20 299 815.70 305 303.30
Std Deviation 1 271.04 160.37 240.31
Tasks: 341 Tasks: 2705 Tasks: 33700
305 375 300 041 305 465
305 659 299 687 304 989
305 656 299 881 305 116
306 073 299 917 304 909
305 726 299 867 305 420
307 049 299 584 305 529
308 427 300 001 305 505
303 547 299 646 305 573
306 852 299 879 305 156
306 398 299 654 305 371
}}} As you can see on the above table, std deviation is very small. This means, that load balancer works properly and the whole framework is stable. Moreover, significant growth of number of tasks to compute (from 341 to 33700) didn't increase the time of computation -> margin for communication is small. === CPU === CPU usage (%user and %system) gathered on the '''intel1''' machine: {{{ #!html
}}} === Memory === Memory usage gathered on the '''intel1''' machine: {{{ #!html
}}} === Network === Network usage (received and transmitted bytes/s) gathered on the '''intel1''' machine: {{{ #!html
}}}