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)
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 email@example.com:mikewied/Memcached-Java-Load-Client.git".
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.
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 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.
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:
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.