Table of Contents

Class ConcurrentTransferOptions

Namespace
DotCompute.Memory.Types
Assembly
DotCompute.Memory.dll

Configuration options for concurrent memory transfer operations.

public class ConcurrentTransferOptions : TransferOptions
Inheritance
ConcurrentTransferOptions
Inherited Members

Remarks

This class extends TransferOptions with additional settings specific to concurrent transfers, including concurrency limits, load balancing strategies, and resource allocation policies.

Properties

AggregationThreshold

Gets or sets the aggregation threshold.

public long AggregationThreshold { get; set; }

Property Value

long

The minimum size in bytes below which transfers are aggregated. Default is 1MB.

BatchSize

Gets or sets the batch size for processing multiple transfers.

public int BatchSize { get; set; }

Property Value

int

The number of transfers to process in each batch. Default is 10.

Default

Gets concurrent transfer options optimized for high throughput.

public static ConcurrentTransferOptions Default { get; }

Property Value

ConcurrentTransferOptions

Options optimized for maximum aggregate throughput.

EnableAdaptiveChunkSizing

Gets or sets a value indicating whether to enable adaptive chunk sizing.

public bool EnableAdaptiveChunkSizing { get; set; }

Property Value

bool

True to adjust chunk sizes based on performance; otherwise, false.

EnableAggregation

Gets or sets a value indicating whether to enable transfer aggregation.

public bool EnableAggregation { get; set; }

Property Value

bool

True to combine small transfers for efficiency; otherwise, false.

EnableDynamicConcurrency

Gets or sets a value indicating whether to use dynamic concurrency adjustment.

public bool EnableDynamicConcurrency { get; set; }

Property Value

bool

True to automatically adjust concurrency based on system load; otherwise, false.

EnableMemoryPressureMonitoring

Gets or sets a value indicating whether to enable memory pressure monitoring.

public bool EnableMemoryPressureMonitoring { get; set; }

Property Value

bool

True to monitor and respond to memory pressure; otherwise, false.

EnableParallelCompression

Gets or sets a value indicating whether to enable parallel compression.

public bool EnableParallelCompression { get; set; }

Property Value

bool

True to compress data in parallel threads; otherwise, false.

EnablePipelining

Gets or sets a value indicating whether to enable transfer pipelining.

public bool EnablePipelining { get; set; }

Property Value

bool

True to pipeline transfers for better throughput; otherwise, false.

EnableWorkStealing

Gets or sets a value indicating whether to enable work stealing.

public bool EnableWorkStealing { get; set; }

Property Value

bool

True to allow idle workers to steal work from busy ones; otherwise, false.

FewLargeTransfers

Gets concurrent transfer options optimized for few large transfers.

public static ConcurrentTransferOptions FewLargeTransfers { get; }

Property Value

ConcurrentTransferOptions

Options optimized for handling a few large transfers.

LoadBalancing

Gets or sets the load balancing strategy.

public LoadBalancingStrategy LoadBalancing { get; set; }

Property Value

LoadBalancingStrategy

The strategy for distributing work across concurrent operations.

ManySmallTransfers

Gets concurrent transfer options optimized for many small transfers.

public static ConcurrentTransferOptions ManySmallTransfers { get; }

Property Value

ConcurrentTransferOptions

Options optimized for handling many small transfers efficiently.

MaxConcurrency

Gets or sets the maximum number of concurrent transfers.

public int MaxConcurrency { get; set; }

Property Value

int

The maximum concurrency level. Default is 2x the processor count.

MemoryPressureThreshold

Gets or sets the memory pressure threshold.

public double MemoryPressureThreshold { get; set; }

Property Value

double

The memory pressure level (0.0 to 1.0) at which to throttle transfers. Default is 0.85.

MinConcurrency

Gets or sets the minimum number of concurrent transfers to maintain.

public int MinConcurrency { get; set; }

Property Value

int

The minimum concurrency level. Default is 1.

PerTransferMemoryLimit

Gets or sets the per-transfer memory limit.

public long PerTransferMemoryLimit { get; set; }

Property Value

long

The maximum memory in bytes per individual transfer. Default is 256MB.

PipelineDepth

Gets or sets the pipeline depth when pipelining is enabled.

public int PipelineDepth { get; set; }

Property Value

int

The number of pipeline stages. Default is 3.

PreserveOrder

Gets or sets a value indicating whether to maintain transfer order.

public bool PreserveOrder { get; set; }

Property Value

bool

True to preserve the order of transfers; false for best performance.

SchedulingPolicy

Gets or sets the scheduling policy for concurrent transfers.

public SchedulingPolicy SchedulingPolicy { get; set; }

Property Value

SchedulingPolicy

The policy for scheduling transfer operations.

TotalMemoryLimit

Gets or sets the memory limit for all concurrent transfers.

public long TotalMemoryLimit { get; set; }

Property Value

long

The maximum total memory in bytes that can be used. Default is 1GB.

Methods

Clone()

Creates a copy of these concurrent transfer options.

public ConcurrentTransferOptions Clone()

Returns

ConcurrentTransferOptions

A new ConcurrentTransferOptions instance with the same values.