Forum: Other

Post: Slow insert rate

Slow insert rate
Jun 10, 2011
Hi, I'm doing experiments for the first time on VoltDB, and I created an application just to see the performance and compare with other DBMS. I run it only on a Core2Duo on Ubuntu 64-bit, but I've slow rates when doing inserts...when I'm inserting 10.000 rows on the database, just with one table with 14 columns, I've an average of 180 inserts per second.

Is this rate normal?

re: Slow insert rate
Jun 10, 2011

180 inserts per second isn't normal at all. I suspect you are calling stored procedures synchronously and/or using multi-partition stored procedures that could possibly be single-partition.

Can you attach your application to this forum post or email it to Be sure to include everything (client application source code, ddl, project.xml, deployment.xml, stored procedures, etc.)

Its not only with my app,
Jun 10, 2011
Its not only with my app, cause I've made a few changes to the HelloWorld example from voltDB, and I've the same rate, almost 200 per second:
public class Client {

public static void main(String[] args) throws Exception {

* Instantiate a client and connect to the database.
org.voltdb.client.Client myApp;
myApp = ClientFactory.createClient();

* Load the database.
for(int i=0; i<10000; i++){
myApp.callProcedure("Insert", "Hello", "World", "English"+i);
myApp.callProcedure("Insert", "Bonjour", "Monde", "French"+i);
myApp.callProcedure("Insert", "Hola", "Mundo", "Spanish"+i);
myApp.callProcedure("Insert", "Hej", "Verden", "Danish"+i);
myApp.callProcedure("Insert", "Ciao", "Mondo", "Italian"+i);

* Retrieve the message.
final ClientResponse response = myApp.callProcedure("Select",
if (response.getStatus() != ClientResponse.SUCCESS){

final VoltTable results[] = response.getResults();
if (results.length == 0 || results[0].getRowCount() != 1) {
System.out.printf("I can't say Hello in that language.

VoltTable resultTable = results[0];
VoltTableRow row = resultTable.fetchRow(0);
System.out.printf("%s, %s!
", row.getString("hello"),
Synchronous calls => limited throughput
Jun 10, 2011
Hey John,

I believe in both cases you're running your transactions synchronously, as in: 'do "something"; wait; get response; loop' - this is a model that will limit your throughput greatly. In addition, specifically for you HelloWorld changes, your calls will cause constraint violations as you keep inserting the same dialect. Not that it will impact much in the absolute though.

Try to have a run with the Voter sample. You should see much better throughput because of the asynchronous model (which will also be much closer to reality: multiple clients inserting some records concurrently, instead of just one client).
I have a similar hardware configuration here (on Mac OSX) and Voter runs at about 20,000 transactions per second (with each transaction being 2-3 SQL statements).

Changing your application to use the asynchronous model should be relatively easy and address this issue for you.

Hope this helps,