Skip to content

RicoSchueppel/multithreading-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A simple demo app to demonstrate multithreading with ExecutorService. The additional cost for 'much' more threads than CPUs impacts at about 100 threads. Anyway, its surprising to me to still benefit from more threads if we have 8 CPUs and 50 threads.

start with mvn spring-boot:run

Example on 8 CPUs

Pool size 1 : 1306 ms // warmup
Pool size 1 : 514 ms
Pool size 2 : 149 ms
Pool size 4 : 66 ms
Pool size 6 : 43 ms
Pool size 8 : 33 ms
Pool size 9 : 29 ms
Pool size 20 : 14 ms
Pool size 50 : 8 ms
Pool size 100 : 9 ms
Pool size 200 : 16 ms
Pool size 500 : 44 ms
Pool size 1000 : 83 ms

About

simple demo on multi threading

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages