Snippet - Speedup

Recovery speedup

# Temporary incident settings. Verify disk, CPU, and network headroom first.
PUT /_cluster/settings
{
  "persistent": {
    "cluster.routing.allocation.node_concurrent_outgoing_recoveries": "8",
    "cluster.routing.allocation.node_concurrent_incoming_recoveries": "8",
    "cluster.routing.allocation.node_initial_primaries_recoveries": "4",
    "cluster.routing.allocation.cluster_concurrent_rebalance": "4",
    "indices.recovery.max_bytes_per_sec": "250mb",
    "indices.recovery.max_concurrent_operations": "4",
    "indices.recovery.max_concurrent_file_chunks": "8"
  }
}

Disk limits for a logging cluster

# Logging cluster only; absolute values are free space, so low must exceed high and flood stage.
PUT /_cluster/settings
{
  "persistent": {
    "cluster.routing.allocation.disk.watermark.low": "100gb",
    "cluster.routing.allocation.disk.watermark.high": "75gb",
    "cluster.routing.allocation.disk.watermark.flood_stage": "50gb",
    "cluster.routing.allocation.disk.watermark.flood_stage.frozen": "50gb"
  }
}

Recovery speedup reset

PUT /_cluster/settings
{
  "persistent": {
    "cluster.routing.allocation.node_concurrent_outgoing_recoveries": null,
    "cluster.routing.allocation.node_concurrent_incoming_recoveries": null,
    "cluster.routing.allocation.node_initial_primaries_recoveries": null,
    "cluster.routing.allocation.cluster_concurrent_rebalance": null,
    "indices.recovery.max_bytes_per_sec": null,
    "indices.recovery.max_concurrent_operations": null,
    "indices.recovery.max_concurrent_file_chunks": null
  }
}

Disk limits reset

PUT /_cluster/settings
{
  "persistent": {
    "cluster.routing.allocation.disk.watermark.low": null,
    "cluster.routing.allocation.disk.watermark.low.max_headroom": null,
    "cluster.routing.allocation.disk.watermark.high": null,
    "cluster.routing.allocation.disk.watermark.high.max_headroom": null,
    "cluster.routing.allocation.disk.watermark.flood_stage": null,
    "cluster.routing.allocation.disk.watermark.flood_stage.max_headroom": null,
    "cluster.routing.allocation.disk.watermark.flood_stage.frozen": null,
    "cluster.routing.allocation.disk.watermark.flood_stage.frozen.max_headroom": null
  }
}