voldemort performance java client

119 views
Skip to first unread message

Georg Labbé

unread,
May 7, 2013, 10:56:37 AM5/7/13
to project-...@googlegroups.com
Hi,

I'm new into the voldemort db issue and facing some troubles with the performance of my first test-database.
When I am putting 1000 key-value pairs into my database, I need about 2200ms until the client finishes the task.
This means, that I can put about 454 entries per second. Isn't it a bit slow? Shouldn't I be able to achieve a better performance referring to the documentation on http://www.project-voldemort.com/voldemort/ ?

Here my database configuration and simple java code. What am I doing wrong and how do I achieve better rates?

cluster.xml
<cluster>
        <name>mycluster</name>
        <server>
                <id>0</id>
                <host>192.168.1.50</host>
                <http-port>8081</http-port>
                <socket-port>6666</socket-port>
                <partitions>0, 1</partitions>
        </server>
</cluster>

server.properties
# The ID of *this* particular cluster node

max.threads=100

############### DB options ######################

http.enable=true
socket.enable=true

# BDB
bdb.write.transactions=true
bdb.flush.transactions=true
bdb.cache.size=1G

# Mysql
mysql.host=localhost
mysql.port=1521
mysql.user=root
mysql.password=3306
mysql.database=test

#NIO connector settings.
enable.nio.connector=true

request.format=vp3
storage.configs=voldemort.store.bdb.BdbStorageConfiguration, voldemort.store.readonly.ReadOnlyStorageConfiguration

stores.xml
<stores>
  <store>
    <name>teststorage</name>
    <persistence>bdb</persistence>
    <description>Test store</description>
    <owners>te...@test.test</owners>
    <routing-strategy>consistent-routing</routing-strategy>
    <routing>client</routing>
    <replication-factor>1</replication-factor>
    <required-reads>1</required-reads>
    <required-writes>1</required-writes>
    <key-serializer>
      <type>string</type>
    </key-serializer>
    <value-serializer>
      <type>string</type>
    </value-serializer>
  </store>
</stores>


Java-Client

    String bootstrapUrl = "tcp://192.168.1.50:6666";
    StoreClientFactory factory = new SocketStoreClientFactory(new ClientConfig().setBootstrapUrls(bootstrapUrl));
    StoreClient<String, String> client = factory.getStoreClient("teststorage");
    int i = 0;
    Long timestamp = new Date().getTime();
    while (i < 1000) {
      client.put("testkey" + i, "testvalue"+i);
      i++;
    }
    Long timestamp2 = new Date().getTime();
    System.out.println("time: "+(timestamp2-timestamp)+" ms");
    
System configuration:
Voldemort-DB: Ubuntu-VM with 2 cores and 2 GB RAM.
Java-Client: Host system with Windows 7 6 GB RAM and i7.


I would be glad about any help I can get! 

Regards
Georg

Vinoth Chandar

unread,
May 7, 2013, 9:42:16 PM5/7/13
to project-...@googlegroups.com

Going by the fact that you have only 2G total in RAM, I think your BDB cache is too big?
What is your JVM config?

Carlos Tasada

unread,
May 8, 2013, 9:40:30 AM5/8/13
to project-...@googlegroups.com
My personal experience is that the bdb cache should be maximum the 60% of the whole VMSize. 

Also there are other factors in the way the VM is initialized that can affect the performance. 


--
You received this message because you are subscribed to the Google Groups "project-voldemort" group.
To unsubscribe from this group and stop receiving emails from it, send an email to project-voldem...@googlegroups.com.
Visit this group at http://groups.google.com/group/project-voldemort?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages