Skip to content

Running a Workload in Parallel

brianfrankcooper edited this page Sep 14, 2010 · 3 revisions

Running multiple clients in parallel

It is straightforward to run the transaction phase of the workload from multiple servers – just start up clients on different servers, each running the same workload. Each client will produce performance statistics when it is done, and you’ll have to aggregate these individual files into a single set of results.

In some cases it makes sense to load the database using multiple servers. In this case, you will want to partition the records to be loaded among the clients. Normally, YCSB just loads all of the records (as defined by the recordcount property). However, if you want to partition the load you need to additionally specify two other properties for each client:

  • insertstart: The index of the record to start at.
  • insertcount: The number of records to insert.

These properties can be specified in a property file or on the command line using the -p option.

For example, imagine you want to load 100 million records (so recordcount=100000000). Imagine you want to load with four clients. For the first client:

insertstart=0
insertcount=25000000

For the second client:

insertstart=25000000
insertcount=25000000

For the third client:

insertstart=50000000
insertcount=25000000

And for the fourth client:

insertstart=75000000
insertcount=25000000