I am programming for Apache Hama using Hama graph API. I have problem in scalability when running my program in a cluster. The problem is when I increase the number of machines in the cluster I am expecting to have shorter execution time but what I got is longer execution time.
I am running my program with a graph consists of 8500 vertices. When using a cluster of 2 machines the job take 479 seconds, when using 3 machines the job take 503 seconds, when using 10 machines the job take 530 seconds. Can some one tell me what I am missing?.
Here is my configuration details in hama-site.xml
file:
<configuration>
<property>
<name>bsp.master.address</name>
<value>master</value>
</property>
<property>
<name>bsp.system.dir</name>
<value>/tmp/hama-hadoop/bsp/system</value>
</property>
<property>
<name>bsp.local.dir</name>
<value>/tmp/hama-hadoop/bsp/local</value>
</property>
<property>
<name>hama.tmp.dir</name>
<value>/tmp/hama-hadoop</value>
</property>
<property>
<name>fs.default.name</name>
<value>hdfs://master:54310</value>
</property>
<property>
<name>hama.zookeeper.quorum</name>
<value>master,slave1,slave2,slave3</value>
</property>
</configuration>
The content of groomservers
file is:
master
slave1
slave2
slave3
In the main method of my job I have the following code:
public static void main(String[] args) throws IOException, ClassNotFoundException, InterruptedException {
Configuration config = new Configuration();
FileSystem hdfs = FileSystem.get(config);
HamaConfiguration conf = new HamaConfiguration();
GraphJob job = new GraphJob(conf, run.class);
job.setJobName("job");
BSPJobClient jobClient = new BSPJobClient(conf);
ClusterStatus cluster = jobClient.getClusterStatus(true);
job.setNumBspTask(cluster.getGroomServers());
...
job.setPartitioner(HashPartitioner.class);
....
if (matcherJob.waitForCompletion(true)) {
System.out.println("Job Finished");
}