| Version 2 (modified by jeremian, 3 years ago) |
|---|
Hazelcast 1.8 (comparison of the grid/cloud computing frameworks - part I)
Test environment
Hazelcast 1.8 nodes are multi-threaded. Because of that, we had to launch only one process on every machine in order to fully utilize available processing units. Hazelcast is fully distributed, so we didn't have to launch any additional processes. You can see the architecture of the test environment on the following figure:
Code
Hazelcast's distributed executor service operates on the Callable/Runnable interfaces. The main work was done in the Agent class, which implements Callable interface:
public class Agent implements Callable<FastBigInt128>, Serializable { private static final long serialVersionUID = 1L; private String[] imageDesc; private int z; public Agent(String[] imageDesc, int z) { this.imageDesc = imageDesc; this.z = z; } public FastBigInt128 call() { Worker cmbfWorker = new Worker(); FastBigInt128 result = cmbfWorker.countInImage(imageDesc); System.out.println("\tResult from task #" + z + ", " + "\tvalue: " + result); return result; } }
In order to perform computations, we had to divide problem into small tasks and submit them into executor service:
for (int i = 1; i <= n; i++) { for (final String[] imageDesc : cmbfWorker.generateImages(i, level)) { Future<FastBigInt128> future = executorService.submit(new Agent(imageDesc, ++count)); tasks.add(future); } }
After that we had to gather results:
for (Future<FastBigInt128> w : tasks) { results.add(w.get()); }
You can find all the above code in our code repository: http://dacframe.org/lab
Results
You can see all the results with std deviation and average values on the following table:
Hazelcast 1.8 <-->As you can see on the above table, std deviation is quite big for 341 tasks test case. This means, that some sort of task pre-fetching took place and the load balancer could be improved. However, significant growth of number of tasks to compute (from 341 to 33700) didn't increase the time of computation -> margin for communication is small.
Attachments
-
Hazelcast-test-env.png
(13.7 KB) - added by jeremian
3 years ago.
Hazelcast-test-env
-
hazelcast_1_8-cpu.png
(31.3 KB) - added by klider
3 years ago.
Hazelcast-cpu
-
hazelcast_1_8-memory.png
(22.4 KB) - added by klider
3 years ago.
Hazelcast-memory
-
hazelcast_1_8-network.png
(56.8 KB) - added by klider
3 years ago.
Hazelcast-network



