-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TransactionServiceImp optimisations #200
TransactionServiceImp optimisations #200
Conversation
…p, removed lock for read and write to same
fixes: #198 |
To elaborate on the issue: |
Here is my comparison of concurrent hashmap and synchronising on Map perf benchmarking. Doesn't come as a surprise, but Concurrent hashmap gives better performance across different configurations. Additionally latter has performance degradation with increased concurrency as there are many threads fighting for the lock simultaneously We are still in process of end to end perf benchmarking |
So we have profiled this specific function in production and even with synchronisation, execution time is 0 ms on average, however, there are some threads which waited for around 200 - 500 ms consistently 9which is evident from max value). so probably for 95+ percentile, this won't be a good experience. Though minor, this change should give some improvement |
…cking all threads from creating/removing co-ordinators
… as concurrent hashmaps to avoid using random latches and improve concurrency
Thanks! We are looking into how to merge this in, so in preparation of that I have prepared the following documentation: https://www.atomikos.com/Documentation/ConcurrencyModel Any feedback welcome :-) |
@GuyPardon : this looks good to me! |
We are using atomikos in our product. Below are some optimisations I noticed based on observations from production systems.
I have converted tidToTransactionMap_ to concurrent hashmap as it is more efficient in handling concurrent operations. Also, thread safe objects doesn't need locks for operations. Hence removed the same for tidToTransactionMap_ put/read operations.