Hacker News new | ask | show | jobs
by stock_toaster 5057 days ago

  > - poor single node performance
I am in the process of evaluating riak for an project, and have run across this too. I am not sure if it is specific to the eleveldb backend (I just used the default values so far), or just a bad config on my part. Even when I relaxed consistency down to r=1,w=1 and used the protobuf interface, riak was still performing rather slowly (compared to some other things I am testing) in single node performance.
2 comments

SERIOUSLY! Riak is NOT MEANT for single-node clusters!!! It gets faster THE MORE NODES YOU ADD.

The minimum recommended number of nodes is 3; the "ideal" minimum number of nodes is 5.

yes, with n_val=3 (default) 3 nodes is the minimum. I was merely testing (actually had 3 riak instances on a single box as a "cluster") but with r,w=1 and n_val=1 it was about the same (slow), which was disconcerting. cpu was very high in one instance (others were nearly idle, and IO was low. I did not try dw=0 though (if that would even work). Might be worth a try.

I am going to try bitcask too, to see if eleveldb was the culprit and could be tuned.

Your test isn't valid if it was all on one box - the disk I/O is going to be really nasty with that. Your test would be better on three different machines.
The disk io was pretty low. It is serial get/update/delete (as I mentioned earlier). I even tried moving the data dirs to ramdisk (was plenty of ram), but it didn't help much at all. i/o was certainly not the problem.

It very well could be a configuration issue. I am still trying a few things to see if I can get an improvement.

If you haven't done so already, I would highly-recommend taking a look at Basho Bench, our open source benchmarking tool for Riak.

http://wiki.basho.com/Benchmarking.html https://github.com/basho/basho_bench

thanks. Will do!
Interesting. I can vouch for the speed of leveldb on a five node cluster - I'm using it in our startup on 5 dedicated machines with around 12GB of RAM, running on FreeBSD. Riak version is 1.1.4; Riak 1.2 is supposed to have a lot of leveldb refinements.
Good to hear. I will keep poking at things. I probably have something misconfigured or an issue with how I am using the python client.

Thanks.

What did you find slow? writes? retrieving by key? map-reduce? From what I've heard erlang map-reduce is much performant than the javascript one.
It was a sequence simple operations (simple as in no 2i or mapred) of read an existing key A, check if a nonexistent key exists B, write a previously nonexistent key C, delete an existing key D, overwrite an existing key A.

All performed in serial over protobuf (python riak lib).

LevelDB is known to have heavily degrading performance when you ask for a key that doesn't exist.