Zabbix does a lot of read only requests to configuration cache. By replacing configuration cache mutex with read/write lock we could parallelize such requests.
Preliminary tests showed around 60% data processing maximum throughput increase when configuration cache mutex was replaced with pthread based read/write lock.
We need to re-evaluate the implementation complexity and test results with on the latest trunk version and decide if we move forward with it.
There are few thoughts to consider:
- dependency on pthread library
- while pthread supports shared memory based read/write locks it might not be supported on all platforms. In this case we should fall back to mutexes.
- replacing semaphore based mutexes with pthread mutexes using futexes would give small performance boost even without read/write locks.