Yokozuna indexes too slow

ilyas i.sergeev at keepsolid.com
Thu Oct 1 02:18:34 EDT 2015

Hello to the Riak community!
I have a cluster of 5 nodes (hardware servers with SSDs, 8 CPU cores, 
16GB of RAM, most of it is free). When I store data to the database (up 
to 1 000 000 keys) without indexes, everything happens very quickly. If 
I create an index for yokozuna and do the same, the store rate decreases 
greatly (200 times). The process yokozuna takes up 100% of the time one 
core of CPU, other cores are not loaded. Keys are short strings (16 
symbols), values are json strings (length is about 200 characters).
How can I find out the reason of such performance and fix it?

*creation of bucket:*



#define search scheme
curl -XPUT $RIAK_HOST/search/schema/dbsearch -H 
'Content-Type:application/xml' --data-binary @dbSchema.xml

# create search index for scheme
curl -XPUT $RIAK_HOST/search/index/user_idx_bin -H 'Content-Type: 
application/json' -d '{"schema":"dbsearch"}'

# create bucket type for leleldb backend
sudo /usr/sbin/riak-admin bucket-type create leveldb 
sudo /usr/sbin/riak-admin bucket-type activate leveldb

#create buckets with known backends and indexes
curl -XPUT $RIAK_HOST/types/leveldb/buckets/SomeBucket/props -H 
'Content-Type: application/json' -d 

*index scheme:*

<?xml version="1.0" encoding="UTF-8" ?>
<schema name="dbschema" version="1.5">

    <field name="username"   type="string"  indexed="true" stored="true" />
    <field name="deviceid"   type="string"  indexed="true" stored="true" />
    <field name="appid"      type="int"  indexed="true" stored="true" />
    <field name="ip_address" type="int"  indexed="true" stored="true" />

    <!-- All of these fields are required by Riak Search -->
    <field name="_yz_id"   type="_yz_str" indexed="true" stored="true"  
multiValued="false" required="true"/>
    <field name="_yz_ed"   type="_yz_str" indexed="true" stored="false" 
    <field name="_yz_pn"   type="_yz_str" indexed="true" stored="false" 
    <field name="_yz_fpn"  type="_yz_str" indexed="true" stored="false" 
    <field name="_yz_vtag" type="_yz_str" indexed="true" stored="false" 
    <field name="_yz_rk"   type="_yz_str" indexed="true" stored="true"  
    <field name="_yz_rt"   type="_yz_str" indexed="true" stored="true"  
    <field name="_yz_rb"   type="_yz_str" indexed="true" stored="true"  
    <field name="_yz_err"  type="_yz_str" indexed="true" stored="false" 

    <dynamicField name="*" type="ignored"  />

    <!-- YZ String: Used for non-analyzed fields -->
    <fieldType name="_yz_str" class="solr.StrField" 
sortMissingLast="true" />
    <fieldType name="string" class="solr.StrField" sortMissingLast="true" />
    <fieldType name="boolean" class="solr.BoolField" 
    <fieldType name="int" class="solr.TrieIntField" precisionStep="0" 
    <fieldtype name="ignored" stored="false" indexed="false" 
multiValued="true" class="solr.StrField" />



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20151001/290aefe3/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dbSchema.xml
Type: text/xml
Size: 1899 bytes
Desc: not available
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20151001/290aefe3/attachment.xml>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: make_db_idx.sh
Type: application/x-shellscript
Size: 697 bytes
Desc: not available
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20151001/290aefe3/attachment.sh>

More information about the riak-users mailing list