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

Anoop Sam John commented on HBASE-5897:
---------------------------------------

As per the simple patch also, there can be more CP calls happening for one Put
{code}
-      for (int i = 0; i < batchOp.operations.length; i++) {
+      for (int i = batchOp.nextIndexToProcess; i < batchOp.operations.length; 
i++) {
{code}
Suppose in 2 calls to doMiniBatchPut() a put(List) with 100 puts operation is 
getting completed. For the 1st run it will call hook for all 100 Puts. Then in 
the next run previously it was calling again 100 times. Now it will be for all 
the remaining puts which were not handled in the 1st iteration. 

In Todd's patch this will not happen.[Calling all pre hook just before the 1st 
call to the doMiniBatchPut()] But that will call the pre hook much before the 
actual put operation. Is this correct? How some one can for sure get a pre hook 
call before the actual put() for a Put?
                
> prePut coprocessor hook causing substantial CPU usage
> -----------------------------------------------------
>
>                 Key: HBASE-5897
>                 URL: https://issues.apache.org/jira/browse/HBASE-5897
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.92.0
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Critical
>             Fix For: 0.92.2, 0.94.0, 0.96.0
>
>         Attachments: 5897-simple.txt, hbase-5897.txt
>
>
> I was running an insert workload against trunk under oprofile and saw that a 
> significant portion of CPU usage was going to calling the "prePut" 
> coprocessor hook inside doMiniBatchPut, even though I don't have any 
> coprocessors installed. I ran a million-row insert and collected CPU time 
> spent in the RS after commenting out the preput hook, and found CPU usage 
> reduced by 33%.

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

        

Reply via email to