ArangoDB 3.12 Product Release Announcement! Read the blog for details. Read Blog

Vector-5

Comparison: Lockless programming with atomics in C++ 11 vs. mutex and RW-locks

Estimated reading time: 9 minutes

ArangoDB is multithreaded and able to use several CPU-cores at once. Because of that access to common data structures to these threads have to be protected from concurrent access. ArangoDB currently uses mutexes, spinlocks and RW-locks for that. With the ongoing development of the MVCC the number of situations where protected access is needed grows significantly. If locking is done too often the scalability is effectively limited to one core. So this test was done to estimate the costs, and evaluate other solutions – so called lockless programming with atomics.

(more…)
«
1 2
»