Memory footprint Redis vs Dragonfly #185
-
How did you know that Redis would consume more memory ? And how io_uring in kernels 5.1+ is helping you? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
io_uring helped me to built a unified I/O framework However, it makes a foundation for the next features that we have on our roadmap. Also with networking improvements, io_uring had this year I expect it will push Dragonfly further in terms of performance. To summarize, io_uring is an API of the future and our heads are to the future. Re Redis memory consumption I did not understand the question. I know how Redis is built, so I know its strong and weak points. Its weakest points are the snapshotting and replication full sync procedures - read my blog for more details. |
Beta Was this translation helpful? Give feedback.
-
Yes, based on my experience snapshotting in Redis is one of the serious design problems Redis has. I've expanded on that in my blog as well, btw. In short, this approach lacks back-pressure mechanisms: child process and OS allocate physical memory without parent process being in control. being in control is what differentiates database software from all other programs. And Redis is not in control, unfortunately. Make the following test with dragonfly: run memtier_benchmark with Anyway, I think using Linux CoW for snapshotting is ok for amateur software and PoCs and if you have 16GB workload it's probably also ok. But it's not ok where we are headed, i.e. TB-size workloads. Re Seastar - I also wrote about it in my blog. I learned from Seastar a lot. In fact, I learned the principles of shared-nothing from seastar. I spent months hacking their code. But at the end, I came to the conclusion that I am not smart enough to use Seastar 😄 . Re DF data-structures - we have a document here: https://github.com/dragonflydb/dragonfly/blob/main/docs/dashtable.md Thanks for the compliment. I am ex-Googler and I really like their conservative C++ style, so I use that. https://google.github.io/styleguide/ |
Beta Was this translation helpful? Give feedback.
Yes, based on my experience snapshotting in Redis is one of the serious design problems Redis has. I've expanded on that in my blog as well, btw. In short, this approach lacks back-pressure mechanisms: child process and OS allocate physical memory without parent process being in control. being in control is what differentiates database software from all other programs. And Redis is not in control, unfortunately.
Make the following test with dragonfly: run memtier_benchmark with
-d 1024 --key-maximum=somebignum
and try to fill up all your computer memory. At some point, DF will just refuse to write with error : "out of memory". Redis will crash. It looks like a small thing but it's not. Es…