Reputation: 11387
Given we have an application that is heavily polluted with concurrency constructs multiple techniques are used (different people worked without clear architecture in mind), multiple questionable locks that are there "just in case", thread safe queues. CPU usage is around 20%.
Now my goal is to optimize it such that it is making better use of caches and generally improve its performance and service time.
I'm considering to pin the parent process to a single core, remove all things that cause membars,
replace all thread safe data structures and replace all locks with some UnsafeReentrantLock
which would simply use normal reference field but take care of exclusive execution
needs...
I expect that we would end up with much more cache friendly application, since we don't have rapid cache flushes all the time (no membars). We would have less overhead since we dont need thread safe data structures, volaties, atomics and replace all sorts of locks with I would assume that service time would improve also, since we no longer synchronize on multiple thread safe queues...
Is there something that I'm overlooking here?
Maybe blocking operations would have to be paid attention to since they would not show up in that 20% usage?
Upvotes: 1
Views: 90