hama-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Edward J. Yoon (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HAMA-519) [GSoC 2012] Add simple latency and bandwidth measuring tool
Date Wed, 28 Mar 2012 13:54:26 GMT

    [ https://issues.apache.org/jira/browse/HAMA-519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13240415#comment-13240415
] 

Edward J. Yoon commented on HAMA-519:
-------------------------------------

Here's my quick and dirty example.

{code}
    private long measureLatency(BSPPeer peer) {
      long start = System.currentTimeMillis();

      if (peer.getPeerName().equals("node0")) {
        peer.send("node1", new DoubleWritable(packetSize));
      }
      peer.sync();

      if (peer.getPeerName().equals("node1")) {
        peer.send("node0", new DoubleWritable(packetSize));
      }
      peer.sync();

      long end = System.currentTimeMillis();

      return (end - start) / 2;
    }
    
    private long measureBandwidth(BSPPeer peer) {

      int loop = 1MB/packetSize;
      long start = System.currentTimeMillis();

      if (peer.getPeerName().equals("node0")) {
        for(i=0; i<loop; i++)
          peer.send("node1", packetSize);
        }
      peer.sync();

      if (peer.getPeerName().equals("node1")) {
        peer.send("node0", WORD);
      }
      peer.sync();

      long end = System.currentTimeMillis();

      return 1MB/(end-start-LATENCY);
    }
{code}
                
> [GSoC 2012] Add simple latency and bandwidth measuring tool
> -----------------------------------------------------------
>
>                 Key: HAMA-519
>                 URL: https://issues.apache.org/jira/browse/HAMA-519
>             Project: Hama
>          Issue Type: New Feature
>          Components: bsp
>            Reporter: Edward J. Yoon
>              Labels: gsoc, gsoc2012
>
> It'd be nice if we have simple latency and bandwidth measuring tool. I think this can
be added contrib.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message