java - Each thread on separate processor - is it possible? -
this question has answer here:
- java thread affinity 5 answers
let's have server 4 processors. want implement cache served 4 threads. requirement - each thread should act on it's own processor?
how can achieve this?
you need set thread affinity each thread specify cpu want run on. there's examples on web on how it, there's nice github repository here sample code on how done. esentially, set each threads affinity different core.
Comments
Post a Comment