Skip to content

Lite: Add memory clerks collector and tab #145

@erikdarlingdata

Description

@erikdarlingdata

Problem

Dashboard has a full Memory Clerks sub-tab showing top memory consumers by clerk type over time (chart + summary footer with Non-BP Total and Top Non-BP Clerk). This is useful for spotting unexpected memory consumers like MEMORYCLERK_SQLLOGPOOL, OBJECTSTORE_LOCK_MANAGER, or bloated CACHESTORE entries.

Lite's Memory tab only has Overview (summary cards + memory usage chart). No memory clerk breakdown at all.

Scope

  1. DuckDB table: New memory_clerks table
  2. Collector: New CollectMemoryClerksAsync in RemoteCollectorService — query sys.dm_os_memory_clerks grouped by type
  3. Display query: New method in LocalDataService for trend data
  4. UI: New "Memory Clerks" sub-tab under Memory with a chart showing top N clerks over time
  5. MCP tool: Expose via MCP

The collector query is straightforward — aggregate pages_kb by clerk type, store the top N per snapshot. Dashboard's collector (16_collect_memory_clerks_stats.sql) can serve as reference.

Priority

Medium. Memory clerk breakdown is one of the first things you check when SQL Server memory looks off — "where is all the memory going?" Without it, Lite's memory tab only tells you the total, not the composition.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions