For our particular load test (raw spam of PUT/GET/PUT/DELETE of individual records, not intended to be a good proxy for any particular use case), Mutex performed better than RwLock.
Other things we tried, unsuccessfully:
Passing around a ResourceArc and invoking it from various erlang processes: this performed no better than the naive Elixir / Agent impl.
intrusive collections in Rust: compiler didn't like our attempt to pass mutable pointers across threads 🤷
An attempt at #96 -- one which did not bear fruit! 🍎
This pull request implemented the Memtable using a Red Black Tree written in Rust. 🦀
But it doesn't look like much of an improvement, now that I have
dirty_memtable.flush
implemented.Memory was quite a bit higher (1.7GB vs 400MB). PUT speed was quite a bit slower (55ms vs 37ms). GET/DELETE speeds were comparable.
Seems like it makes sense to keep the elixir agent implementation, which is simpler and easier to maintain.
1000 users spamming - rust version CSV
1000 users spamming - elixir version CSV
tasks
alternatives
For our particular load test (raw spam of PUT/GET/PUT/DELETE of individual records, not intended to be a good proxy for any particular use case),
Mutex
performed better thanRwLock
.Other things we tried, unsuccessfully: