mirage / irmin

Irmin is a distributed database that follows the same design principles as Git
https://irmin.org
ISC License
1.83k stars 154 forks source link

Change LRU cache and other hash tables to use kcas #2281

Open clecat opened 6 months ago

clecat commented 6 months ago

This PR aims to change the existing hash tables of irmin and use Kcas_data hash tables instead. This should help maintain good performances when using irmin on several domains, by replacing the existing mutexes.

clecat commented 6 months ago

Here are graphs from the multicore benchmarking: Before: bench-lru-half After: bench-kcas-all-half

art-w commented 4 months ago

Thanks! I refreshed your PR on top of the Eio PR such that we can merge yours asap :) I'm pretty happy with the new benchmarks, as they show that multicore usage isn't slower than singlecore under contention!

Could you clean up the commit history, add an entry to the changelog, ... and take a look at the https://github.com/mirage/irmin/blob/main/src/irmin-pack/unix/lru.ml#L32 to remove the data-race there too?