[
https://issues.apache.org/jira/browse/HAMA-704?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13548463#comment-13548463
]
Edward J. Yoon commented on HAMA-704:
-------------------------------------
{code}
Index: src/main/java/org/apache/hama/graph/GraphJobRunner.java
===================================================================
--- src/main/java/org/apache/hama/graph/GraphJobRunner.java (revision
1427035)
+++ src/main/java/org/apache/hama/graph/GraphJobRunner.java (working copy)
@@ -179,6 +179,7 @@
BSPPeer<Writable, Writable, Writable, Writable, GraphJobMessage> peer)
throws IOException {
int activeVertices = 0;
+ int i = 0;
for (Vertex<V, E, M> vertex : vertices) {
List<M> msgs = messages.get(vertex.getVertexID());
// If there are newly received messages, restart.
@@ -202,6 +203,12 @@
activeVertices++;
}
}
+
+ messages.remove(vertex.getVertexID());
+ if((i % (vertices.size() / 10)) == 0) {
+ System.gc();
+ }
+ i++;
}
aggregationRunner.sendAggregatorValues(peer, activeVertices);
{code}
> Optimization of memory usage during message processing
> ------------------------------------------------------
>
> Key: HAMA-704
> URL: https://issues.apache.org/jira/browse/HAMA-704
> Project: Hama
> Issue Type: Improvement
> Components: graph
> Reporter: Edward J. Yoon
> Assignee: Edward J. Yoon
> Priority: Minor
> Fix For: 0.6.1
>
>
> <vertex, message> map seems consume a lot of memory. We should figure out an
> efficient way to reduce memory.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira