Re: Tune Riak for fast inserts - populate DB

2013-02-14 Thread Bogdan Flueras
between the cluster and the client - and among the cluster nodes? Oprindelig meddelelse Fra: Shuhao mailto:shu...@shuhaowu.com>> Dato: Til: riak-users@lists.basho.com <mailto:riak-users@lists.basho.com> Emne: Re: Tune Riak for fast inserts

Re: Tune Riak for fast inserts - populate DB

2013-02-14 Thread Erik Søe Sørensen
lig meddelelse Fra: Shuhao mailto:shu...@shuhaowu.com>> Dato: Til: riak-users@lists.basho.com <mailto:riak-users@lists.basho.com> Emne: Re: Tune Riak for fast inserts - populate DB Hi, I've had similar experiences with riak. I used the Riak Python cli

Re: Tune Riak for fast inserts - populate DB

2013-02-14 Thread Bogdan Flueras
> >> Just to rule something out: what is the capacity of the network between >> the cluster and the client - and among the cluster nodes? >> >> >> Oprindelig meddelelse >> Fra: Shuhao >> Dato: >> Til: riak-users@lists.basho.c

Re: Tune Riak for fast inserts - populate DB

2013-02-14 Thread Erik Søe Sørensen
Just to rule something out: what is the capacity of the network between the cluster and the client - and among the cluster nodes? Oprindelig meddelelse Fra: Shuhao Dato: Til: riak-users@lists.basho.com Emne: Re: Tune Riak for fast inserts - populate DB Hi, I've had si

Re: Tune Riak for fast inserts - populate DB

2013-02-13 Thread Shuhao
Hi, I've had similar experiences with riak. I used the Riak Python client with HTTP and PBC (even rolled my own client! That only had a ~10% speed up though, and it was HTTP only). I've also examined that the Riak host machine's CPU is only at around 70% when I insert. Other NoSQL dbs uses ab

Re: Tune Riak for fast inserts - populate DB

2013-02-13 Thread Bogdan Flueras
Thanks guys :) I use a ThreadPoolExecutor with 10 threads. I'll try your solutions and keep you informed ing. Bogdan Flueras On Wed, Feb 13, 2013 at 12:40 PM, Guido Medina wrote: > Also, which I forgot on my reply, make sure your Riak client is connected > to each node and not only to a singl

Re: Tune Riak for fast inserts - populate DB

2013-02-13 Thread Guido Medina
Also, which I forgot on my reply, make sure your Riak client is connected to each node and not only to a single node (cluster config doesn't work that well, so try haproxy and make sure you are using protocol buffers) /HA proxy sample config:/ https://gist.github.com/gburd/1507077 And a singl

Re: Tune Riak for fast inserts - populate DB

2013-02-13 Thread Guido Medina
Are you transferring using a single thread? If so, I would recommend you to use a ThreaPoolExecutor and schedule each write as you, control the failures (if any) using either an AtomicInteger or a concurrent/synchronized list where you can track the keys that failed. No matter how much you do,

Re: Tune Riak for fast inserts - populate DB

2013-02-13 Thread Russell Brown
On 13 Feb 2013, at 09:44, Bogdan Flueras wrote: > Ok, so I've done something like this: > Bucket bucket = client.createBucket("foo"); // lastWriteWins(true) doesn't > work for Protobuf > > when I insert I have: > bucket.store(someKey, someValue).withoutFetch().pw(1).execute(); > > It looks li

Re: Tune Riak for fast inserts - populate DB

2013-02-13 Thread Bogdan Flueras
Ok, so I've done something like this: Bucket bucket = client.createBucket("foo"); // lastWriteWins(true) doesn't work for Protobuf when I insert I have: bucket.store(someKey, someValue).withoutFetch().pw(1).execute(); It looks like it's 20% faster than before. Is there something I could further t

Re: Tune Riak for fast inserts - populate DB

2013-02-13 Thread Bogdan Flueras
Each thread has it's own bucket instance (pointing to the same location) and I don't re-fetch the bucket per insert. Thank you very much! ing. Bogdan Flueras On Wed, Feb 13, 2013 at 10:14 AM, Russell Brown wrote: > > On 13 Feb 2013, at 08:07, Bogdan Flueras wrote: > > > How to set the bucket

Re: Tune Riak for fast inserts - populate DB

2013-02-13 Thread Russell Brown
On 13 Feb 2013, at 08:07, Bogdan Flueras wrote: > How to set the bucket to last write? Is it in the builder? Something like: Bucket b = client.createBucket("my_bucket").lastWriteWins(true); Also, after you've created the bucket, do you use it from all threads? You don't re-fetch the bu

Re: Tune Riak for fast inserts - populate DB

2013-02-13 Thread Bogdan Flueras
How to set the bucket to last write? Is it in the builder? I'll have a look.. Yes, I use more threads and the bucket is configured to spread the load across all nodes. Thanks, I'll have a deeper look into the API and let you know about my results. ing. Bogdan Flueras On Wed, Feb 13, 2013 at 10

Re: Tune Riak for fast inserts - populate DB

2013-02-13 Thread Russell Brown
Hi, On 13 Feb 2013, at 07:37, Bogdan Flueras wrote: > Hello all, > I've got a 5 node cluster with Riak 1.2.1, all machines are multicore, > with min 4GB RAM. > > I want to insert something like 50 million records in Riak with the java > client (Protobuf used) with default settings. I've tried

Tune Riak for fast inserts - populate DB

2013-02-12 Thread Bogdan Flueras
Hello all, I've got a 5 node cluster with Riak 1.2.1, all machines are multicore, with min 4GB RAM. I want to insert something like 50 million records in Riak with the java client (Protobuf used) with default settings. I've tried also with HTTP protocol and set w = 1 but got some problems. Howev