Load Generator Setup

Skip to end of metadata
Go to start of metadata

Setting up and running the Java Load Generator is a simple task and can be achieved by following the steps below. The Java Load Generator is an extension of the Yahoo YCSB project and simply adds Memcached protocol functionality to this project. For more information about the software that this project was built on top of you can visit http://research.yahoo.com/Web_Information_Management/YCSB


  • Java (version 1.6 or later)
  • Ant
  • git

Getting the Java Load Generator:

The code for the java load generator can be found at https://github.com/mikewied/Memcached-Java-Load-Client. In oder to download it just cd into the directory where you would like the project to be and type "git clone git@github.com:mikewied/Memcached-Java-Load-Client.git".

Running Tests:

The first step to running a test with the load generator is creating a workload file that will contain all of the information about how your test should be run. For help creating your workload file see the [Load Generator Properties] Page for a list of all of the properties that can be defined in a workload file. Below is an example of a workload file that can be used to run your tests. There is also a workload folder in the root directory of the Load Generator project that contains sample workloads.

Workload Example
# Workload B: Read mostly workload
# Application example: photo tagging; add a tag is an update, but most operations are to read tags
# Read/update ratio: 95/5
# Default data size: 1 KB records (10 fields, 100 bytes each, plus key)
# Request distribution: zipfian 









This example defines a many parameters for the load generator, but only five are necessary to actually run the program. The minimum number of property definitions needed are the db property, the workload property, the protocol property, the recordcount property, and the operationcount property. Note also that certain database choices require some properties also. In the case of this workload we need the memcached.address and memcached.port property. See the [wiki pages] that discuss each client for more details about the required properties. All other properties have set defaults in the load generator and will produce load against your cluster.

Building the Load Generator

Building the load generator is different depending on which type of database you decide to use. The load generator uses ant for building the project and building a different databases to use with the load generator is as simple as typing a different target name after the ant command. See the [membase:Load Generator Clients] wiki page for more information on building the load generator for a specific client.

Loading data

Unfortunately at this time data loading can only take place from a single client, but once a workload configuration file is defined it is very easy to load your cluster with data. Type the command below:

Load Data Phase
java -cp build/ycsb.jar:<path_to_db_jar> com.yahoo.ycsb.LoadGenerator -load -P <path_to_workload_file>

java -cp build/ycsb.jar:lib/memcached-2.5-14-g3b3b3c8.jar com.yahoo.ycsb.LoadGenerator -load -P workloads/workloadb

Running the Load Generator

Running the load generator is a similar process to loading the data with the load generator. This process again varies depending on the specific database you will be loading data to. Below is an example command for running the load generator.

The Run Phase
java -cp build/ycsb.jar:<path_to_db_jar> com.yahoo.ycsb.LoadGenerator -t -P <path_to_workload_file>

java -cp build/ycsb.jar:lib/memcached-2.5-14-g3b3b3c8.jar com.yahoo.ycsb.LoadGenerator -t -P workloads/workloadb
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.