-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23340/#review47687
-----------------------------------------------------------


Pavan, how does this play with changes from 
https://issues.apache.org/jira/browse/GIRAPH-912?


giraph-core/src/main/java/org/apache/giraph/comm/messages/NonBlockingMessageStore.java
<https://reviews.apache.org/r/23340/#comment83828>

    Finish



giraph-core/src/main/java/org/apache/giraph/comm/messages/primitives/IntByteArrayMessageStore.java
<https://reviews.apache.org/r/23340/#comment83832>

    Aren't there more message stores which you'd have to change? If there is 
only one thread ever trying to get this lock it should have practically no 
cost, right? So why making message stores more complex by having regular and 
non-blocking method, instead of calling this one every time?



giraph-core/src/main/java/org/apache/giraph/comm/messages/queue/AsyncMessageStoreWrapper.java
<https://reviews.apache.org/r/23340/#comment83831>

    You can have PartiitonMessage object here instead.
    
    This could've been much cleaner if BlockingQueue had close or waitTillEmpty 
method :-(



giraph-core/src/main/java/org/apache/giraph/comm/messages/queue/AsyncMessageStoreWrapper.java
<https://reviews.apache.org/r/23340/#comment83829>

    This can't be called while messages are still being added to the store?



giraph-core/src/main/java/org/apache/giraph/comm/messages/queue/AsyncMessageStoreWrapper.java
<https://reviews.apache.org/r/23340/#comment83830>

    Not sure why are you using term hash and not calling the map 
partition2Queue or something like that?


- Maja Kabiljo


On July 8, 2014, 4:55 p.m., Sergey Edunov wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23340/
> -----------------------------------------------------------
> 
> (Updated July 8, 2014, 4:55 p.m.)
> 
> 
> Review request for giraph.
> 
> 
> Repository: giraph-git
> 
> 
> Description
> -------
> 
> Our profiling shows that a lot of apps are neither CPU nor memory or network 
> bound. Instead they waste a lot of time waiting for lock in MessageStore. 
> That happens in netty threads. 
> We should be able to put messages into queue and then process them in other 
> set of threads. 
> It has to be configurable because adding another thread level will introduce 
> additional overhead.
> 
> I introduced new options: 
> giraph.async.message.store (false by default) that will enable async messaging
> giraph.async.message.store.threads (8 by default) that will configure number 
> of background threads required to process messages.
> 
> 
> Diffs
> -----
> 
>   giraph-core/src/main/java/org/apache/giraph/comm/ServerData.java b3f8733 
>   
> giraph-core/src/main/java/org/apache/giraph/comm/messages/InMemoryMessageStoreFactory.java
>  f691d3e 
>   
> giraph-core/src/main/java/org/apache/giraph/comm/messages/NonBlockingMessageStore.java
>  PRE-CREATION 
>   
> giraph-core/src/main/java/org/apache/giraph/comm/messages/primitives/IntByteArrayMessageStore.java
>  dbc1ce8 
>   
> giraph-core/src/main/java/org/apache/giraph/comm/messages/primitives/IntFloatMessageStore.java
>  be75ee8 
>   
> giraph-core/src/main/java/org/apache/giraph/comm/messages/primitives/LongByteArrayMessageStore.java
>  3110864 
>   
> giraph-core/src/main/java/org/apache/giraph/comm/messages/primitives/LongDoubleMessageStore.java
>  264e65a 
>   
> giraph-core/src/main/java/org/apache/giraph/comm/messages/queue/AsyncMessageStoreWrapper.java
>  PRE-CREATION 
>   
> giraph-core/src/main/java/org/apache/giraph/comm/messages/queue/PartitionMessage.java
>  PRE-CREATION 
>   
> giraph-core/src/main/java/org/apache/giraph/comm/messages/queue/package-info.java
>  PRE-CREATION 
>   giraph-core/src/main/java/org/apache/giraph/conf/GiraphConstants.java 
> 7d7ceb2 
>   giraph-core/src/main/java/org/apache/giraph/graph/GraphTaskManager.java 
> e13eedd 
>   
> giraph-core/src/test/java/org/apache/giraph/comm/messages/queue/AsyncMessageStoreWrapperTest.java
>  PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/23340/diff/
> 
> 
> Testing
> -------
> 
> I run pagerank and it gives ~7% improvement over and along with G1 GC it 
> gives ~15% improvement. And CPU usage is now close to 90% 
> 
> 
> Thanks,
> 
> Sergey Edunov
> 
>

Reply via email to