OpenMS
Loading...
Searching...
No Matches
OpenSwathWorkflowScheduler.h File Reference
#include <OpenMS/CONCEPT/Types.h>
#include <OpenMS/OPENSWATHALGO/DATAACCESS/SwathMap.h>
#include <condition_variable>
#include <mutex>
#include <vector>
Include dependency graph for OpenSwathWorkflowScheduler.h:

Go to the source code of this file.

Classes

class  OpenSwathWorkflowScheduler
 Plans memory-bounded OpenSwathWorkflow work waves and exposes a small concurrency-limiter pair. More...
 
struct  OpenSwathWorkflowScheduler::Options
 Memory and concurrency knobs used by wave planning and batch sizing. More...
 
struct  OpenSwathWorkflowScheduler::ConcurrencyEstimate
 Derived scheduler limits computed by estimateConcurrency for one extraction/scoring run. More...
 
struct  OpenSwathWorkflowScheduler::Wave
 A wave: a group of SWATH indices (into the original swath_maps vector) that may be resident at the same time. Populated by planWaves. More...
 
class  OpenSwathWorkflowScheduler::ConcurrencyLimiter
 Counting semaphore for paths that still stream one SWATH per worker. More...
 
class  OpenSwathWorkflowScheduler::ScopedSlot
 RAII slot guard for ConcurrencyLimiter — acquires on construction, releases on destruction. More...
 

Namespaces

namespace  OpenMS
 Main OpenMS namespace.
 

Class Documentation

◆ OpenMS::OpenSwathWorkflowScheduler::Options

struct OpenMS::OpenSwathWorkflowScheduler::Options

Memory and concurrency knobs used by wave planning and batch sizing.

Default values target a multi-gigabyte memory budget on a typical OpenSwath workflow. All quantities are byte counts unless otherwise noted.

Collaboration diagram for OpenSwathWorkflowScheduler::Options:
[legend]
Class Members
Size avg_transitions_per_swath = 0 Average number of chromatograms extracted per non-MS1 SWATH. 0 disables transition-density accounting (the extra term is dropped from the per-SWATH byte estimate).
UInt64 bytes_per_chromatogram_point = 64ULL Estimated bytes retained per extracted chromatogram point. Default 64.
UInt64 bytes_per_spectrum = 600ULL * 1024ULL Estimated memory contribution of one cached spectrum. Default 600 KiB.
int max_concurrent_swaths = -1 User override for concurrent SWATHs. Values > 0 cap the auto-estimate; <= 0 enables memory-based planning constrained only by scoring_threads.
Size max_inner_batch_size = 10000 Largest scoring batch size that may be picked automatically by chooseInnerBatchSize. Default 10000.
double memory_usage_fraction = 0.90 Fraction of the remaining free memory the scheduler may reserve. Internally clamped to [0.05, 0.95] by estimateAvailableMemoryForScoring. Default 0.90.
Size min_inner_batch_size = 2000 Smallest scoring batch size that may be picked automatically by chooseInnerBatchSize. Default 2000.
UInt64 osw_buffer_bytes = 2ULL * 1024ULL * 1024ULL * 1024ULL OSW writer memory reserved outside the scheduler's budget. Default 2 GiB.
UInt64 per_swath_overhead_bytes = 100ULL * 1024ULL * 1024ULL Fixed estimated overhead per loaded SWATH. Default 100 MiB.
Size scoring_threads = 1 Number of scoring worker threads available. When max_concurrent_swaths is <= 0, the auto SWATH concurrency will not exceed this.
Size target_jobs_per_thread = 3 Target number of queued scoring jobs per worker thread for the chooseInnerBatchSize heuristic. Default 3.

◆ OpenMS::OpenSwathWorkflowScheduler::ConcurrencyEstimate

struct OpenMS::OpenSwathWorkflowScheduler::ConcurrencyEstimate

Derived scheduler limits computed by estimateConcurrency for one extraction/scoring run.

Collaboration diagram for OpenSwathWorkflowScheduler::ConcurrencyEstimate:
[legend]
Class Members
Size avg_spectra_per_swath = 0 Mean spectra per non-MS1 SWATH (integer division across non_ms1_swath_count).
UInt64 estimated_bytes_per_swath = 0 Predicted memory contribution of one non-MS1 SWATH based on the Options model.
Size max_concurrent_swaths = 1 Final cap on simultaneously-resident non-MS1 SWATH maps. Always at least 1.
UInt64 memory_budget_bytes = 0 Memory budget returned by estimateAvailableMemoryForScoring; 0 if the budget could not be determined (treated as unbounded by planWaves).
Size non_ms1_swath_count = 0 Number of non-MS1 SWATH maps with a non-null data pointer found in the input vector.

◆ OpenMS::OpenSwathWorkflowScheduler::Wave

struct OpenMS::OpenSwathWorkflowScheduler::Wave

A wave: a group of SWATH indices (into the original swath_maps vector) that may be resident at the same time. Populated by planWaves.

Collaboration diagram for OpenSwathWorkflowScheduler::Wave:
[legend]
Class Members
UInt64 estimated_bytes = 0 Sum of the per-SWATH byte estimates (derived from Options) for the indices above.
vector< Size > swath_indices Indices into the original swath_maps vector. Always non-MS1.