A newer version of this documentation is available.

View Latest

cbworkloadgen

    +
    Generates random data and performs reads and writes.

    Syntax

    The basic syntax is:

    cbworkloadgen -n [host]:8091 -u [username] -p [password] [options]

    Description

    The cbworkloadgen tool is useful for testing Couchbase Servers and clusters. It is installed in the following locations:

    Operating system Location

    Linux

    /opt/couchbase/bin/

    Windows

    C:\Program Files\Couchbase\Server\bin\

    Mac OS X

    /Applications/Couchbase Server.app/Contents/Resources/couchbase-core/bin/

    Options

    The following are the command options:

    Table 1. cbworkloadgen options
    Option Description

    -h, --help

    Show this help message and exit.

    -r [number], --ratio-sets=[number]

    The percentage of workload that are writes; the remainder is reads.

    -n [host]:8091, --node=[host]:8091

    Node’s ns_server ip:port.

    -b [bucket-name], --bucket=[bucket-name]

    Insert data to a different bucket other than default.

    -i [number], --max-items=[number]

    Number of inserted items.

    -s [number], --size=[number]

    Minimum value size.

    --prefix=pymc

    Prefix to use for memcached keys or json IDs.

    -j, --json

    Insert json data.

    -l, --loop

    Loop forever until interrupted by a user.

    -u [username], --username=[username]

    REST username for cluster or server node.

    -p [password], --password=[password]

    REST password for cluster or server node.

    -t [number], --threads=[number]

    Number of concurrent threads.

    -v, --verbose

    Verbose logging; more -Vs provide more verbosity.

    Example

    To generate workload on a given Couchbase Server node and open a port on that node:

    cbworkloadgen -n 10.5.2.54:8091
    	-r .9 -i 100000
    	-s 100
    	-b my-other-bucket
    	-t 10

    Response

    If successful, the command produces a result similar to the following:

      [####################] 100.0% (1111110/estimated 1111110 msgs)
    bucket: default, msgs transferred...
           :                total |       last |    per sec
     byte  :            111111000 |  111111000 |   636622.5
    done