Skip to content

Tracking: settle disk formats, deployments, and where reductions run #184

Open

Description

@SimonHeybrock

A review of the design on 2026-11-12 (core, performance, spec interface, applications, requirements coverage) found the core mechanism sound: records, the history log, the two-phase check, the change feed, specs as two pydantic models, and the binding protocols. The open points are where the system meets something outside one Python process. This issue tracks the steps that settle them, in order. #155 stays the map of components.

Steps

Steps 1 and 2 come before 3, because they decide what must be durable and where values live.

The open points behind the steps

Open point Step Related
The folder workspace writes a log and a store whose content is not settled: spec identity, file identity, labels, the stored form of a request. 0, 3 #80, #175, #177, #179
Each decided deployment is one process with its own workspace, so a proposal has several histories. A value passes between them only as a file: writer, layout, publish, listing, load spec. That path has no design. 1 #152, #176, #162
Reductions run on threads in the application's process. 2 #27, #151
Batch and rules both answer "which runs still need a reduction, paired with which runs". A batch's definition lives in the memory of one process. 4 #151, #179, #68
Three plot contracts: plopp figure, Panel object, Plotly dict. 4 #149
One technique is bound; accumulators have toy drivers only. 5 #40
The store reads a value whole; no file source sees a new file. 3 #57, #131

Assumptions made (Simon, 2026-11-12)

  • How a file says what role a run plays is not settled at ESS. Applications assume a rule and let the user override it, as the batch table does.
  • The automatic-reduction service may create derived datasets in SciCat.
  • Only automatic reduction must run as a service. Batch reduction may run as an application that a user starts on a VISA machine, and for a first release automatic reduction may too (Simon, 2026-11-13).
  • Automatic reduction has a base configuration per instrument, adjusted per proposal or within a proposal.
  • How services are deployed at DMSC is not settled.

Not in scope now

connect() and everything hosted (#27), the cluster executor, the choice of widget library, detector banks (#166), the serialized spec schema (#88, #118), technique export formats beyond the writer interface (#176).

Activity

  1. SimonHeybrock commented on Nov 13, 2026

    @SimonHeybrock
    MemberAuthor

    Step 2, measured. 4 I(Q) reductions of the LoKI tutorial files (458,752 pixels) through a Client, 24 cores, median of 3 runs unless marked:

    Configuration Wall s Peak memory GB
    plain requests, 1 workspace thread 14.8 8.2
    plain requests, 2 workspace threads (1 run) 16.1 14.8
    plain requests, 4 workspace threads (the default) 20.1 27.0
    one stage, 1 workspace thread (1 run) 7.9 4.7
    one stage, 4 workspace threads (as the LoKI batch) 7.3 14.9
    pool of 4 worker processes, outputs passed as store files 8.5 28.5

    On 6 cores (a standard VISA machine) the order is the same: 15.8 s, 23.8 s (4 threads), 8.7 s (stage), 10.9 s (pool).

    What it says:

    • The workspace's threads do not speed up a workflow that is parallel inside (dask and TBB). They slow plain requests and multiply the memory. Causes: building the sciline graph holds the interpreter lock for about 35 % of a chain (LokiAtLarmorWorkflow() takes 0.65 s and is built about 4 times per chain), and each workspace thread's sciline call starts its own dask pool.
    • The stage gives the gain, by reducing the can and the empty beam once. It gives it on one thread too.
    • Worker processes give 1.4 to 1.9 times on plain requests and lose to the in-process stage (8 rows: 16.6 s against 11.1 s). Passing outputs as files costs 0.5 to 3 % of a request. So speed does not justify them. Isolation does, for a process that runs 24/7: one busy Python thread next to a real chain made it 7.4 times slower, and a reduction that exhausts memory ends the process.
    • The batch page polling once a second does not slow the reductions. The reductions raise the page's p95 latency from 4 ms to 40 ms (1 page) or 220 ms (5 pages).
    • A cut of a 1 GB volume costs 0.1 ms in process and 25 ms from another process, so a driver that an application reads cuts of stays in the workspace's process.
    • Memory bounds concurrency, not cores: one I(Q) peaks at 7.5 to 9 GB on these files, and LoKI has 7 times the pixels.

    Not measured: the ESS network file system, real LoKI run sizes, a VISA virtual machine, a stage inside a worker process.

    Open for decision: the default number of workspace threads, and when worker processes are built.

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

Metadata

Metadata

Assignees

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