Two important points:

First, n_val determines how many partitions (or virtual nodes) the data will be 
distributed to. The ring size determines how many partitions exist, and should 
be a much larger number than the number of servers your cluster will run on.

Riak's default ring size is 64, so defining an n_val of 3 should be perfectly 
fine for your cluster.

Having said that, Riak is not designed to run on one server, and you will find 
performance to be very poor. It can be tuned for one server, but its purpose in 
life is to run a distributed, highly available database, which doesn't map well 
to a single server. Running a ring size of 64 on one server is like having 64 
different databases fighting for your disk I/O.

We recommend no fewer than 5 servers in a production cluster.

-John

On Jun 10, 2013, at 12:01 PM, Alexander Ilyin <[email protected]> wrote:

> Hi all,
> 
> I have a question regarding setting the n_val.
> In the documentation 
> (http://docs.basho.com/riak/latest/tutorials/fast-track/Tunable-CAP-Controls-in-Riak/)
>  it is stated that:
> 
> n_val must be greater than 0 and less than or equal to the number of actual 
> nodes in your cluster to get all the benefits of replication. 
> And, we advise against modifying the n_val of a bucket after its initial 
> creation as this may result in failed reads because the new 
> value may not be replicated to all the appropriate partitions.
> 
> But this seems contradictory to me. Which value I have to set if I'm setting 
> up one node right now but planning to add second one later?
> Setting n_val=2 means this value will be greater than actual number of nodes. 
> But setting n_val=1 is also not advisable since
> I will have to change it later to n_val=2 (I'm planning to have two replicas 
> in the end).
> 
> I'm also concerned about the performance in case of one node and n_val=2. 
> Will it degrade since both replicas are stored on the same server?
> 
> _______________________________________________
> riak-users mailing list
> [email protected]
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

_______________________________________________
riak-users mailing list
[email protected]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to