Skip to content

A run's fixed host cost is unprofiled: 0.1–0.3 s on capillaries, about 6 s on kerr_beam_384 #347

Open

Description

@jtravs

What happens

A complete run spends a fixed time outside its steps, on metadata, provenance, output and plane observation, the same for either integrator:

Nobody has profiled the rest. SEP 39 left it out of scope.

Why it matters

Scans of many short runs pay it on every point, and a benchmark window can be dominated by it, as complete-run gains exceed the windows' on the A40. It does not matter for a single long simulation.

Context

Read, not run.

To do

  • Profile a complete he_rdw_averaged, radial_filament_256 and kerr_beam_384 run outside the steps, separating construction, metadata, provenance, hash, file set-up and the first plane.
  • Remove what is not needed per run, and defer what is needed only if a file is written.
  • Find what makes the hash cost 1.7 s on kerr_beam_384, whose configuration should not grow with the field.

The hash's value must stay stable, and the record must not lose a field a reader needs.

Done when

The breakdown is recorded in benchmarks.md. On 2x Xeon Gold 6240, one run's fixed cost at most halves for he_rdw_averaged and kerr_beam_384, or each remaining item is named with why it stays.


Checked against commit 8a9f764. Takes over the roadmap's entry "The fixed host cost of a run."

Activity

  1. added
    performanceSlower or larger than it should be, with no wrong result
    area: backendsAcross backends, and numba_cpu
    area: outputOutput files, processing and plotting
    on Nov 1, 2026
  2. jtravs commented on Nov 4, 2026

    @jtravs
    ContributorAuthor

    Part of the fixed cost, on an Intel Xeon Gold 6240, 8 threads, free-space 768² x 512 bins, #497's branch:

    Step s How often
    Simulation.from_free with a SpatialPulse 78 Per build, and per point if a runner is given a pulse rather than an array
    First translate() 12.2 Once per configuration; cached after that
    configuration_hash() 4.9 Per run, so per runner point (#309)

    The first is almost all pulses.build: at 256² it's 7.7 s of 7.8 s, more than half of it in spatial.admittance, called 32 times. It scales with the transverse nodes (128²: 2.0 s; 256²: 7.2 s; 512²: 28 s). A delay scan passing a formed array doesn't pay it per point, but one passing a pulse does.

  3. jtravs commented on Nov 5, 2026

    @jtravs
    ContributorAuthor

    Where #520 leaves this, at 768 x 768 x 600:

    Before, Intel Xeon Gold 6240 Now, the same NVIDIA H200's host AMD Instinct MI325X's host
    Simulation.from_free with a SpatialPulse 169 s, 179 s 14.9 s 5.31 s 3.41 s
    First translate() 28 s to 30 s 7.2 s to 7.8 s 3.70 s 1.63 s

    The launch builds in threads and forms its admittance once. A replaced input's finiteness pass also runs on threads now, 0.72 s to 0.05 s on the H200's host, and a Local scan on a device keeps its backend between input-only points (#298). So the items here are much smaller, but I haven't profiled the rest of a run's fixed cost as this issue asks, so it stays open. configuration_hash is #309's.

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

    area: backendsAcross backends, and numba_cpuarea: outputOutput files, processing and plottingperformanceSlower or larger than it should be, with no wrong resultpriority: lowWorth doing, no hurry

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions