Performance and Profiling Configuration

Runtime

YAML pathTypeDefaultAllowed valuesMeaning
runtime.print_thread_configBooltruetrue, falsePrint Julia/BLAS thread summary at startup (now including a parallel: enabled=... max_tasks=... line).
runtime.julia_threadsStringkeepkeep, default, off, auto, or integer-like stringJulia thread policy for runner setup. Requires process startup (--threads) or script re-exec.
runtime.blas_threadsStringkeepkeep, default, off, auto, or integer-like stringBLAS thread policy for runner setup and can be applied at runtime.
runtime.parallel.enabledBooltruetrue, falseMaster switch for in-process parallel execution of independent work items (island solves, short-circuit sweeps, contingency batches). false forces every parallel site onto the serial path (the same functions, not copies).
runtime.parallel.max_tasksStringautoauto or positive integer stringTask cap for parallel sites. auto resolves to Threads.nthreads(); the cap is applied via chunking, so it also bounds @threads sites.
runtime.parallel.min_work_itemsInt4integer >= 1Work lists shorter than this run serially (avoids task overhead on tiny cases).

With runtime.parallel.enabled: true and a single-threaded Julia process the parallel sites still run serially; the startup summary prints a once-per-process hint to start with julia --threads=auto.

Timing semantics under parallel execution: the per-phase timings in the performance profile (and performance.log) are CPU-time SUMS across all islands/workers, exactly as the serial loop accumulated them, so phase names and their meaning do not change between serial and parallel runs. The elapsed real time of a parallel fan-out is accounted separately under parallel_wall_time; on a parallel run it is smaller than the sum of the per-island phase times, and the ratio is the achieved speedup.

For examples/powerflow/matpower_import.jl, Julia thread priority is:

  1. CLI override: --julia-threads=<N|auto|keep>
  2. Environment override: SPARLECTRA_JULIA_THREADS
  3. YAML runtime.julia_threads
  4. keep current process setting

Example startup commands:

julia --threads=8 --project=. examples/powerflow/matpower_import.jl
julia --project=. examples/powerflow/matpower_import.jl --julia-threads=8
$env:JULIA_NUM_THREADS = "8"
julia --project=. examples/powerflow/matpower_import.jl

Output configuration

YAML pathTypeDefaultAllowed valuesMeaning
output.console_summaryBooltruetrue, falsePrint compact run summary to console.
output.console_auto_profileSymbol/Stringcompactoff, compact, fullMATPOWER auto-profile console detail.
output.console_diagnosticsSymbol/Stringcompactoff, compact, summary, fullDiagnostic detail on console.
output.console_q_limit_eventsSymbol/Stringsummaryoff, summary, fullQ-limit/PV→PQ event console detail.
output.console_max_rowsInt100non-negative integerMax rows in compact console tables.
output.logfile_resultsSymbol/Stringoffoff, compact, classic, fullSolved result table detail in logfile.
output.detailed_result_csv_write_modeSymbol/Stringautoauto, buffered, streamingDetailed CSV artifact write strategy; auto streams very large outputs.
output.detailed_result_csv_exporterSymbol/Stringautoauto, report, directDetailed CSV row-generation path; auto uses the direct streaming exporter for large bus counts.
output.detailed_result_csv_direct_threshold_busesInt10000positive integerBus-count threshold where auto switches detailed CSV export from report generation to direct streaming.
output.detailed_result_csv_buffer_initial_bytesInt8388608non-negative integerInitial size hint for buffered detailed CSV artifact writing.
output.detailed_result_csv_buffer_max_bytesInt67108864positive integerCheap estimated-size limit above which auto prefers streaming.
output.detailed_result_csv_streaming_threshold_rowsInt100000positive integerRow-count threshold above which auto prefers streaming.
output.logfile_diagnosticsSymbol/Stringcompactoff, compact, fullDiagnostic logfile detail.
output.logfile_performanceSymbol/Stringcompactoff, compact, fullPerformance profile logfile detail.
output.logfile_warningsSymbol/Stringtableoff, summary, table, fullWarning representation in logfile.

The Jacobian cond. line (estimate plus verdict) is always part of the classic result output since 0.9.7; the former output.condition_number option no longer exists, and a leftover condition_number key in an existing YAML file is ignored. See Solver.

For API and Web UI runs, classic writes the standard result output and a compact timing/status summary. full additionally writes a Full run details section with effective typed configuration, selected artifact options, and available status diagnostics. The summary reports solver_time, representative_time, iterations, final mismatch, and final outcome where available; benchmark median and samples appear only when benchmark mode is enabled.

Diagnostics configuration

YAML pathTypeDefaultAllowed valuesMeaningCost notes
diagnostics.log_effective_configBoolfalsetrue, falseLog merged effective configuration.true: low
diagnostics.console_summaryBooltruetrue, falseEmit compact run summary to console.true: low
diagnostics.console_auto_profileSymbol/Stringcompactoff, compact, fullAuto-profile detail on console.full: medium
diagnostics.console_diagnosticsSymbol/Stringcompactoff, compact, summary, fullSolver diagnostics detail on console.full: medium/high
diagnostics.console_q_limit_eventsSymbol/Stringsummaryoff, summary, fullPV→PQ event verbosity on console.full: medium
diagnostics.console_max_rowsInt100non-negative integerRow cap for console diagnostics tables.low
diagnostics.logfile_diagnosticsSymbol/Stringcompactoff, compact, fullDiagnostic logfile detail level.full: medium/high

Performance configuration

YAML pathTypeDefaultAllowed valuesMeaning
performance.enabledBooltruetrue, falseEnable performance instrumentation.
performance.levelSymbol/Stringiterationoff, summary, iteration, fullInstrumentation detail level.
performance.print_to_consoleBooltruetrue, falseEmit performance output to console.
performance.write_to_logfileBooltruetrue, falseEmit performance output to logfile.
performance.show_allocationsBoolfalsetrue, falseInclude allocation stats.
performance.show_iteration_tableBooltruetrue, falseShow iteration-level timing table.
performance.compact_loggingBooltruetrue, falseCompact performance logging format.
performance.skip_reference_comparisonBoolfalsetrue, falseSkip voltage/reference comparisons for speed.
performance.skip_expensive_diagnosticsBooltruetrue, falseSkip high-cost diagnostics.
performance.skip_branch_neighborhood_reportBooltruetrue, falseSkip branch neighborhood report.
performance.max_diagnostic_rowsInt25non-negative integerRow cap for diagnostics tables.

Benchmark configuration

The Web UI's performance_timing=off|compact|full option is separate from the benchmark configuration. It writes performance.log for phases of one service/API request, such as request parsing, case resolution, configuration, case loading/network construction/solve, postprocessing, artifact writing, and total time. full includes available internal profile entries. In contrast, benchmark.enabled performs repeated solves and reports representative and median timing. Tests assert phase names and artifact presence, not fragile time thresholds.

YAML pathTypeDefaultAllowed valuesMeaning
benchmark.enabledBooltruetrue, falseEnable benchmark mode.
benchmark.methodsVector{Symbol/String}[rectangular]rectangular (current PF core)Methods benchmarked.
benchmark.secondsFloat642.0positive realBenchmark max. time budget. This is not a minimum runtime, solver timeout, or iteration limit; a running sample is not interrupted.
benchmark.samplesInt50positive integerMax benchmark samples per method. The benchmark may finish earlier when this count is reached before the time budget, or collect fewer samples when the time budget is reached first.
benchmark.show_onceBoolfalsetrue, falseRun one full visible solve before timing loop.
benchmark.show_once_outputSymbol/Stringclassicclassic, dataframe, compactOutput format for show_once.
benchmark.show_once_max_nodesInt0non-negative integerRow cap for one-shot output.

Solver workspace and warmup keys

Performance-relevant keys that live outside the performance.* section proper:

KeyDefaultMeaning
power_flow.rectangular_workspace_reusetrueReuse the rectangular solver's workspace between solves of one session instead of reallocating.
power_flow.rectangular_preallocate_workspaceautoPreallocate the workspace up front (off, on, auto; auto decides by case size).
power_flow.rectangular_workspace_min_buses1000Case size from which auto preallocates.
performance.representative_warmup_runs0Untimed warmup solves before a timed representative run.
performance.compare_cold_warmfalseReport the cold (first) and warm (subsequent) timings side by side.