Collecting slow Solr queries

Enable the solr_slow_sub_query_log_options parameter in dse.yaml.

The solr_slow_sub_query_log_options performance object reports distributed sub-queries (query executions on individual shards) that take longer than a specified period of time.

All objects are disabled by default.

Procedure

  1. Edit the dse.yaml file.
    The location of the dse.yaml file depends on the type of installation:
    Installer-Services /etc/dse/dse.yaml
    Package installations /etc/dse/dse.yaml
    Installer-No Services install_location/resources/dse/conf/dse.yaml
    Tarball installations install_location/resources/dse/conf/dse.yaml
  2. In the dse.yaml file, under the solr_slow_sub_query_log_options parameter, change enabled to true and set the other options as required.
    # Solr slow query log options
    solr_slow_sub_query_log_options:
        enabled: true
        ttl_seconds: 604800
        async_writers: 1
        threshold_ms: 100

    The default parameter values minimize resource usage.

    Options
    Name Type Affects
    enabled boolean Whether or not the object is enabled at start up.
    ttl_seconds int How long (in seconds) a record survives before expiring from the performance object.
    async_writers int For event-driven objects, such as the slow log, determines the number of possible concurrent slow query recordings. Objects like solr_result_cache_stats are updated in the background.
    threshold_ms int For the slow log, the level (in milliseconds) at which a sub-query slow enough to be reported.