You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@giraph.apache.org by "Avery Ching (JIRA)" <ji...@apache.org> on 2012/09/30 19:54:07 UTC

[jira] [Updated] (GIRAPH-353) Received metrics are not thread-safe

     [ https://issues.apache.org/jira/browse/GIRAPH-353?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Avery Ching updated GIRAPH-353:
-------------------------------

    Attachment: GIRAPH-353.patch

This patch will address this issue by adding a last updated variable and using compareAndSwap to insure that only one thread will do the update every n ms.
                
> Received metrics are not thread-safe
> ------------------------------------
>
>                 Key: GIRAPH-353
>                 URL: https://issues.apache.org/jira/browse/GIRAPH-353
>             Project: Giraph
>          Issue Type: Bug
>            Reporter: Avery Ching
>         Attachments: GIRAPH-353.patch
>
>
> In the logs we often see stuff like:
> 2012-09-28 16:47:28,835 INFO org.apache.giraph.comm.netty.handler.RequestDecoder: decode: Server window metrics MBytes/sec sent = 0.0007, MBytes/sec received = 9.2083, MBytesSent = 0.0215, MBytesReceived = 283.1398, ave sent request MBytes = 0, ave received request MBytes = 0.0762, secs waited = 30.886
> 2012-09-28 16:47:28,835 INFO org.apache.giraph.comm.netty.handler.RequestDecoder: decode: Server window metrics MBytes/sec sent = 0.0007, MBytes/sec received = 9.1614, MBytesSent = 0.0215, MBytesReceived = 281.83, ave sent request MBytes = 0, ave received request MBytes = 0.076, secs waited = 0.0
> 2012-09-28 16:47:28,835 INFO org.apache.giraph.comm.netty.handler.RequestDecoder: decode: Server window metrics MBytes/sec sent = 0.0007, MBytes/sec received = 0, MBytesSent = 0.0215, MBytesReceived = 281.6554, ave sent request MBytes = 0, ave received request MBytes = 0.076, secs waited = 0.0
> 2012-09-28 16:47:28,835 INFO org.apache.giraph.comm.netty.handler.RequestDecoder: decode: Server window metrics MBytes/sec sent = 0.0007, MBytes/sec received = 0, MBytesSent = 0.0215, MBytesReceived = 282.3169, ave sent request MBytes = 0, ave received request MBytes = 0.0761, secs waited = 0.0
> 2012-09-28 16:47:28,836 INFO org.apache.giraph.comm.netty.handler.RequestDecoder: decode: Server window metrics MBytes/sec sent = 0.0007, MBytes/sec received = 0, MBytesSent = 0.0215, MBytesReceived = 282.3169, ave sent request MBytes = 0, ave received request MBytes = 0.0761, secs waited = 0.001
> 2012-09-28 16:47:28,836 INFO org.apache.giraph.comm.netty.handler.RequestDecoder: decode: Server window metrics MBytes/sec sent = 0.0007, MBytes/sec received = 144.7954, MBytesSent = 0.0215, MBytesReceived = 282.6441, ave sent request MBytes = 0, ave received request MBytes = 0.0761, secs waited = 0.0
> 2012-09-28 16:47:28,836 INFO org.apache.giraph.comm.netty.handler.RequestDecoder: decode: Server window metrics MBytes/sec sent = 0.0007, MBytes/sec received = 9.1406, MBytesSent = 0.0215, MBytesReceived = 281.4949, ave sent request MBytes = 0, ave received request MBytes = 0.0759, secs waited = 0.0
> 2012-09-28 16:47:28,836 INFO org.apache.giraph.comm.netty.handler.RequestDecoder: decode: Server window metrics MBytes/sec sent = 0.0007, MBytes/sec received = 9.1673, MBytesSent = 0.0215, MBytesReceived = 282.6441, ave sent request MBytes = 0, ave received request MBytes = 0.0761, secs waited = 0.0
> This happens due to multiple threads calling ByteCounter#getMetricsWindow() and the method not being thread safe.

--
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