Update metrics MBean

The update metrics MBean is useful for tuning indexing performance.

This MBean records the amount of time spent to execute an index update, split by the following main phases:

WRITE
Comprising the time spent to convert the search document and write it into the database (available only when indexing via the SolrJ HTTP APIs).
QUEUE
Comprising the time spent by the index update task into the index pool.
PREPARE
Comprising the time spent preparing the actual index update.
EXECUTE
Comprising the time spent to actually execute the index update on Apache Lucene®.

Use the update metrics MBean tune all factors that impact indexing performance, such as back pressure, indexing threads, RAM buffer size, and merge factor.

MBean operations

The following MBean operations are provided:
  • setEnabled(boolean enabled)

    Enables/disables metrics recording (enabled by default).

  • isEnabled()

    Checks if metrics recording is enabled.

  • getLatencyPercentile(String phase, double percentile)

    Gets a commit latency percentile by its phase.

  • getRecordedLatencyCount(String phase)

    Gets the total count of recorded latency metrics by its phase.

  • getUnrecordedLatencyCount()

    Gets the total count of unrecorded latency values, because exceeding the max tracked latency.

  • resetLatency(String phase)

    Resets latency metrics for the given phase.

  • resetLatencies()

    Resets all latency metrics.

The maximum tracked latency is 10 minutes. Latency values are in microseconds.