JBoss Community Archive (Read Only)

Infinispan 5.2

Load Testing Infinispan Server Modules

Infinispan comes with different server implementations that allow Infinispan to be accessed remotely. You can find an overview about these servers here.

This wiki explains how to load test and benchmark these server implementations using Grinder, which is a Java load testing framework that makes it easy to run a distributed test using many load injector machines.

  1. First of all, download Grinder version 3.4 or higher and unzip it somewhere locally.

  2. Next, download and unzip the Infinispan version that you want to be testing. Make sure you download the -all.zip distribution to run these tests. Note that although Infinispan REST server was included in 4.0, Memcached and Hot Rod servers are only included from 4.1 onwards.

  3. Download Infinispan Grinder scripts and other material from this source repository.

  4. Next up, modify bin/setGrinderEnv.sh file to set correct environment paths. Primarily, you should be looking at setting the following properties correctly (The rest of properties not mentioned below can be left as they are) :

    1. INFINISPAN_HOME: It should point to the location where Infinispan was unzipped.

    2. GRINDER_HOME: It should point to where Grinder was unzipped.

    3. GRINDER_PROPERTIES: It should point to the grinder.properties provided with the Infinispan Grinder scripts

    4. SPYMEMCACHED_HOME: It should only be modified to point to Spymemcached Memcached client library if you're planning to load test Infinispan Memcached server.

  5. It is time now to start the Infinispan server that you want to be testing. For detailed information on starting up a Hot Rod server, check this wiki. If you want to start the Hot Rod server quickly, the following command should do the job:

    1. $INFINISPAN_HOME/bin/startServer.sh -r hotrod -l

  6. Finally, let's start the load test. Currently, a single load test exists which after a warmup phase, it does a certain amount of put/get calls on a pool of keys with a configurable distribution. By default, it executes 20% put operations and 80% get operations. So, if you're going to start the Hot Rod test, you'd simply do:

    1. cd infinispan-server-grinder/

    2. ./bin/startHotRodAgent.sh

  7. Once the test has finished, the output can be located in infinispan-server-grinder/log/out-<host>-0.log and will show something like this at the bottom:

             Tests    Errors   Mean Test   Test Time   TPS         
                               Time (ms)   Standard                 
    Test 1   25       0        13742.56    457.22      0.29      "Warmup (1000 ops)"
    Test 2   400136   0        1.92        2.55        4687.08   "Read (20000 ops per thread)"
    Test 3   99864    0        2.41        4.97        1169.78   "Put (20000 ops per thread)"
    Totals   500025   0        2.70        97.26       1952.38  

    The output is saying that it first run 25 threads, each sending 1000 operations in order to warm up the cache. Afterwards, each of these 25 threads send 20.000 operations making a total of 500.000 operations, out of which 400136 were get calls and 99864 were put calls, and the test here indicates what was the mean test time for each of these operations, including standard deviation and how many operations per second (TPS) were executed. In this case, 4686 get operations per second and 1169 put operations per second.

JBoss.org Content Archive (Read Only), exported from JBoss Community Documentation Editor at 2020-03-11 09:19:38 UTC, last content change 2013-07-08 14:21:29 UTC.