[jira] [Updated] (HBASE-13496) Make Bytes$LexicographicalComparerHolder$UnsafeComparer::compareTo inlineable

2015-07-03 Thread Sean Busbey (JIRA)

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

Sean Busbey updated HBASE-13496:

Fix Version/s: (was: 1.2.0)

 Make Bytes$LexicographicalComparerHolder$UnsafeComparer::compareTo inlineable
 -

 Key: HBASE-13496
 URL: https://issues.apache.org/jira/browse/HBASE-13496
 Project: HBase
  Issue Type: Sub-task
  Components: Scanners
Reporter: Anoop Sam John
Assignee: Anoop Sam John
 Fix For: 2.0.0, 1.1.0, 1.0.2

 Attachments: ByteBufferUtils.java, HBASE-13496.patch, 
 HBASE-13496.patch, OffheapVsOnHeapCompareTest.java, onheapoffheapcompare.tgz


 While testing with some other perf comparisons I have noticed that the above 
 method (which is very hot in read path) is not getting inline
 bq.@ 16   
 org.apache.hadoop.hbase.util.Bytes$LexicographicalComparerHolder$UnsafeComparer::compareTo
  (364 bytes)   hot method too big
 We can do minor refactoring to make it inlineable.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HBASE-13496) Make Bytes$LexicographicalComparerHolder$UnsafeComparer::compareTo inlineable

2015-04-22 Thread Anoop Sam John (JIRA)

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

Anoop Sam John updated HBASE-13496:
---
Status: Patch Available  (was: Open)

 Make Bytes$LexicographicalComparerHolder$UnsafeComparer::compareTo inlineable
 -

 Key: HBASE-13496
 URL: https://issues.apache.org/jira/browse/HBASE-13496
 Project: HBase
  Issue Type: Sub-task
  Components: Scanners
Reporter: Anoop Sam John
Assignee: Anoop Sam John
 Fix For: 2.0.0, 1.2.0

 Attachments: ByteBufferUtils.java, HBASE-13496.patch, 
 HBASE-13496.patch, OffheapVsOnHeapCompareTest.java, onheapoffheapcompare.tgz


 While testing with some other perf comparisons I have noticed that the above 
 method (which is very hot in read path) is not getting inline
 bq.@ 16   
 org.apache.hadoop.hbase.util.Bytes$LexicographicalComparerHolder$UnsafeComparer::compareTo
  (364 bytes)   hot method too big
 We can do minor refactoring to make it inlineable.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HBASE-13496) Make Bytes$LexicographicalComparerHolder$UnsafeComparer::compareTo inlineable

2015-04-22 Thread Anoop Sam John (JIRA)

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

Anoop Sam John updated HBASE-13496:
---
Attachment: HBASE-13496.patch

 Make Bytes$LexicographicalComparerHolder$UnsafeComparer::compareTo inlineable
 -

 Key: HBASE-13496
 URL: https://issues.apache.org/jira/browse/HBASE-13496
 Project: HBase
  Issue Type: Sub-task
  Components: Scanners
Reporter: Anoop Sam John
Assignee: Anoop Sam John
 Fix For: 2.0.0, 1.2.0

 Attachments: ByteBufferUtils.java, HBASE-13496.patch, 
 HBASE-13496.patch, OffheapVsOnHeapCompareTest.java, onheapoffheapcompare.tgz


 While testing with some other perf comparisons I have noticed that the above 
 method (which is very hot in read path) is not getting inline
 bq.@ 16   
 org.apache.hadoop.hbase.util.Bytes$LexicographicalComparerHolder$UnsafeComparer::compareTo
  (364 bytes)   hot method too big
 We can do minor refactoring to make it inlineable.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HBASE-13496) Make Bytes$LexicographicalComparerHolder$UnsafeComparer::compareTo inlineable

2015-04-22 Thread Anoop Sam John (JIRA)

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

Anoop Sam John updated HBASE-13496:
---
   Resolution: Fixed
Fix Version/s: 1.0.2
   1.1.0
 Hadoop Flags: Reviewed
   Status: Resolved  (was: Patch Available)

Pushed to 0.98+ branches.  Thanks for reveiws  Andy  Stack.
Thanks a lot Stack for testing with JMH and sharing the test. Helped me a lot 
to learn it and start doing same for other micro benchmarks.

 Make Bytes$LexicographicalComparerHolder$UnsafeComparer::compareTo inlineable
 -

 Key: HBASE-13496
 URL: https://issues.apache.org/jira/browse/HBASE-13496
 Project: HBase
  Issue Type: Sub-task
  Components: Scanners
Reporter: Anoop Sam John
Assignee: Anoop Sam John
 Fix For: 2.0.0, 1.1.0, 1.0.2, 1.2.0

 Attachments: ByteBufferUtils.java, HBASE-13496.patch, 
 HBASE-13496.patch, OffheapVsOnHeapCompareTest.java, onheapoffheapcompare.tgz


 While testing with some other perf comparisons I have noticed that the above 
 method (which is very hot in read path) is not getting inline
 bq.@ 16   
 org.apache.hadoop.hbase.util.Bytes$LexicographicalComparerHolder$UnsafeComparer::compareTo
  (364 bytes)   hot method too big
 We can do minor refactoring to make it inlineable.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HBASE-13496) Make Bytes$LexicographicalComparerHolder$UnsafeComparer::compareTo inlineable

2015-04-21 Thread Anoop Sam John (JIRA)

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

Anoop Sam John updated HBASE-13496:
---
Attachment: HBASE-13496.patch

Pls note the statements movements to other private methods.  Actually we have 
to reverseBytes (for littleEndian case) iff we have a non equal case.(Only 
while compare- so inside the if).   Not a big deal still avoiding 2 ops.
Also a multiply in loop var is avoided.  

 Make Bytes$LexicographicalComparerHolder$UnsafeComparer::compareTo inlineable
 -

 Key: HBASE-13496
 URL: https://issues.apache.org/jira/browse/HBASE-13496
 Project: HBase
  Issue Type: Sub-task
  Components: Scanners
Reporter: Anoop Sam John
Assignee: Anoop Sam John
 Fix For: 2.0.0, 1.2.0

 Attachments: HBASE-13496.patch


 While testing with some other perf comparisons I have noticed that the above 
 method (which is very hot in read path) is not getting inline
 bq.@ 16   
 org.apache.hadoop.hbase.util.Bytes$LexicographicalComparerHolder$UnsafeComparer::compareTo
  (364 bytes)   hot method too big
 We can do minor refactoring to make it inlineable.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HBASE-13496) Make Bytes$LexicographicalComparerHolder$UnsafeComparer::compareTo inlineable

2015-04-21 Thread Anoop Sam John (JIRA)

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

Anoop Sam John updated HBASE-13496:
---
Attachment: OffheapVsOnHeapCompareTest.java
ByteBufferUtils.java

[~stack]
OffheapVsOnHeapCompareTest  is the micro test I was running. Basically I was 
testing the byte[] compare vs BB compare both using Unsafe APIs.  As that 
result not valid in this Jira not saying abt that.

Then I saw the inlining problem and with the patch I evaluated the onheap 
compare time
Avg of 25 runs  - For comparing the 2 arrays for 10 million time
With out patch  321814965.3  (nano secs) 
With patch 211087522.8

 Make Bytes$LexicographicalComparerHolder$UnsafeComparer::compareTo inlineable
 -

 Key: HBASE-13496
 URL: https://issues.apache.org/jira/browse/HBASE-13496
 Project: HBase
  Issue Type: Sub-task
  Components: Scanners
Reporter: Anoop Sam John
Assignee: Anoop Sam John
 Fix For: 2.0.0, 1.2.0

 Attachments: ByteBufferUtils.java, HBASE-13496.patch, 
 OffheapVsOnHeapCompareTest.java


 While testing with some other perf comparisons I have noticed that the above 
 method (which is very hot in read path) is not getting inline
 bq.@ 16   
 org.apache.hadoop.hbase.util.Bytes$LexicographicalComparerHolder$UnsafeComparer::compareTo
  (364 bytes)   hot method too big
 We can do minor refactoring to make it inlineable.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HBASE-13496) Make Bytes$LexicographicalComparerHolder$UnsafeComparer::compareTo inlineable

2015-04-21 Thread stack (JIRA)

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

stack updated HBASE-13496:
--
Attachment: onheapoffheapcompare.tgz

My little JMH project after following these instructions: 
http://openjdk.java.net/projects/code-tools/jmh/  I still need to learn it but 
seems very nice for this kinda thing. +1 on using this going forward (lets 
think about how we'd add these to our codebase; its a little awkward in that 
jmh wants to own the parent pom and running the test is done against a built 
jar).

I made two 'benchmarks' out of [~anoop.hbase]'s class unrolling the loop (jmh 
warns about how loops can color measurement). One using onheap compare and 
another offheap with unsafe compares. I then ran one test and then another 
using flags to specify forks and iterations.  I ran them independently (see 
above for how I did it).

 Make Bytes$LexicographicalComparerHolder$UnsafeComparer::compareTo inlineable
 -

 Key: HBASE-13496
 URL: https://issues.apache.org/jira/browse/HBASE-13496
 Project: HBase
  Issue Type: Sub-task
  Components: Scanners
Reporter: Anoop Sam John
Assignee: Anoop Sam John
 Fix For: 2.0.0, 1.2.0

 Attachments: ByteBufferUtils.java, HBASE-13496.patch, 
 OffheapVsOnHeapCompareTest.java, onheapoffheapcompare.tgz


 While testing with some other perf comparisons I have noticed that the above 
 method (which is very hot in read path) is not getting inline
 bq.@ 16   
 org.apache.hadoop.hbase.util.Bytes$LexicographicalComparerHolder$UnsafeComparer::compareTo
  (364 bytes)   hot method too big
 We can do minor refactoring to make it inlineable.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (HBASE-13496) Make Bytes$LexicographicalComparerHolder$UnsafeComparer::compareTo inlineable

2015-04-18 Thread Anoop Sam John (JIRA)

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

Anoop Sam John updated HBASE-13496:
---
Description: 
While testing with some other perf comparisons I have noticed that the above 
method (which is very hot in read path) is not getting inline

bq.@ 16   
org.apache.hadoop.hbase.util.Bytes$LexicographicalComparerHolder$UnsafeComparer::compareTo
 (364 bytes)   hot method too big

We can do minor refactoring to make it inlineable.

 Make Bytes$LexicographicalComparerHolder$UnsafeComparer::compareTo inlineable
 -

 Key: HBASE-13496
 URL: https://issues.apache.org/jira/browse/HBASE-13496
 Project: HBase
  Issue Type: Sub-task
  Components: Scanners
Reporter: Anoop Sam John
Assignee: Anoop Sam John
 Fix For: 2.0.0, 1.2.0


 While testing with some other perf comparisons I have noticed that the above 
 method (which is very hot in read path) is not getting inline
 bq.@ 16   
 org.apache.hadoop.hbase.util.Bytes$LexicographicalComparerHolder$UnsafeComparer::compareTo
  (364 bytes)   hot method too big
 We can do minor refactoring to make it inlineable.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)