On a second note: There are many other aspects to concurrent scheduling such as queue implementations etc.. Especially if there is no "beef" inside the message processing, these differences become more dominant compared to cache misses, but this is another problem that has been covered extensively by other people in depth (e.g. Nitsan Wakart).
Focus of this experiment is locality/cache misses, keep in mind different queueing implementations of executors for sure add dirt/bias.
As requested, I add results from the linux "perf" tool to prove there are significant differences in cache misses caused by random assignment of Thread - to Actor as done by ThreadPoolExecutor and WorkStealingExecutor.
Check out my recent post for a description of the test case.
Results with adjusted SingleThreadExecutor (XEON 2 socket, each 6 cores, no HT)
As in previous post, "dedicated" actor-pinned-to-thread performs best. For very small local state, there are only few cache misses so differences are small, but widen once a bigger chunk of memory is accessed by each actor. Note that ThreadPool is hampered by its internal scheduling/queuing mechanics, regardless of locality, it performs weak.
When increasing number of Actors to 8000 (so 1000 actors per thread), "Workstealing" and "Dedicated" perform similar. Reason: executing 8000 actors round robin creates cache misses for both executors. Note that in a real world server its likely that there are active and inactive actors, so I'd expect "Dedicated" to perform slightly better than in this synthetic test.
"perf stat -e" and "perf stat -cs" results
(only 2000, 4000, 8000 local size tests where run)
Dedicated/actor-pinned-to- thread:
333,669,424 cache-misses
19.996366007 seconds time elapsed185,440 context-switches
20.230098005 seconds time elapsed
=> 9,300 context switches per second
workstealing:
2,524,777,488 cache-misses
39.610565607 seconds time elapsed
381,385 context-switches
39.831169694 seconds time elapsed
=> 9,500 context switches per second
fixedthreadpool:
3,213,889,492 cache-misses
92.141264115 seconds time elapsed
25,387,972 context-switches
87.547306379 seconds time elapsed
=>290,000 context switches per second
A quick test with a more realistic test method
In order to get a more realistic impression I replaced the synthetic int-iteration by some dirty "real world" dummy stuff (do some allocation and HashMap put/get). Instead of increasing the size of the "localstate" int array, I increase the HashMap size (should also have negative impact on locality).
Note that this is rather short processing, so queue implementations and executor internal implementation might dominate locality here. This test is run on Opteron 8c16t * 2Sockets, a processor with 8kb L1 cache size only. (BTW: impl is extra dirty, so no performance optimization comments pls, thx)
As ThreadPoolExecutor is abnormous bad in this Test/Processor combination, plain numbers:
64 HMap entries | 256 HMapentries | 2000 HMapentries | 4000 HMapentries | 32k HMapentries | 320k HMapentries | |
WorkStealing | 1070 | 1071 | 1097 | 1129 | 1238 | 1284 |
Dedicated | 656 | 646 | 661 | 649 | 721 | 798 |
ThreadPool | 8314 | 8751 | 9412 | 9492 | 10269 | 10602 |
Conclusions basically stay same as in original post. Remember cache misses are only one factor of overall runtime performance, so there are workloads where results might look different. Quality/specialization of queue implementation will have huge impact in case processing consists of only some lines of code.
Finally, my result:
Pinning actors to threads created lowest cache miss rates in any case tested.
Hi Rudiger
ReplyDeleteSmall typo at the beginning
"Code-completion let me accidentally choose Executors.newSingleThreadScheduledExecutor() instead of Executors.newSingleThreadScheduledExecutor()"
Again you selected the Scheduled one :)
Thanks for sharing
Georges
Argh .. poor me .. I am considering to fork openjdk and delete this method :-) Thx
ReplyDeletevery useful .thank you for sharing
ReplyDeleteJava Online course Hyderabad
Existing without the answers to the difficulties you’ve sorted out through this guide is a critical case, as well as the kind which could have badly affected my entire career if I had not discovered your website
ReplyDeleteDigital Marketing Training in rajajinagar
Your good knowledge and kindness in playing with all the pieces were very useful. I don’t know what I would have done if I had not encountered such a step like this
ReplyDeleteDigital Marketing Training in rajajinagar
This blog is the general information for the feature. You got a good work for these blog.We have a developing our creative content of this mind.Thank you for this blog. This for very interesting and useful.
ReplyDeleteClick here:
python training in Bangalore
Click here:
python training in Bangalore
I read this post two times, I like it so much, please try to keep posting & Let me introduce other material that may be good for our community.
ReplyDeleteBlue Prism Training in Pune
Blueprism training in tambaram
Blueprism training in annanagar
I believe there are many more pleasurable opportunities ahead for individuals that looked at your site.
ReplyDeleteData Science with Python training in chenni
Data Science training in chennai
Data science training in velachery
Data science training in tambaram
Data Science training in anna nagar
Data Science training in chennai
Data science training in Bangalore
I read this post two times, I like it so much, please try to keep posting & Let me introduce other material that may be good for our community.
ReplyDeletejava online training | java training in pune
java training in chennai | java training in bangalore
I would like to thank you for your nicely written post, its informative and your writing style encouraged me to read it till end. Thanks
ReplyDeleteangularjs Training in chennai
angularjs-Training in tambaram
angularjs-Training in sholinganallur
angularjs-Training in velachery
angularjs Training in bangalore
Devops is not a Tool.Devops Is a Practice, Methodology, Culture or process used in an Organization or Company for fast collaboration, integration and communication between Development and Operational Teams. In order to increase, automate the speed of productivity and delivery with reliability.
ReplyDeletepython training in bangalore
aws training in bangalore
artificial intelligence training in bangalore
data science training in bangalore
machine learning training in bangalore
hadoop training in bangalore
devops training in bangalore
corporate training companies
ReplyDeletecorporate training companies in mumbai
corporate training companies in pune
corporate training companies in delhi
corporate training companies in chennai
corporate training companies in hyderabad
corporate training companies in bangalore
Gaining Python certifications will validate your skills and advance your career.
ReplyDeletepython certification
This is most informative and also this post most user friendly and super navigation to all posts... Thank you so much for giving this information to me..
ReplyDeletepython training in pune | python training institute in chennai | python training in Bangalore
Hello! This is my first visit to your blog! We are a team of volunteers and starting a new initiative in a community in the same niche. Your blog provided us useful information to work on. You have done an outstanding job.
ReplyDeleteAWS Training in Bangalore | Amazon Web Services Training in Bangalore
AWS Training in Bangalore |Best AWS Training Institute in BTM ,Marathahalli
AWS Training in Rajaji Nagar | Amazon Web Services Training in Rajaji Nagar
Best AWS Training Institute in BTM Layout Bangalore ,AWS Coursesin BTM
Best AWS Training in Marathahalli | AWS Training in Marathahalli
This is most informative and also this post most user friendly and super navigation to all posts.
ReplyDeleteangularjs training in Marathahalli
angularjs training institutes in Marathahalli
best angularjs training in Marathahalli
I greatly appreciate your such a knowledge sharing
ReplyDeleteiWatch service center chennai | apple ipad service center in chennai | apple iphone service center in chennai
It would have been the happiest moment for you,I mean if we have been waiting for something to happen and when it happens we forgot all hardwork and wait for getting that happened.
ReplyDeleteMicrosoft Azure online training
Selenium online training
Java online training
Java Script online training
Share Point online training
Have you been thinking about the power sources and the tiles whom use blocks I wanted to thank you for this great read!! I definitely enjoyed every little bit of it and I have you bookmarked to check out the new stuff you post
ReplyDeletedevops online training
aws online training
data science with python online training
data science online training
rpa online training
Excellent blog I visit this blog it's really awesome. The important thing is that in this blog content written clearly and understandable. The content of information is very informative.
ReplyDeleteOracle Fusion HCM Online Training
Oracle Fusion SCM Online Training
Oracle Fusion Financials Online Training
oracle fusion financials classroom training
Workday HCM Online Training
Oracle Fusion HCM Classroom Training
A befuddling web diary I visit this blog, it's incredibly grand. Strangely, in this present blog's substance made motivation behind fact and sensible. The substance of information is instructive
ReplyDeleteOracle Fusion Financials Online Training
Oracle Fusion HCM Online Training
Oracle Fusion SCM Online Training
Thank you for providing such an awesome article and it is a very useful blog for others to read.
ReplyDeleteOracle ICS Online Training
Thanks for providing a useful article containing valuable information. start learning the best online software courses.
ReplyDeleteWorkday Online Training
Attend The Python training in bangalore From ExcelR. Practical Python training in bangalore Sessions With Assured Placement Support From Experienced Faculty. ExcelR Offers The Python training in bangalore.
ReplyDeletepython training in bangalore
Are you looking for a maid for your home to care your baby,patient care taker, cook service or a japa maid for your pregnent wife we are allso providing maid to take care of your old parents.we are the best and cheapest service provider in delhi for more info visit our site and get all info.
ReplyDeletemaid service provider in South Delhi
maid service provider in Dwarka
maid service provider in Gurgaon
maid service provider in Paschim Vihar
cook service provider in Paschim Vihar
cook service provider in Dwarka
cook service provider in south Delhi
baby care service provider in Delhi NCR
baby care service provider in Gurgaon
baby care service provider in Dwarka
baby service provider in south Delhi
servant service provider in Delhi NCR
servant service provider in Paschim Vihar
servant Service provider in South Delhi
japa maid service in Paschim Vihar
japa maid service in Delhi NCR
japa maid service in Dwarka
japa maid service in south Delhi
patient care service in Paschim Vihar
patient care service in Delhi NCR
patient care service in Dwarka
Patient care service in south Delhi
Alleyaaircool is the one of the best home appliances repair canter in all over Delhi we deals in repairing window ac, Split ac , fridge , microwave, washing machine, water cooler, RO and more other home appliances in cheap rates
ReplyDeleteWindow AC Repair in vaishali
Split AC Repair in indirapuram
Fridge Repair in kaushambi
Microwave Repair in patparganj
Washing Machine Repair in vasundhara
Water Cooler Repair in indirapuram
RO Service AMC in vasundhara
Any Cooling System in vaishali
Window AC Repair in indirapuram
An overwhelming web journal I visit this blog, it's unfathomably amazing. Unusually, in this present blog's substance made inspiration driving truth and reasonable. The substance of data is enlightening
ReplyDeleteOracle Fusion Financials Online Training
Oracle Fusion HCM Online Training
Oracle Fusion SCM Online Training
An overwhelming web journal I visit this blog, it's unfathomably amazing. Unusually, in this present blog's substance made inspiration driving truth and reasonable. The substance of data is enlightening
ReplyDeleteOracle Fusion Financials Online Training
Oracle Fusion HCM Online Training
Oracle Fusion SCM Online Training
thanks for sharing this information
ReplyDeletebest data science training in bangalore
best data science training institute in bangalore
data science classroom training in bangalore
devops certification course in bangalore
aws certification course in bangalore
best AWS Training institute in Bangalore
Amazon web services training in bangalore
aws training in bangalore
Attend The Artificial Intelligence courses From ExcelR. Practical Artificial Intelligence courses Sessions With Assured Placement Support From Experienced Faculty. ExcelR Offers The Artificial Intelligence courses.
ReplyDeleteExcelR Artificial Intelligence courses
This comment has been removed by the author.
ReplyDeleteI learned World's Trending Technology from certified experts for free of cost. I Got a job in decent Top MNC Company with handsome 14 LPA salary, I have learned the World's Trending Technology from Data science training in btm layout experts who know advanced concepts which can help to solve any type of Real-time issues in the field of Python. Really worth trying hkbk group of institutions
ReplyDeleteThanks for sharing
ReplyDeleteYaaron Studios is one of the rapidly growing editing studios in Hyderabad. We are the best Video Editing services in Hyderabad. We provides best graphic works like logo reveals, corporate presentation Etc. And also we gives the best Outdoor/Indoor shoots and Ad Making services.
Best video editing services in Hyderabad,ameerpet
Best Graphic Designing services in Hyderabad,ameerpet
Best Ad Making services in Hyderabad,ameerpet
Nice Post
ReplyDelete"Pressure Vessel Design Course is one of the courses offered by Sanjary Academy in Hyderabad. We have offer professional
Engineering Course like Piping Design Course,QA / QC Course,document Controller course,pressure Vessel Design Course,
Welding Inspector Course, Quality Management Course, #Safety officer course."
Piping Design Course in India
Piping Design Course in Hyderabad
QA / QC Course
QA / QC Course in india
QA / QC Course in Hyderabad
Document Controller course
Pressure Vessel Design Course
Welding Inspector Course
Quality Management Course
Quality Management Course in india
Safety officer course
Visit for AI training in Bangalore:- Artificial Intelligence training in Bangalore
ReplyDeleteLooks interesting post
ReplyDeletelearn sql online
Thank you for sharing. Machine Learning Training in Bangalore from Indian Cyber Security Solutions design the course to provide a broad introduction to machine learning, data-mining, and statistical pattern recognition. Machine learning is the science of getting computers to act without being explicitly programmed. In the past decade, machine learning has given us self-driving cars, practical speech recognition, effective web search, and a vastly improved understanding of the human genome. Machine learning is so pervasive today that you probably use it dozens of times a day without knowing it. Machine Learning Course done by ICSS in Kolkata. ICSS is the Best Machine Learning Institute in Bangalore.
ReplyDeleteThanks For Sharin With Us.It gave me a lot of Helpful information.
ReplyDeleteMean stack online training
Mean stack training in hyderabad