hama-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Edward J. Yoon (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HAMA-704) Optimization of memory usage during message processing
Date Wed, 09 Jan 2013 12:42:12 GMT

    [ 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

Mime
View raw message