News for hackers. Stuff that matters.
Re:KeyDB: A Multithreaded Redis Fork by jzoch on Tuesday March 12, 2019 @12:04PM (#19369564)
I find it really surprising that it took someone a month (I think the author stated this on Reddit) and yet redis has been so hesitant to do it. What are the downsides at this point?
Re:KeyDB: A Multithreaded Redis Fork by remon on Tuesday March 12, 2019 @12:10PM (#19369647)
I don't think it potentially taking a long time was the primary reason for not making redis multithreaded. In the redis manifesto it is stated that one of the guiding principles is to avoid complexity if they can.

Also not that the benchmarks shown seem to be an apples and oranges comparison. If you want to compare the performance if redis vs a multithreaded fork the proper comparison involves running a redis cluster (one node per core) versus the multithreaded single node.

All else being equal I'd prefer a multithreaded approach as KeyDB is pursuing but that's just because it makes it easier to more easily utilise system resources of a single (virtual) machine.

Re:KeyDB: A Multithreaded Redis Fork by jdsully on Tuesday March 12, 2019 @12:44PM (#19370125)
I’m kinda against running a “cluster” on the same machine. That was a primary motivator for doing this.

It’s offloading complexity from the developers to the users which I don’t think is the right approach.

Also clusters have limitations over single instance redis. You’ll also get more Queries/GB with a Multithreaded approach.

Re:KeyDB: A Multithreaded Redis Fork by throwaway12iii on Tuesday March 12, 2019 @01:03PM (#19370380)
How is a cluster more difficult for users in 2019? Most devs I know never even set up Redis. It just works through Docker/Ansible/cloud.

Have you benchmarked cluster VS locks and threads approach?

Re:KeyDB: A Multithreaded Redis Fork by jdsully on Tuesday March 12, 2019 @12:33PM (#19369959)
It took a month mainly because the redis codebase is so well organized. So kudos to Antirez for that. I can’t deny adding locking makes the code a bit more complicated - but there are more users than developers.
Re:KeyDB: A Multithreaded Redis Fork by adamrights on Tuesday March 12, 2019 @05:11PM (#19373082)
That codebase really has exceptional organization/comments.
Re:KeyDB: A Multithreaded Redis Fork by hashhar on Tuesday March 12, 2019 @12:06PM (#19369598)
Multithreaded code is a lot more difficult to reason about once the codebase gets large.

Redis's codebase is a little too readable compared to the complexity of the things it does. This isn't.

Re:KeyDB: A Multithreaded Redis Fork by AboutTheWhisles on Tuesday March 12, 2019 @12:19PM (#19369794)
My experience is that it is much more a matter of architecture.

This is a lock free key value store in a single file - it doesn't have the network protocol, but any threads dealing with the network IO could use it without doing anything differently.

https://github.com/LiveAsynchronousVisualizedArchitecture/si...

Re:KeyDB: A Multithreaded Redis Fork by elif on Tuesday March 12, 2019 @12:07PM (#19369612)
antirez recently provided a full response http://antirez.com/news/126
Re:KeyDB: A Multithreaded Redis Fork by MrBuddyCasino on Tuesday March 12, 2019 @12:12PM (#19369684)
He says most setups are network or memory bound, so I don't understand this reasoning:

"Well, that’s the plan: I/O threading is not going to happen in Redis AFAIK, because after much consideration I think it’s a lot of complexity without a good reason. Many Redis setups are network or memory bound actually. Additionally I really believe in a share-nothing setup, so the way I want to scale Redis is by improving the support for multiple Redis instances to be executed in the same host, especially via Redis Cluster."

The RAM would have to be a multiple of the dataset, because its shared-nothing, running right into one of the two common limits, right?

Re:KeyDB: A Multithreaded Redis Fork by toast0 on Tuesday March 12, 2019 @06:40PM (#19373824)
I would assume a cluster on a single node would partition the data, rather than replicate it. Without an in-depth knowledge of redis, I can't really predict if 4 instances sized for 1GB would have more overhead than 1 instance of 4GB, but I'm willing to hazard a guess that it would be fairly close. On the network side, it's a wash if you're already bound by the interface line rate.
Re:KeyDB: A Multithreaded Redis Fork by pvitz on Tuesday March 12, 2019 @12:15PM (#19369736)
This reminds me a bit of the K/kdb approach of just starting another process for almost certainly the same reasons.