clintropolis opened a new pull request #8116: remove unnecessary lock in 
ForegroundCachePopulator leading to a lot of contention
URL: https://github.com/apache/incubator-druid/pull/8116
 
 
   ### Description
   
   This PR adds a performance improvement to `ForegroundTaskRunner`, removing a 
synchronized block that appears to be unnecessary, since `CachePopulator` is 
shared by all processing threads but the lock covers bytes and json generator 
that are tied to a specific segment which should only be happening in a single 
thread.
   
   Observed a lot of time being spent in `ForegroundCachePopulator`, displayed 
in the following flame graph:
    
   ![Screen Shot 2019-07-19 at 4 44 52 
PM](https://user-images.githubusercontent.com/1577461/61570902-8eb16800-aa44-11e9-83f9-0bcf9d206246.png)
   
   I don't have direct access to the cluster where these observations were 
made, so I don't have measurements for the fix, I will see if I can get some 
equivalent measurements done locally and update this ticket.
   
   <hr>
   
   This PR has:
   - [x] been self-reviewed.
      - [x] using the [concurrency 
checklist](https://github.com/apache/incubator-druid/blob/master/dev/code-review/concurrency.md)
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to