Skip to content

sessions: SQLite runtime reads ~2 TB/3 h from sessions.db on a busy profile #2521

Description

@ScriptedAlchemy

Summary

On the operator daemon (beta.60 541e98e, PID 521340, up 2 h 49 min at 21:56 UTC) the SQLite runtime threads read 2.04 TB through read(2) (tracedecay-rusq threads, 509.6M read syscalls, 8389 CPU-s), plus 587 GB on tokio workers. Syscall sampling of the hot tracedecay-rusq threads shows pread64 on the project's sessions.db (16.4 GB) and user-sessions.db (14 GB) and on deleted /var/tmp/etilqs_* files (SQLite temp B-trees for sorts/GROUP BY). One thread alone was reading ~1 GB/s and writing ~666 MB/s over a 10 s window at 20:33 UTC.

This is separate from #2505: an isolated daemon indexing a full clone of the same repository with an empty session profile shows tracedecay-rusq threads at 0.2 GB read in 42 min, so the traffic is session/observation storage work, not code-graph publication.

Evidence (read-only, supported surfaces)

/proc/521340/io            rchar=2868777543478 wchar=838231194338 syscr=2860184121
per thread group (rchar)   tracedecay-rusq 2040 GB  tokio-rt-worker 587 GB  tracedecay-inde 223 GB
hot rusq fds               39,96,36,42,46 -> projects/proj_a5b3d7e3ebe14ca7/sessions.db
                           25 -> user-sessions.db, 73/18 -> /var/tmp/etilqs_* (deleted)
journal                    "exact SQL reader lane is saturated", "SQLite advance query failed: interrupted",
                           "projection output collided; recording a durable skip disposition" (repeated)

Expected

Measure (Hotpath) which session-store queries do full scans or temp-B-tree sorts over the 16 GB store per ingest/projection pass and fix the mis-sized work (index or batching), rather than per-row rescans. Found while root-causing #2505.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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