jmh


Benchmark results ForkJoin vs Disruptor?


I have run this DisruptovsFJ Mirco-Benchmarks written by Aleskey Shipilev, where ForkJoin and the Disruptor library performance is compared.
The results I have using JDK1.8.40 on a Linux platform i5:
Benchmark Score, Score Error (99.9%),Unit,Param: slicesK,
Disruptor.run, 939.801405, 20.741961,ms/op, 50000,0,10
ForkJoin.run, 1175.263451, 0.595711, ms/op, 50000,0,10
ForkJoinRecursive.run 771.854028, 26.022542,ms/op, 50000,0,10
ForkJoinRecursiveDeep.run, 1356.697011, 28.666325,ms/op, 50000,0,10
ForkJoinReuse.run, 7974.180793, 49.604539,ms/op, 50000,0,10
The first part of the results for slicesK < 50000 were expected as the Disruptor is using a RingBuffer and a mechanism that makes it much efficient in concurrent context.
Now when slicesK >= 50000 the Disruptor test is less performant than ForkJoinRecursiveDeep, and ForkJoinReuse.
Can someone explain to me those results ? Thank you
Answer :
Your Disruptor usable Ring Buffer is somehow full at slicesK >= 50000 which is cause the performance to drop.
Notes :
For very high performance the ring buffer, and its contents, should fit in L3 CPU cache for exchanging between threads. If the ring buffer is used for a replay scenario, such as market data or network recovery, it may be larger and have obvious performance implications from the cache misses.
One of the Sequencer's roles is to ensure that publication does not wrap the Ring Buffer. To do this none of the downstream consumer may have a Sequence that is lower than the Ring Buffer's Sequence less the size of the Ring Buffer. However using the graph of dependencies an interesting optimization can be made
------------------- ^ Thread 1 ^ ------------------------------------------------------------ ^ Thread 2 ^ ----------
Links :
Dissecting the Disruptor : What's so special about a ring buffer ?
Disruptor FAQ
The LMAX Architecture
LMAX Disruptor Info Page
Wiki : Circular buffer (Disruptor does not use pointers)
Other Circular buffer wiki

Related Links

How to make JMH run in less time
JMH objects outside a method scope
JMH measurement iterations
JMH - why do I need Blackhole.consumeCPU()
JMH setup and tear down
Benchmark results ForkJoin vs Disruptor?
JMH: Constrain parameter space
JMH: What does the score value mean?
Graphics + Archiving

Categories

HOME
redux
alasql
wifi
webvr
ebay-api
conceptual
mifare
arguments
mailchimp
grid
perl6
virtualhost
osx-yosemite
samsung-gear-s2
promotions
yacc
sahi
mbed
tag-cloud
filehelpers
accordion
autologin
summernote
ajaxcontroltoolkit
rndis
fastboot
google-drive-android-api
ng-tags-input
waterfall
deployment-descriptor
rollupjs
hierarchical-data
boosting
uibarbuttonitem
custom-fields
csproj
ios9
undo
ios-autolayout
oracle-nosql
javax
hippocms
dotnetnuke-module
var
ape-phylo
datagridviewcombobox
niagara-ax
infovis
serverless-architecture
hierarchical-clustering
ionic2-select
dna-sequence
dynamic-linking
photoshop-script
chain
consolidation
syslog4j
angularfire
mrunit
aws-kms
jde
jmap
oryx
nonblocking
skscene
android-togglebutton
uinavigationitem
android-filterable
opennebula
gcc-warning
nfa
mri
fedena
os.walk
sendy
image-preloader
html5-filesystem
acrofields
ekevent
xml-validation
fade
mosix
magicsuggest
spawn
simplemembership
generator-expression
blotter
boost.build
cron4j
yii-components
linear-interpolation
certificate-revocation
mvcmailer
project-files
nsundomanager
apache-commons-email
cinder
xcdatamodel
virtual-destructor
google-local-search
atmega16
ffdshow

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile