High cpu usage on store() , small number of keys

Tony Bussieres t.bussieres at gmail.com
Wed Aug 3 11:31:45 EDT 2011


I'm starting to play with Riak,  so far I am very impressed with the
product.

I want to use Riak as an highly available distributed cache.

I've compiled Erlang R1304 from source (--with-ssl, --enable-smp-support,
--enable-kernel-poll)
I've compiled riak-0.14.2 from source
I use 2 nodes, they are running on two RHEL5 box . (2.6.18.8.el5 #1 SMP).
They are clustered.
I use HAProxy to load balance the request on the two nodes.

I have a test bench that  plays with  80 keys in one bucket (I use
riak_kv_cache_backend)
I use the java client (riak-client 0.14.1 fetched using a maven repo)


I have 10 clients that does something like this :
while(true) {
   Fetch a key from the bucket
   Sleep between 100 and 400ms
}

I have also 10 servers that updates data in the keys every 6 seconds  (80
keys)
conceptually they do something like this :
while (true) {
   Fetch a key from the bucket
   Update the data
   Store the key in the bucket
   Sleep 6000ms
}

The number of clients have a little impact on the CPU usage of the nodes.
However when I start 10 servers, the CPU usage goes very high (I saw one of
the node going up to 200%)

Is there something I should check or do  to lower the CPU usage on the nodes
when I write keys to Riak?

Thanks a lot!

-tony
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20110803/8dace0e1/attachment.html>


More information about the riak-users mailing list