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

Mark Robert Miller commented on SOLR-15510:
-------------------------------------------

Some basic benchmarks on basic byte buffer performance for a baseline and to 
test assumptions. We benchmark the time for a single byte *get* and *put* and 8 
byte *allocate*. I toss in the UnsafeByteBuffer type with the implementation 
coming from Agrona just for comparison. This bytebuffer allows for concurrent 
memory access and wraps the basic byte array and ByteBuffer types. The test is 
done on Linux and results can vary by OS and JVM. This is _openjdk version 
"11.0.11" 2021-04-20_
 * We assume this is a near worst case type bench for allocating off heap 
memory and likely even ByteBuffers vs byte arrays.
 * We assume larger allocations are desired and we assume page alignment and 
sizing and perhaps other variables will be impactful on off heap efficiency 
that we are not used to when using on heap structures.
 * We expect plain byte arrays to be faster by a fair margin.
 * We expect unsafe memory access to benefit most when using bulk calls and in 
gc characteristics and predictability.
 * We assume we will want to see some larger reads, writes and allocate sizes 
and may want to try adding some non zero cpu work into the micro benchmarks to 
see how behavior may differ when you don't spin hammer on something like 
allocation.

[https://jmh.morethan.io/?source=https://gist.githubusercontent.com/markrmiller/011d3ad94f73f43ac6f1fc79e9c040d5/raw/da6fac39f77118d181e0960d1d99ed7c761e6fa1/bytebuffer-basic-baseline.json]

 

> Add additional off heap data structure options and ByteBuffer caching for 
> reduced GC at scale.
> ----------------------------------------------------------------------------------------------
>
>                 Key: SOLR-15510
>                 URL: https://issues.apache.org/jira/browse/SOLR-15510
>             Project: Solr
>          Issue Type: Sub-task
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Mark Robert Miller
>            Priority: Minor
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to