Using MBeans to evaluate performance

Example steps to use the MBeans on Linux to obtain information about performance while running the DataStax Solr stress test demo.

Example steps to use the MBeans on Linux to obtain information about performance while running the DataStax Solr stress test demo.


  1. Start a single DSE Search node.
  2. Start JConsole using the PID of the DSE Search node:
    sudo jconsole 1284
  3. In JConsole, connect to a DSE Search node. For example, connect to the Local Process com.datastax.bdp.DseModule.
  4. Change to the demos directory.
    The default location of the demos directory depends on the type of installation:
    Installer-Services and Package installations /usr/share/dse/demos
    Installer-No Services and Tarball installations install_location/demos
  5. Make demos/solr_stress your current directory.
  6. Execute this script to create the schema:
    ./ [options]
    where the script options are:
    CQL table creation options
    --ssl use SSL for Cassandra table creation over cqlsh
    Solr HTTP options
    -e CA_CERT_FILE use HTTPS with the provided CA certificate
    -E CLIENT_CERT_FILE use the provided client certificate
    -h HOST hostname or IP for Solr HTTP requests
    -a enable Kerberos
    -u USERNAME Kerberos username
    -p PASSWORD Kerberos password
    The script creates the Cassandra schema and posts the solrconfig.xml and schema.xml files to these locations:
    • http://localhost:8983/solr/resource/demo.solr/solrconfig.xml
    • http://localhost:8983/solr/resource/demo.solr/schema.xml
    The script then creates the core/index by posting to the following location:
    • http://localhost:8983/solr/admin/cores?action=CREATE&name=demo.solr
    You can override the script defaults by specifying command line parameters:
    -x schemafile.xml -t tableCreationFile.cql -r solrCofgFile.xml -k solrCore
  7. Execute this script to run the benchmark:
    ./ [--clients=clients_count] [--loops=loops_count] [--fetch=fetch_size] [--solrCore=solr_core] [--testData=test_data_file] [--url=url1,url2,url3,...] [--qps=qps] [--stats=true|false] [--seed=seed_value]
    where the script options are:
    The number of client threads to create.
    Default: 1
    The number of times the commands list gets executed if running sequentially or the number of commands to run if running randomly.
    Default: 1
    Fetch size for CQL pagination (disabled by default). Only the first page is retrieved.
    Solr core name to run the benchmark against.
    Name of the file that contains the test data.
    Value to set the random generator seed to.
    Maximum number of queries per second allowed.
    Specifies whether to gather statics during runtime and create a csv file with the recorded values.
    Default: false
    A comma delimited list of servers to run the benchmark against. For example: --url=http://localhost:8983,,
    Default: http://localhost:8983
    The demo creates a Solr core named demo.solr and indexes 50,000 documents.
    Example CQL commands:
    ./ --url=http://localhost:8983 --testData=resources/testCqlQuery.txt --solrCore=demo.solr
    ./ --url=http://localhost:8983 --testData=resources/testCqlWrite.txt --solrCore=demo.solr

    See /demos/solr_stress/README.txt for execution modes and sample script commands.

  8. In JConsole, expand com.datastax.bdp > search > demo.solr to view the MBeans.
    The CommitMetrics and QueryMetrics MBeans are present.
  9. In JConsole, in Search > demo.solr > CommitMetrics > Operations > getLatencyPercentile, type EXECUTE in the p0 text entry box and 0.95 in the p1 text entry box. Click the getLatencyPercentile button.
    The Operation return value, 582 microseconds, appears:
    The JConsole CommitMetrics getLatencyPercentile operation return value.