MBeans search demo
Use MBeans to evaluate performance for the search demo.
Procedure
- 
Change to the demosdirectory.The default location of the demos directory depends on the type of installation: - 
Package installations: /usr/share/dse/demos
- 
Tarball installations: INSTALL_DIRECTORY/demos
 
- 
- 
Make demos/solr_stressyour current directory.
- 
Create the schema: pushd resources/schema && ./create-schema.shThe following options are available: - 
CQL table creation options: - 
--ssluse SSL for 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 schema and posts the solrconfig.xmlandschema.xmlfiles tohttp://localhost:8983/solr/resource/demo.solr/solrconfig.xmlandhttp://localhost:8983/solr/resource/demo.solr/schema.xml.The script then creates the search index by posting to 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
- 
- 
Run the benchmark: ./run-benchmark.sh [--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]The following options are available: - 
--clients: The number of client threads to create. Default:1
- 
--loops: 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: Fetch size for CQL pagination (disabled by default). Only the first page is retrieved.
- 
--solrCore: Search index name to run the benchmark against.
- 
--testData: Name of the file that contains the test data.
- 
--seed: Value to set the random generator seed to.
- 
--qps: Maximum number of queries per second allowed.
- 
--stats: Specifies whether to gather statics during runtime and create a csv file with the recorded values. Default:false
- 
--url: A comma delimited list of servers to run the benchmark against. For example:--url=http://localhost:8983,http://192.168.10.45:8983,http://192.168.10.46:8983. Default:http://localhost:8983
 The demo creates a Search index named demo.solr and indexes 50,000 documents. + Example CQL commands: + ./run-benchmark.sh --url=http://localhost:8983 --testData=resources/testCqlQuery.txt --solrCore=demo.solr+ ./run-benchmark.sh --url=http://localhost:8983 --testData=resources/testCqlWrite.txt --solrCore=demo.solr+ See /demos/solr_stress/README.txtfor execution modes and sample script commands.
- 
- 
In JConsole, expand com.datastax.bdp > search > demo.solr to view the MBeans. The CommitMetrics and QueryMetrics MBeans are present. 
- 
In JConsole, in Search > demo.solr > CommitMetrics > Operations > getLatencyPercentile, type EXECUTEin the p0 text entry box and0.95in the p1 text entry box. Click the getLatencyPercentile button.The Operation return value, 582 microseconds, appears:   
