Skip to content

[Performance] Implement Memory-Mapped (mmap) Poller Cache #486

@somethingwithproof

Description

@somethingwithproof

Summary

Spine currently executes thousands of SELECT queries against the database at the start of a poll cycle to determine the 'previous state' and metadata of a host.

Work

  • Replace the SQL-backed state cache with a Shared Memory (mmap) segment or a lightweight embedded datastore (like LMDB or LevelDB).
  • Architecture: The 'Live' poller state is kept in memory. Spine reads/updates this instantly with zero network overhead.
  • Dependency: This requires coordination with the upstream Cacti PHP application so the UI can read the shared memory state instead of querying the SQL host table.
  • Performance Gain: Near-instant host status lookups and a massive reduction in read queries against the main database.

Acceptance Criteria

  • Work items are implemented and validated.
  • Changes preserve behavior unless explicitly intended.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions