You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "T Jake Luciani (Created) (JIRA)" <ji...@apache.org> on 2011/09/30 18:53:45 UTC
[jira] [Created] (CASSANDRA-3286) Performance issue in
ByteBufferUtil
Performance issue in ByteBufferUtil
-----------------------------------
Key: CASSANDRA-3286
URL: https://issues.apache.org/jira/browse/CASSANDRA-3286
Project: Cassandra
Issue Type: Improvement
Components: Core
Reporter: T Jake Luciani
Assignee: T Jake Luciani
Priority: Minor
Fix For: 1.0.1
Profiling 1.0 we can see ByteBufferUtil.compareUnsigned is slow.
{code}
Excl. Incl. Incl. Incl. Name
User CPU User CPU Sync Wait Sync Wait
sec. sec. sec. Count
318.491 318.491 1.400 113786 <Total>
40.561 40.561 0. 0 <Unknown>
18.972 19.093 0. 0 <static>@0xd949 (<libpthread-2.5.so>)
17.718 18.730 0. 0 sun.security.provider.MD5.implCompress(byte[], int)
14.396 14.396 0. 0 __pthread_cond_signal
8.908 8.908 0. 0 org.apache.cassandra.utils.ByteBufferUtil.compareUnsigned(java.nio.ByteBuffer, java.nio.ByteBuffer)
7.435 7.688 0. 0 __pthread_cond_timedwait
7.127 7.182 0. 0 <static>@0xd8c9 (<libpthread-2.5.so>)
7.072 7.072 0. 0 jbyte_disjoint_arraycopy
6.764 39.065 0. 0 org.apache.cassandra.utils.ReducingIterator.computeNext()
6.533 17.575 0. 0 java.util.concurrent.ConcurrentSkipListMap.doPut(java.lang.Object, java.lang.Object, boolean)
6.346 6.346 0. 0 com.sun.crypto.provider.SunJCE_c.a(byte[], int, byte[], int)
5.378 5.433 0. 0 send
4.861 6.643 0.000 1 org.apache.cassandra.utils.ByteBufferUtil.read(java.io.DataInput, int)
4.410 9.260 0. 0 org.apache.commons.collections.iterators.CollatingIterator.least()
4.355 4.355 0. 0 java.io.ByteArrayOutputStream.write(int)
4.300 6.632 0. 0 java.io.ByteArrayOutputStream.write(byte[], int, int)
3.827 30.190 0. 0 org.apache.cassandra.dht.RandomPartitioner.decorateKey(java.nio.ByteBuffer)
3.783 23.954 0. 0 org.apache.cassandra.utils.FBUtilities.hash(java.nio.ByteBuffer[])
3.783 3.860 0. 0 <static>@0xd486c (<libc-2.5.so>)
3.739 3.739 0. 0 clock_gettime
{code}
We can avoid the problem when the ByteBuffer has a backing array
--
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
[jira] [Updated] (CASSANDRA-3286) Performance issue in
ByteBufferUtil
Posted by "T Jake Luciani (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-3286?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
T Jake Luciani updated CASSANDRA-3286:
--------------------------------------
Attachment: v1-0001-CASSANDRA-3286-perf-improvement-fix-and-fbutilities-ca.txt
> Performance issue in ByteBufferUtil
> -----------------------------------
>
> Key: CASSANDRA-3286
> URL: https://issues.apache.org/jira/browse/CASSANDRA-3286
> Project: Cassandra
> Issue Type: Improvement
> Components: Core
> Reporter: T Jake Luciani
> Assignee: T Jake Luciani
> Priority: Minor
> Fix For: 1.0.1
>
> Attachments: v1-0001-CASSANDRA-3286-perf-improvement-fix-and-fbutilities-ca.txt
>
>
> Profiling 1.0 we can see ByteBufferUtil.compareUnsigned is slow.
> {code}
> Excl. Incl. Incl. Incl. Name
> User CPU User CPU Sync Wait Sync Wait
> sec. sec. sec. Count
> 318.491 318.491 1.400 113786 <Total>
> 40.561 40.561 0. 0 <Unknown>
> 18.972 19.093 0. 0 <static>@0xd949 (<libpthread-2.5.so>)
> 17.718 18.730 0. 0 sun.security.provider.MD5.implCompress(byte[], int)
> 14.396 14.396 0. 0 __pthread_cond_signal
> 8.908 8.908 0. 0 org.apache.cassandra.utils.ByteBufferUtil.compareUnsigned(java.nio.ByteBuffer, java.nio.ByteBuffer)
> 7.435 7.688 0. 0 __pthread_cond_timedwait
> 7.127 7.182 0. 0 <static>@0xd8c9 (<libpthread-2.5.so>)
> 7.072 7.072 0. 0 jbyte_disjoint_arraycopy
> 6.764 39.065 0. 0 org.apache.cassandra.utils.ReducingIterator.computeNext()
> 6.533 17.575 0. 0 java.util.concurrent.ConcurrentSkipListMap.doPut(java.lang.Object, java.lang.Object, boolean)
> 6.346 6.346 0. 0 com.sun.crypto.provider.SunJCE_c.a(byte[], int, byte[], int)
> 5.378 5.433 0. 0 send
> 4.861 6.643 0.000 1 org.apache.cassandra.utils.ByteBufferUtil.read(java.io.DataInput, int)
> 4.410 9.260 0. 0 org.apache.commons.collections.iterators.CollatingIterator.least()
> 4.355 4.355 0. 0 java.io.ByteArrayOutputStream.write(int)
> 4.300 6.632 0. 0 java.io.ByteArrayOutputStream.write(byte[], int, int)
> 3.827 30.190 0. 0 org.apache.cassandra.dht.RandomPartitioner.decorateKey(java.nio.ByteBuffer)
> 3.783 23.954 0. 0 org.apache.cassandra.utils.FBUtilities.hash(java.nio.ByteBuffer[])
> 3.783 3.860 0. 0 <static>@0xd486c (<libc-2.5.so>)
> 3.739 3.739 0. 0 clock_gettime
> {code}
> We can avoid the problem when the ByteBuffer has a backing array
--
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
[jira] [Commented] (CASSANDRA-3286) Performance issue in
ByteBufferUtil
Posted by "Yang Yang (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-3286?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13140284#comment-13140284 ]
Yang Yang commented on CASSANDRA-3286:
--------------------------------------
what tools did you use to generate the profiling output above? thanks
yang
> Performance issue in ByteBufferUtil
> -----------------------------------
>
> Key: CASSANDRA-3286
> URL: https://issues.apache.org/jira/browse/CASSANDRA-3286
> Project: Cassandra
> Issue Type: Improvement
> Components: Core
> Reporter: T Jake Luciani
> Assignee: T Jake Luciani
> Priority: Minor
> Fix For: 1.0.1
>
> Attachments: v1-0001-CASSANDRA-3286-perf-improvement-fix-and-fbutilities-ca.txt
>
>
> Profiling 1.0 we can see ByteBufferUtil.compareUnsigned is slow.
> {code}
> Excl. Incl. Incl. Incl. Name
> User CPU User CPU Sync Wait Sync Wait
> sec. sec. sec. Count
> 318.491 318.491 1.400 113786 <Total>
> 40.561 40.561 0. 0 <Unknown>
> 18.972 19.093 0. 0 <static>@0xd949 (<libpthread-2.5.so>)
> 17.718 18.730 0. 0 sun.security.provider.MD5.implCompress(byte[], int)
> 14.396 14.396 0. 0 __pthread_cond_signal
> 8.908 8.908 0. 0 org.apache.cassandra.utils.ByteBufferUtil.compareUnsigned(java.nio.ByteBuffer, java.nio.ByteBuffer)
> 7.435 7.688 0. 0 __pthread_cond_timedwait
> 7.127 7.182 0. 0 <static>@0xd8c9 (<libpthread-2.5.so>)
> 7.072 7.072 0. 0 jbyte_disjoint_arraycopy
> 6.764 39.065 0. 0 org.apache.cassandra.utils.ReducingIterator.computeNext()
> 6.533 17.575 0. 0 java.util.concurrent.ConcurrentSkipListMap.doPut(java.lang.Object, java.lang.Object, boolean)
> 6.346 6.346 0. 0 com.sun.crypto.provider.SunJCE_c.a(byte[], int, byte[], int)
> 5.378 5.433 0. 0 send
> 4.861 6.643 0.000 1 org.apache.cassandra.utils.ByteBufferUtil.read(java.io.DataInput, int)
> 4.410 9.260 0. 0 org.apache.commons.collections.iterators.CollatingIterator.least()
> 4.355 4.355 0. 0 java.io.ByteArrayOutputStream.write(int)
> 4.300 6.632 0. 0 java.io.ByteArrayOutputStream.write(byte[], int, int)
> 3.827 30.190 0. 0 org.apache.cassandra.dht.RandomPartitioner.decorateKey(java.nio.ByteBuffer)
> 3.783 23.954 0. 0 org.apache.cassandra.utils.FBUtilities.hash(java.nio.ByteBuffer[])
> 3.783 3.860 0. 0 <static>@0xd486c (<libc-2.5.so>)
> 3.739 3.739 0. 0 clock_gettime
> {code}
> We can avoid the problem when the ByteBuffer has a backing array
--
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
[jira] [Commented] (CASSANDRA-3286) Performance issue in
ByteBufferUtil
Posted by "T Jake Luciani (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-3286?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13118243#comment-13118243 ]
T Jake Luciani commented on CASSANDRA-3286:
-------------------------------------------
fixed in new attachement
> Performance issue in ByteBufferUtil
> -----------------------------------
>
> Key: CASSANDRA-3286
> URL: https://issues.apache.org/jira/browse/CASSANDRA-3286
> Project: Cassandra
> Issue Type: Improvement
> Components: Core
> Reporter: T Jake Luciani
> Assignee: T Jake Luciani
> Priority: Minor
> Fix For: 1.0.1
>
> Attachments: v1-0001-CASSANDRA-3286-perf-improvement-fix-and-fbutilities-ca.txt
>
>
> Profiling 1.0 we can see ByteBufferUtil.compareUnsigned is slow.
> {code}
> Excl. Incl. Incl. Incl. Name
> User CPU User CPU Sync Wait Sync Wait
> sec. sec. sec. Count
> 318.491 318.491 1.400 113786 <Total>
> 40.561 40.561 0. 0 <Unknown>
> 18.972 19.093 0. 0 <static>@0xd949 (<libpthread-2.5.so>)
> 17.718 18.730 0. 0 sun.security.provider.MD5.implCompress(byte[], int)
> 14.396 14.396 0. 0 __pthread_cond_signal
> 8.908 8.908 0. 0 org.apache.cassandra.utils.ByteBufferUtil.compareUnsigned(java.nio.ByteBuffer, java.nio.ByteBuffer)
> 7.435 7.688 0. 0 __pthread_cond_timedwait
> 7.127 7.182 0. 0 <static>@0xd8c9 (<libpthread-2.5.so>)
> 7.072 7.072 0. 0 jbyte_disjoint_arraycopy
> 6.764 39.065 0. 0 org.apache.cassandra.utils.ReducingIterator.computeNext()
> 6.533 17.575 0. 0 java.util.concurrent.ConcurrentSkipListMap.doPut(java.lang.Object, java.lang.Object, boolean)
> 6.346 6.346 0. 0 com.sun.crypto.provider.SunJCE_c.a(byte[], int, byte[], int)
> 5.378 5.433 0. 0 send
> 4.861 6.643 0.000 1 org.apache.cassandra.utils.ByteBufferUtil.read(java.io.DataInput, int)
> 4.410 9.260 0. 0 org.apache.commons.collections.iterators.CollatingIterator.least()
> 4.355 4.355 0. 0 java.io.ByteArrayOutputStream.write(int)
> 4.300 6.632 0. 0 java.io.ByteArrayOutputStream.write(byte[], int, int)
> 3.827 30.190 0. 0 org.apache.cassandra.dht.RandomPartitioner.decorateKey(java.nio.ByteBuffer)
> 3.783 23.954 0. 0 org.apache.cassandra.utils.FBUtilities.hash(java.nio.ByteBuffer[])
> 3.783 3.860 0. 0 <static>@0xd486c (<libc-2.5.so>)
> 3.739 3.739 0. 0 clock_gettime
> {code}
> We can avoid the problem when the ByteBuffer has a backing array
--
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
[jira] [Commented] (CASSANDRA-3286) Performance issue in
ByteBufferUtil
Posted by "T Jake Luciani (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-3286?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13118212#comment-13118212 ]
T Jake Luciani commented on CASSANDRA-3286:
-------------------------------------------
If you look at FBUtilities.compareUnsigned it's not lengths it's offsets :(
> Performance issue in ByteBufferUtil
> -----------------------------------
>
> Key: CASSANDRA-3286
> URL: https://issues.apache.org/jira/browse/CASSANDRA-3286
> Project: Cassandra
> Issue Type: Improvement
> Components: Core
> Reporter: T Jake Luciani
> Assignee: T Jake Luciani
> Priority: Minor
> Fix For: 1.0.1
>
> Attachments: v1-0001-CASSANDRA-3286-perf-improvement.txt
>
>
> Profiling 1.0 we can see ByteBufferUtil.compareUnsigned is slow.
> {code}
> Excl. Incl. Incl. Incl. Name
> User CPU User CPU Sync Wait Sync Wait
> sec. sec. sec. Count
> 318.491 318.491 1.400 113786 <Total>
> 40.561 40.561 0. 0 <Unknown>
> 18.972 19.093 0. 0 <static>@0xd949 (<libpthread-2.5.so>)
> 17.718 18.730 0. 0 sun.security.provider.MD5.implCompress(byte[], int)
> 14.396 14.396 0. 0 __pthread_cond_signal
> 8.908 8.908 0. 0 org.apache.cassandra.utils.ByteBufferUtil.compareUnsigned(java.nio.ByteBuffer, java.nio.ByteBuffer)
> 7.435 7.688 0. 0 __pthread_cond_timedwait
> 7.127 7.182 0. 0 <static>@0xd8c9 (<libpthread-2.5.so>)
> 7.072 7.072 0. 0 jbyte_disjoint_arraycopy
> 6.764 39.065 0. 0 org.apache.cassandra.utils.ReducingIterator.computeNext()
> 6.533 17.575 0. 0 java.util.concurrent.ConcurrentSkipListMap.doPut(java.lang.Object, java.lang.Object, boolean)
> 6.346 6.346 0. 0 com.sun.crypto.provider.SunJCE_c.a(byte[], int, byte[], int)
> 5.378 5.433 0. 0 send
> 4.861 6.643 0.000 1 org.apache.cassandra.utils.ByteBufferUtil.read(java.io.DataInput, int)
> 4.410 9.260 0. 0 org.apache.commons.collections.iterators.CollatingIterator.least()
> 4.355 4.355 0. 0 java.io.ByteArrayOutputStream.write(int)
> 4.300 6.632 0. 0 java.io.ByteArrayOutputStream.write(byte[], int, int)
> 3.827 30.190 0. 0 org.apache.cassandra.dht.RandomPartitioner.decorateKey(java.nio.ByteBuffer)
> 3.783 23.954 0. 0 org.apache.cassandra.utils.FBUtilities.hash(java.nio.ByteBuffer[])
> 3.783 3.860 0. 0 <static>@0xd486c (<libc-2.5.so>)
> 3.739 3.739 0. 0 clock_gettime
> {code}
> We can avoid the problem when the ByteBuffer has a backing array
--
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
[jira] [Commented] (CASSANDRA-3286) Performance issue in
ByteBufferUtil
Posted by "Jonathan Ellis (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-3286?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13118246#comment-13118246 ]
Jonathan Ellis commented on CASSANDRA-3286:
-------------------------------------------
+1
> Performance issue in ByteBufferUtil
> -----------------------------------
>
> Key: CASSANDRA-3286
> URL: https://issues.apache.org/jira/browse/CASSANDRA-3286
> Project: Cassandra
> Issue Type: Improvement
> Components: Core
> Reporter: T Jake Luciani
> Assignee: T Jake Luciani
> Priority: Minor
> Fix For: 1.0.1
>
> Attachments: v1-0001-CASSANDRA-3286-perf-improvement-fix-and-fbutilities-ca.txt
>
>
> Profiling 1.0 we can see ByteBufferUtil.compareUnsigned is slow.
> {code}
> Excl. Incl. Incl. Incl. Name
> User CPU User CPU Sync Wait Sync Wait
> sec. sec. sec. Count
> 318.491 318.491 1.400 113786 <Total>
> 40.561 40.561 0. 0 <Unknown>
> 18.972 19.093 0. 0 <static>@0xd949 (<libpthread-2.5.so>)
> 17.718 18.730 0. 0 sun.security.provider.MD5.implCompress(byte[], int)
> 14.396 14.396 0. 0 __pthread_cond_signal
> 8.908 8.908 0. 0 org.apache.cassandra.utils.ByteBufferUtil.compareUnsigned(java.nio.ByteBuffer, java.nio.ByteBuffer)
> 7.435 7.688 0. 0 __pthread_cond_timedwait
> 7.127 7.182 0. 0 <static>@0xd8c9 (<libpthread-2.5.so>)
> 7.072 7.072 0. 0 jbyte_disjoint_arraycopy
> 6.764 39.065 0. 0 org.apache.cassandra.utils.ReducingIterator.computeNext()
> 6.533 17.575 0. 0 java.util.concurrent.ConcurrentSkipListMap.doPut(java.lang.Object, java.lang.Object, boolean)
> 6.346 6.346 0. 0 com.sun.crypto.provider.SunJCE_c.a(byte[], int, byte[], int)
> 5.378 5.433 0. 0 send
> 4.861 6.643 0.000 1 org.apache.cassandra.utils.ByteBufferUtil.read(java.io.DataInput, int)
> 4.410 9.260 0. 0 org.apache.commons.collections.iterators.CollatingIterator.least()
> 4.355 4.355 0. 0 java.io.ByteArrayOutputStream.write(int)
> 4.300 6.632 0. 0 java.io.ByteArrayOutputStream.write(byte[], int, int)
> 3.827 30.190 0. 0 org.apache.cassandra.dht.RandomPartitioner.decorateKey(java.nio.ByteBuffer)
> 3.783 23.954 0. 0 org.apache.cassandra.utils.FBUtilities.hash(java.nio.ByteBuffer[])
> 3.783 3.860 0. 0 <static>@0xd486c (<libc-2.5.so>)
> 3.739 3.739 0. 0 clock_gettime
> {code}
> We can avoid the problem when the ByteBuffer has a backing array
--
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
[jira] [Updated] (CASSANDRA-3286) Performance issue in
ByteBufferUtil
Posted by "T Jake Luciani (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-3286?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
T Jake Luciani updated CASSANDRA-3286:
--------------------------------------
Attachment: v1-0001-CASSANDRA-3286-perf-improvement.txt
> Performance issue in ByteBufferUtil
> -----------------------------------
>
> Key: CASSANDRA-3286
> URL: https://issues.apache.org/jira/browse/CASSANDRA-3286
> Project: Cassandra
> Issue Type: Improvement
> Components: Core
> Reporter: T Jake Luciani
> Assignee: T Jake Luciani
> Priority: Minor
> Fix For: 1.0.1
>
> Attachments: v1-0001-CASSANDRA-3286-perf-improvement.txt
>
>
> Profiling 1.0 we can see ByteBufferUtil.compareUnsigned is slow.
> {code}
> Excl. Incl. Incl. Incl. Name
> User CPU User CPU Sync Wait Sync Wait
> sec. sec. sec. Count
> 318.491 318.491 1.400 113786 <Total>
> 40.561 40.561 0. 0 <Unknown>
> 18.972 19.093 0. 0 <static>@0xd949 (<libpthread-2.5.so>)
> 17.718 18.730 0. 0 sun.security.provider.MD5.implCompress(byte[], int)
> 14.396 14.396 0. 0 __pthread_cond_signal
> 8.908 8.908 0. 0 org.apache.cassandra.utils.ByteBufferUtil.compareUnsigned(java.nio.ByteBuffer, java.nio.ByteBuffer)
> 7.435 7.688 0. 0 __pthread_cond_timedwait
> 7.127 7.182 0. 0 <static>@0xd8c9 (<libpthread-2.5.so>)
> 7.072 7.072 0. 0 jbyte_disjoint_arraycopy
> 6.764 39.065 0. 0 org.apache.cassandra.utils.ReducingIterator.computeNext()
> 6.533 17.575 0. 0 java.util.concurrent.ConcurrentSkipListMap.doPut(java.lang.Object, java.lang.Object, boolean)
> 6.346 6.346 0. 0 com.sun.crypto.provider.SunJCE_c.a(byte[], int, byte[], int)
> 5.378 5.433 0. 0 send
> 4.861 6.643 0.000 1 org.apache.cassandra.utils.ByteBufferUtil.read(java.io.DataInput, int)
> 4.410 9.260 0. 0 org.apache.commons.collections.iterators.CollatingIterator.least()
> 4.355 4.355 0. 0 java.io.ByteArrayOutputStream.write(int)
> 4.300 6.632 0. 0 java.io.ByteArrayOutputStream.write(byte[], int, int)
> 3.827 30.190 0. 0 org.apache.cassandra.dht.RandomPartitioner.decorateKey(java.nio.ByteBuffer)
> 3.783 23.954 0. 0 org.apache.cassandra.utils.FBUtilities.hash(java.nio.ByteBuffer[])
> 3.783 3.860 0. 0 <static>@0xd486c (<libc-2.5.so>)
> 3.739 3.739 0. 0 clock_gettime
> {code}
> We can avoid the problem when the ByteBuffer has a backing array
--
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
[jira] [Commented] (CASSANDRA-3286) Performance issue in
ByteBufferUtil
Posted by "Jonathan Ellis (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-3286?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13118228#comment-13118228 ]
Jonathan Ellis commented on CASSANDRA-3286:
-------------------------------------------
Let's fix that. Everywhere else (e.g. OutputStream) byte[] regions take offset + length. It looks like the only existing caller of compareUnsigned doesn't care either way (length == end offset).
> Performance issue in ByteBufferUtil
> -----------------------------------
>
> Key: CASSANDRA-3286
> URL: https://issues.apache.org/jira/browse/CASSANDRA-3286
> Project: Cassandra
> Issue Type: Improvement
> Components: Core
> Reporter: T Jake Luciani
> Assignee: T Jake Luciani
> Priority: Minor
> Fix For: 1.0.1
>
> Attachments: v1-0001-CASSANDRA-3286-perf-improvement.txt
>
>
> Profiling 1.0 we can see ByteBufferUtil.compareUnsigned is slow.
> {code}
> Excl. Incl. Incl. Incl. Name
> User CPU User CPU Sync Wait Sync Wait
> sec. sec. sec. Count
> 318.491 318.491 1.400 113786 <Total>
> 40.561 40.561 0. 0 <Unknown>
> 18.972 19.093 0. 0 <static>@0xd949 (<libpthread-2.5.so>)
> 17.718 18.730 0. 0 sun.security.provider.MD5.implCompress(byte[], int)
> 14.396 14.396 0. 0 __pthread_cond_signal
> 8.908 8.908 0. 0 org.apache.cassandra.utils.ByteBufferUtil.compareUnsigned(java.nio.ByteBuffer, java.nio.ByteBuffer)
> 7.435 7.688 0. 0 __pthread_cond_timedwait
> 7.127 7.182 0. 0 <static>@0xd8c9 (<libpthread-2.5.so>)
> 7.072 7.072 0. 0 jbyte_disjoint_arraycopy
> 6.764 39.065 0. 0 org.apache.cassandra.utils.ReducingIterator.computeNext()
> 6.533 17.575 0. 0 java.util.concurrent.ConcurrentSkipListMap.doPut(java.lang.Object, java.lang.Object, boolean)
> 6.346 6.346 0. 0 com.sun.crypto.provider.SunJCE_c.a(byte[], int, byte[], int)
> 5.378 5.433 0. 0 send
> 4.861 6.643 0.000 1 org.apache.cassandra.utils.ByteBufferUtil.read(java.io.DataInput, int)
> 4.410 9.260 0. 0 org.apache.commons.collections.iterators.CollatingIterator.least()
> 4.355 4.355 0. 0 java.io.ByteArrayOutputStream.write(int)
> 4.300 6.632 0. 0 java.io.ByteArrayOutputStream.write(byte[], int, int)
> 3.827 30.190 0. 0 org.apache.cassandra.dht.RandomPartitioner.decorateKey(java.nio.ByteBuffer)
> 3.783 23.954 0. 0 org.apache.cassandra.utils.FBUtilities.hash(java.nio.ByteBuffer[])
> 3.783 3.860 0. 0 <static>@0xd486c (<libc-2.5.so>)
> 3.739 3.739 0. 0 clock_gettime
> {code}
> We can avoid the problem when the ByteBuffer has a backing array
--
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
[jira] [Updated] (CASSANDRA-3286) Performance issue in
ByteBufferUtil
Posted by "T Jake Luciani (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-3286?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
T Jake Luciani updated CASSANDRA-3286:
--------------------------------------
Attachment: (was: v1-0001-CASSANDRA-3286-perf-improvement-fix-and-fbutilities-ca.txt)
> Performance issue in ByteBufferUtil
> -----------------------------------
>
> Key: CASSANDRA-3286
> URL: https://issues.apache.org/jira/browse/CASSANDRA-3286
> Project: Cassandra
> Issue Type: Improvement
> Components: Core
> Reporter: T Jake Luciani
> Assignee: T Jake Luciani
> Priority: Minor
> Fix For: 1.0.1
>
> Attachments: v1-0001-CASSANDRA-3286-perf-improvement-fix-and-fbutilities-ca.txt
>
>
> Profiling 1.0 we can see ByteBufferUtil.compareUnsigned is slow.
> {code}
> Excl. Incl. Incl. Incl. Name
> User CPU User CPU Sync Wait Sync Wait
> sec. sec. sec. Count
> 318.491 318.491 1.400 113786 <Total>
> 40.561 40.561 0. 0 <Unknown>
> 18.972 19.093 0. 0 <static>@0xd949 (<libpthread-2.5.so>)
> 17.718 18.730 0. 0 sun.security.provider.MD5.implCompress(byte[], int)
> 14.396 14.396 0. 0 __pthread_cond_signal
> 8.908 8.908 0. 0 org.apache.cassandra.utils.ByteBufferUtil.compareUnsigned(java.nio.ByteBuffer, java.nio.ByteBuffer)
> 7.435 7.688 0. 0 __pthread_cond_timedwait
> 7.127 7.182 0. 0 <static>@0xd8c9 (<libpthread-2.5.so>)
> 7.072 7.072 0. 0 jbyte_disjoint_arraycopy
> 6.764 39.065 0. 0 org.apache.cassandra.utils.ReducingIterator.computeNext()
> 6.533 17.575 0. 0 java.util.concurrent.ConcurrentSkipListMap.doPut(java.lang.Object, java.lang.Object, boolean)
> 6.346 6.346 0. 0 com.sun.crypto.provider.SunJCE_c.a(byte[], int, byte[], int)
> 5.378 5.433 0. 0 send
> 4.861 6.643 0.000 1 org.apache.cassandra.utils.ByteBufferUtil.read(java.io.DataInput, int)
> 4.410 9.260 0. 0 org.apache.commons.collections.iterators.CollatingIterator.least()
> 4.355 4.355 0. 0 java.io.ByteArrayOutputStream.write(int)
> 4.300 6.632 0. 0 java.io.ByteArrayOutputStream.write(byte[], int, int)
> 3.827 30.190 0. 0 org.apache.cassandra.dht.RandomPartitioner.decorateKey(java.nio.ByteBuffer)
> 3.783 23.954 0. 0 org.apache.cassandra.utils.FBUtilities.hash(java.nio.ByteBuffer[])
> 3.783 3.860 0. 0 <static>@0xd486c (<libc-2.5.so>)
> 3.739 3.739 0. 0 clock_gettime
> {code}
> We can avoid the problem when the ByteBuffer has a backing array
--
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
[jira] [Updated] (CASSANDRA-3286) Performance issue in
ByteBufferUtil
Posted by "T Jake Luciani (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-3286?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
T Jake Luciani updated CASSANDRA-3286:
--------------------------------------
Attachment: (was: v1-0001-CASSANDRA-3286-perf-improvement.txt)
> Performance issue in ByteBufferUtil
> -----------------------------------
>
> Key: CASSANDRA-3286
> URL: https://issues.apache.org/jira/browse/CASSANDRA-3286
> Project: Cassandra
> Issue Type: Improvement
> Components: Core
> Reporter: T Jake Luciani
> Assignee: T Jake Luciani
> Priority: Minor
> Fix For: 1.0.1
>
> Attachments: v1-0001-CASSANDRA-3286-perf-improvement-fix-and-fbutilities-ca.txt
>
>
> Profiling 1.0 we can see ByteBufferUtil.compareUnsigned is slow.
> {code}
> Excl. Incl. Incl. Incl. Name
> User CPU User CPU Sync Wait Sync Wait
> sec. sec. sec. Count
> 318.491 318.491 1.400 113786 <Total>
> 40.561 40.561 0. 0 <Unknown>
> 18.972 19.093 0. 0 <static>@0xd949 (<libpthread-2.5.so>)
> 17.718 18.730 0. 0 sun.security.provider.MD5.implCompress(byte[], int)
> 14.396 14.396 0. 0 __pthread_cond_signal
> 8.908 8.908 0. 0 org.apache.cassandra.utils.ByteBufferUtil.compareUnsigned(java.nio.ByteBuffer, java.nio.ByteBuffer)
> 7.435 7.688 0. 0 __pthread_cond_timedwait
> 7.127 7.182 0. 0 <static>@0xd8c9 (<libpthread-2.5.so>)
> 7.072 7.072 0. 0 jbyte_disjoint_arraycopy
> 6.764 39.065 0. 0 org.apache.cassandra.utils.ReducingIterator.computeNext()
> 6.533 17.575 0. 0 java.util.concurrent.ConcurrentSkipListMap.doPut(java.lang.Object, java.lang.Object, boolean)
> 6.346 6.346 0. 0 com.sun.crypto.provider.SunJCE_c.a(byte[], int, byte[], int)
> 5.378 5.433 0. 0 send
> 4.861 6.643 0.000 1 org.apache.cassandra.utils.ByteBufferUtil.read(java.io.DataInput, int)
> 4.410 9.260 0. 0 org.apache.commons.collections.iterators.CollatingIterator.least()
> 4.355 4.355 0. 0 java.io.ByteArrayOutputStream.write(int)
> 4.300 6.632 0. 0 java.io.ByteArrayOutputStream.write(byte[], int, int)
> 3.827 30.190 0. 0 org.apache.cassandra.dht.RandomPartitioner.decorateKey(java.nio.ByteBuffer)
> 3.783 23.954 0. 0 org.apache.cassandra.utils.FBUtilities.hash(java.nio.ByteBuffer[])
> 3.783 3.860 0. 0 <static>@0xd486c (<libc-2.5.so>)
> 3.739 3.739 0. 0 clock_gettime
> {code}
> We can avoid the problem when the ByteBuffer has a backing array
--
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
[jira] [Updated] (CASSANDRA-3286) Performance issue in
ByteBufferUtil
Posted by "T Jake Luciani (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-3286?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
T Jake Luciani updated CASSANDRA-3286:
--------------------------------------
Attachment: v1-0001-CASSANDRA-3286-perf-improvement-fix-and-fbutilities-ca.txt
> Performance issue in ByteBufferUtil
> -----------------------------------
>
> Key: CASSANDRA-3286
> URL: https://issues.apache.org/jira/browse/CASSANDRA-3286
> Project: Cassandra
> Issue Type: Improvement
> Components: Core
> Reporter: T Jake Luciani
> Assignee: T Jake Luciani
> Priority: Minor
> Fix For: 1.0.1
>
> Attachments: v1-0001-CASSANDRA-3286-perf-improvement-fix-and-fbutilities-ca.txt
>
>
> Profiling 1.0 we can see ByteBufferUtil.compareUnsigned is slow.
> {code}
> Excl. Incl. Incl. Incl. Name
> User CPU User CPU Sync Wait Sync Wait
> sec. sec. sec. Count
> 318.491 318.491 1.400 113786 <Total>
> 40.561 40.561 0. 0 <Unknown>
> 18.972 19.093 0. 0 <static>@0xd949 (<libpthread-2.5.so>)
> 17.718 18.730 0. 0 sun.security.provider.MD5.implCompress(byte[], int)
> 14.396 14.396 0. 0 __pthread_cond_signal
> 8.908 8.908 0. 0 org.apache.cassandra.utils.ByteBufferUtil.compareUnsigned(java.nio.ByteBuffer, java.nio.ByteBuffer)
> 7.435 7.688 0. 0 __pthread_cond_timedwait
> 7.127 7.182 0. 0 <static>@0xd8c9 (<libpthread-2.5.so>)
> 7.072 7.072 0. 0 jbyte_disjoint_arraycopy
> 6.764 39.065 0. 0 org.apache.cassandra.utils.ReducingIterator.computeNext()
> 6.533 17.575 0. 0 java.util.concurrent.ConcurrentSkipListMap.doPut(java.lang.Object, java.lang.Object, boolean)
> 6.346 6.346 0. 0 com.sun.crypto.provider.SunJCE_c.a(byte[], int, byte[], int)
> 5.378 5.433 0. 0 send
> 4.861 6.643 0.000 1 org.apache.cassandra.utils.ByteBufferUtil.read(java.io.DataInput, int)
> 4.410 9.260 0. 0 org.apache.commons.collections.iterators.CollatingIterator.least()
> 4.355 4.355 0. 0 java.io.ByteArrayOutputStream.write(int)
> 4.300 6.632 0. 0 java.io.ByteArrayOutputStream.write(byte[], int, int)
> 3.827 30.190 0. 0 org.apache.cassandra.dht.RandomPartitioner.decorateKey(java.nio.ByteBuffer)
> 3.783 23.954 0. 0 org.apache.cassandra.utils.FBUtilities.hash(java.nio.ByteBuffer[])
> 3.783 3.860 0. 0 <static>@0xd486c (<libc-2.5.so>)
> 3.739 3.739 0. 0 clock_gettime
> {code}
> We can avoid the problem when the ByteBuffer has a backing array
--
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
[jira] [Commented] (CASSANDRA-3286) Performance issue in
ByteBufferUtil
Posted by "Jonathan Ellis (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-3286?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13118204#comment-13118204 ]
Jonathan Ellis commented on CASSANDRA-3286:
-------------------------------------------
it looks like the 5th and 6th parameters to compareUnsigned are lengths, not offsets, so we should just pass remaining() instead of p + remaining
> Performance issue in ByteBufferUtil
> -----------------------------------
>
> Key: CASSANDRA-3286
> URL: https://issues.apache.org/jira/browse/CASSANDRA-3286
> Project: Cassandra
> Issue Type: Improvement
> Components: Core
> Reporter: T Jake Luciani
> Assignee: T Jake Luciani
> Priority: Minor
> Fix For: 1.0.1
>
> Attachments: v1-0001-CASSANDRA-3286-perf-improvement.txt
>
>
> Profiling 1.0 we can see ByteBufferUtil.compareUnsigned is slow.
> {code}
> Excl. Incl. Incl. Incl. Name
> User CPU User CPU Sync Wait Sync Wait
> sec. sec. sec. Count
> 318.491 318.491 1.400 113786 <Total>
> 40.561 40.561 0. 0 <Unknown>
> 18.972 19.093 0. 0 <static>@0xd949 (<libpthread-2.5.so>)
> 17.718 18.730 0. 0 sun.security.provider.MD5.implCompress(byte[], int)
> 14.396 14.396 0. 0 __pthread_cond_signal
> 8.908 8.908 0. 0 org.apache.cassandra.utils.ByteBufferUtil.compareUnsigned(java.nio.ByteBuffer, java.nio.ByteBuffer)
> 7.435 7.688 0. 0 __pthread_cond_timedwait
> 7.127 7.182 0. 0 <static>@0xd8c9 (<libpthread-2.5.so>)
> 7.072 7.072 0. 0 jbyte_disjoint_arraycopy
> 6.764 39.065 0. 0 org.apache.cassandra.utils.ReducingIterator.computeNext()
> 6.533 17.575 0. 0 java.util.concurrent.ConcurrentSkipListMap.doPut(java.lang.Object, java.lang.Object, boolean)
> 6.346 6.346 0. 0 com.sun.crypto.provider.SunJCE_c.a(byte[], int, byte[], int)
> 5.378 5.433 0. 0 send
> 4.861 6.643 0.000 1 org.apache.cassandra.utils.ByteBufferUtil.read(java.io.DataInput, int)
> 4.410 9.260 0. 0 org.apache.commons.collections.iterators.CollatingIterator.least()
> 4.355 4.355 0. 0 java.io.ByteArrayOutputStream.write(int)
> 4.300 6.632 0. 0 java.io.ByteArrayOutputStream.write(byte[], int, int)
> 3.827 30.190 0. 0 org.apache.cassandra.dht.RandomPartitioner.decorateKey(java.nio.ByteBuffer)
> 3.783 23.954 0. 0 org.apache.cassandra.utils.FBUtilities.hash(java.nio.ByteBuffer[])
> 3.783 3.860 0. 0 <static>@0xd486c (<libc-2.5.so>)
> 3.739 3.739 0. 0 clock_gettime
> {code}
> We can avoid the problem when the ByteBuffer has a backing array
--
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