hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lars Hofhansl (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-6755) HRegion.internalObtainRowLock uses unecessary AtomicInteger
Date Wed, 12 Sep 2012 05:46:09 GMT

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

Lars Hofhansl commented on HBASE-6755:

Just did a quick test (on my poor 2 core laptop): Ran PE with RandomWrite with 50 Threads
(nomapred, ROWS=5000). I added logging to the case where we have to reset the "idGenerator"
from the random number. With this patch I find that it happened 10 times, without the patch
it did not happen at all. With more cores this effect will be more pronounced - I'll try tomorrow
on my work desktop with 12 HW threads (6 cores, 2 hyper threads per core).
> HRegion.internalObtainRowLock uses unecessary AtomicInteger
> -----------------------------------------------------------
>                 Key: HBASE-6755
>                 URL: https://issues.apache.org/jira/browse/HBASE-6755
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Lars Hofhansl
>            Assignee: Lars Hofhansl
>             Fix For: 0.96.0, 0.94.3
>         Attachments: 6755-0.96.txt
> I was looking at HBase's implementation of locks and saw that is unnecessarily uses an
AtomicInteger to obtain a unique lockid.
> The observation is that we only need a unique one and don't care if we happen to skip
> In a very unscientific test I saw the %system CPU reduced when the AtomicInteger is avoided.

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

View raw message