Live data from Hacker News

How Fast can A Single Instance of Redis be?

docs.keydb.dev

61–70 of 79 posts

Re: How Fast can A Single Instance of Redis be?

#61
post #54
post #12

Well, to be honest if you are IO/network bound and kernel TCP stack is the bottleneck then user space networking like DPDK can help in every application. It depends on application but sometimes additional complexity of introducing DPDK is just not worth it, and just spinning another instance/server is a better choice. Look also at Seastar used in ScyllaDB with and without DPDK numbers. Just remember you need to give…

DPDK does poll but you can have it sleep in low traffic situations. At the expense of a little extra latency.

I always figured the right solution here is a queue that sends any time the request queue is over N elements or every M microseconds, whichever happens first. Haven’t seen many implementations though.

Nagle’s algorithm for the oldest, maybe a couple others, possibly some code I’ve written.

Re: How Fast can A Single Instance of Redis be?

#62

Earlier quoted context omitted.

Depends on how you define database. Wikipedia starts with... ”A database is an organized collection of data, generally stored and accessed electronically from a computer system. Where databases are more complex they are often developed using formal design and modeling techniques." [1] ...which makes Redis sound like a database to me. If I am not technically correct, feel to educate me. Side note: I try to focus on wh…

Your filesystem then is a database. You can even stretch it to include your text editor. Redis is not a database.

> Your filesystem then is a database.

Absolutely

Re: How Fast can A Single Instance of Redis be?

#63
post #12

Well, to be honest if you are IO/network bound and kernel TCP stack is the bottleneck then user space networking like DPDK can help in every application. It depends on application but sometimes additional complexity of introducing DPDK is just not worth it, and just spinning another instance/server is a better choice. Look also at Seastar used in ScyllaDB with and without DPDK numbers. Just remember you need to give…

I wonder how the performance compares with pedis [1], which is based on Seastar/ScyllaDB.

https://github.com/fastio/pedis

Re: How Fast can A Single Instance of Redis be?

#64
post #5

How is this different from what Solarflare ( https://twitter.com/Solarflare_Comm/status/11134717313798430... ) is doing with Cloud Onload? From what I understand they don't require any application changes and they work on any networking application.

OpenOnload transparently replaces the UDP/TCP network stack and epoll calls of an applications with highly tunable userspace components. It can work with any application that uses these system calls. Of course, that application could be Redis. If you search around, I've commented on using them together. This is a Redis module, so will only work with Redis. Although I don't see its implementation (?), it appears to co…

Yep. And Mellanox does it too fwiw -

https://community.mellanox.com/s/article/vma-improves-redis-...

Re: How Fast can A Single Instance of Redis be?

#65

Anecdotally, my experience running Redis servers on AWS (both standalone EC2 instances and ElastiCache dedicated Redis instances) is that network latency is likely to become a barrier before anything else. We struggled with the same performance problems on both small-footprint small-payload Redis DBs and on large ones, and paying for the next tier of network connectivity (between our applications on EC2 and our Redis…

Yeah, this is true in my case as well.

Years ago I built a layer on top of Redis that could also run in the browser, so I could cache data there. Even pull from other browsers with WebRTC, and fallback to server only when needed.

Over time, I eventually made the Redis component a module, so it could be swapped out with other systems. It has always proved to be the fastest, except for an LMDB adapter someone in the community wrote ( https://github.com/notabugio/gun-lmdb ).

Re: How Fast can A Single Instance of Redis be?

#67

Earlier quoted context omitted.

Depends on how you define database. Wikipedia starts with... ”A database is an organized collection of data, generally stored and accessed electronically from a computer system. Where databases are more complex they are often developed using formal design and modeling techniques." [1] ...which makes Redis sound like a database to me. If I am not technically correct, feel to educate me. Side note: I try to focus on wh…

Your filesystem then is a database. You can even stretch it to include your text editor. Redis is not a database.

In a few years, you may look back and wonder, incredulously, that you ever felt a filesystem might not be a kind of database. Look into filesystems long enough, and you may start to view an RDBMS as a specialized kind of filesystem.

Re: How Fast can A Single Instance of Redis be?

#68
post #55

Earlier quoted context omitted.

Your filesystem then is a database. You can even stretch it to include your text editor. Redis is not a database.

I think there is much to be learned by comparing databases and filesystems. One thing I think that filesystems can learn from databases is the notion of a compound primary key. It would be neat if app-files were identified by an (app, type, id) tuple. This would bring the advantages of both the posix and the windows filesystem layouts. For instance if we had(app=firefox, type=/usr/bin, id=main). Then we could easily…

Well, that's basically what directories are.

Re: How Fast can A Single Instance of Redis be?

#69
post #12

Well, to be honest if you are IO/network bound and kernel TCP stack is the bottleneck then user space networking like DPDK can help in every application. It depends on application but sometimes additional complexity of introducing DPDK is just not worth it, and just spinning another instance/server is a better choice. Look also at Seastar used in ScyllaDB with and without DPDK numbers. Just remember you need to give…

DPDK has had ways to not use 100% of the CPU for polling for many years.

https://doc.dpdk.org/guides-16.04/sample_app_ug/l3_forward_p...

Re: How Fast can A Single Instance of Redis be?

#70
post #9

Earlier quoted context omitted.

Maybe they should use this module that I can't read about to power their site. :P

Makes me feel a little better about my libµhttp/Objective-C/Objective-Smalltalk server (serving http://objective.st ), which held up just fine to the HN hug of death, running on the smallest digital ocean droplet. :-)

A simple nginx also holds up very well: https://xyrillian.de/thoughts/posts/latency-matters-aftermat...
Post reply on HN