Dashboard and Operations: Difference between revisions

From MemCP
Jump to navigation Jump to search
(Created page with "The <code>/dashboard</code> interface provides CPU/memory/request metrics, database and table browsing, shard/compression details, SQL/Scheme consoles, users and grants, runtime settings, process inspection, service state, and configured logs. <code>SHOW [FULL] PROCESSLIST</code>, dashboard process controls, <code>KILL QUERY</code>, and <code>KILL CONNECTION</code> expose active work and cancellation. Graceful shutdown stops new requests and waits up to <code>ShutdownDr...")
 
(Refresh MemCP documentation: accuracy, operational guidance, performance profile and maintained API reference)
 
Line 1: Line 1:
The <code>/dashboard</code> interface provides CPU/memory/request metrics, database and table browsing, shard/compression details, SQL/Scheme consoles, users and grants, runtime settings, process inspection, service state, and configured logs.
<!-- Copyright (C) 2026 Carl-Philip Haensch -->
<!-- SPDX-License-Identifier: GPL-3.0-or-later -->
= Dashboard and Operations =


<code>SHOW [FULL] PROCESSLIST</code>, dashboard process controls, <code>KILL QUERY</code>, and <code>KILL CONNECTION</code> expose active work and cancellation. Graceful shutdown stops new requests and waits up to <code>ShutdownDrainSeconds</code> for in-flight work.
The built-in <code>/dashboard</code> interface brings together the operational views needed to understand a running MemCP instance: CPU and memory metrics, requests, databases and tables, shard and compression details, SQL and Scheme consoles, users and grants, runtime settings, active processes, service state, and configured logs.


Optional <code>MetricsTracing</code> writes periodic samples. <code>ErrorQueryLog</code> and <code>PrintLog</code> store failed SQL and Scheme print/time output with configurable retention limits. These logs may contain SQL text or application data; restrict access and set appropriate limits.
== Inspecting and stopping work ==


Protect the dashboard with a strong password and network controls. Do not use it as a substitute for backups, external health checks, alerting, or backend monitoring. Watch memory budgets, errors, active requests, WAL/rebuild behavior, remote-storage latency, and restart validation.
Use <code>SHOW PROCESSLIST</code> or <code>SHOW FULL PROCESSLIST</code> from SQL to inspect current connections and queries. <code>KILL QUERY</code> cancels a running statement while leaving its connection available; <code>KILL CONNECTION</code> closes the session. The dashboard exposes the same operational controls.
 
Cancellation is cooperative. A query must reach a cancellation-aware planner or storage boundary before it stops. During graceful shutdown MemCP rejects new work and waits up to <code>ShutdownDrainSeconds</code> for in-flight requests.
 
== Metrics and logs ==
 
Optional <code>MetricsTracing</code> records periodic runtime samples. <code>ErrorQueryLog</code> stores failed SQL and <code>PrintLog</code> captures Scheme print/time output; both have configurable retention limits. Because SQL text, parameters, identifiers, or application data can occur in these logs, restrict access and choose limits appropriate to the workload.
 
Monitor at least:
 
* current memory use versus total and persistent-data budgets;
* eviction and cold-column reload activity;
* active and failed requests, latency, and cancellations;
* WAL, rebuild, checkpoint, and restart behavior;
* local or remote storage latency and errors;
* connection count and long-running transactions.
 
== Production boundaries ==
 
Protect the dashboard with strong credentials, TLS at a trusted proxy, and network controls. It is an inspection surface, not a replacement for backups, external health checks, alerting, capacity planning, or restore tests. See [[Settings]], [[Security and Authentication]], [[Memory Management and Eviction]], and [[Performance Measurement]].

Latest revision as of 11:59, 28 August 2026

Dashboard and Operations

The built-in /dashboard interface brings together the operational views needed to understand a running MemCP instance: CPU and memory metrics, requests, databases and tables, shard and compression details, SQL and Scheme consoles, users and grants, runtime settings, active processes, service state, and configured logs.

Inspecting and stopping work

Use SHOW PROCESSLIST or SHOW FULL PROCESSLIST from SQL to inspect current connections and queries. KILL QUERY cancels a running statement while leaving its connection available; KILL CONNECTION closes the session. The dashboard exposes the same operational controls.

Cancellation is cooperative. A query must reach a cancellation-aware planner or storage boundary before it stops. During graceful shutdown MemCP rejects new work and waits up to ShutdownDrainSeconds for in-flight requests.

Metrics and logs

Optional MetricsTracing records periodic runtime samples. ErrorQueryLog stores failed SQL and PrintLog captures Scheme print/time output; both have configurable retention limits. Because SQL text, parameters, identifiers, or application data can occur in these logs, restrict access and choose limits appropriate to the workload.

Monitor at least:

  • current memory use versus total and persistent-data budgets;
  • eviction and cold-column reload activity;
  • active and failed requests, latency, and cancellations;
  • WAL, rebuild, checkpoint, and restart behavior;
  • local or remote storage latency and errors;
  • connection count and long-running transactions.

Production boundaries

Protect the dashboard with strong credentials, TLS at a trusted proxy, and network controls. It is an inspection surface, not a replacement for backups, external health checks, alerting, capacity planning, or restore tests. See Settings, Security and Authentication, Memory Management and Eviction, and Performance Measurement.