Simple performance question

Victor 'Zverok' Shepelev vshepelev at imho.com.ua
Tue Feb 23 10:05:36 EST 2010


Hi all.

Trying to test riak performance, I've stored 10'000 values
(JSON-encoded objects) in one bucket, then trying map-reduce request
to this bucket.

map phase is just "Riak.mapValuesJson"

reduce phase is like
---
    function(values, a){
        minKey = 'ZZZZ'; minTask = null;
        for(i = 0; i < values.length; ++i){
            val = values[i]
            if(val.scheduled < minKey){
                minKey = val.scheduled;
                minTask = val;
            }
        }
        return [minTask];
    }
---

It's like just: find task with minimal "scheduled" field.

Then, on bucket with 10'000 values, I have this request performing
~1min (through Unix time) on Celeron 2.6GHz 1Gb.
Is this result expected or am I doing something wrong?

Also, sometimes I obtain just {"error":"timeout"} instead of result.
Is this expected?

Thanks.

V.




More information about the riak-users mailing list