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

Ryan Zezeski rzezeski at basho.com
Mon Aug 8 22:29:50 EDT 2011


Is it a constant 200% usage?  On both nodes in the cluster?  My first
thought, since your working with a small key-space, would be conflict
resolution or vclock explosion but you're spacing the writes out by 6s which
seems like more than enough time.  Are all 10 writes happening at the same
time concurrently?

I would set your N=2 since you only have two machines, or add a 3rd node.

Perhaps there is some weird behavior in the cache backend, but I would be
surprised if that was it.


On Wed, Aug 3, 2011 at 11:31 AM, Tony Bussieres <t.bussieres at gmail.com>wrote:

> 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 . ( #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
> _______________________________________________
> riak-users mailing list
> riak-users at lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20110808/14c36780/attachment.html>

More information about the riak-users mailing list