# MemoryLoadSignal<!-- -->

Tracks memory usage via `SYSTEM_INFO` events and reports overload when the used-to-available memory ratio exceeds a threshold.

### Implements

* [LoadSignal](https://crawlee.dev/js/api/core/interface/LoadSignal.md)

## Index[**](#Index)

### Constructors

* [**constructor](#constructor)

### Properties

* [**name](#name)
* [**overloadedRatio](#overloadedRatio)

### Methods

* [**getMemorySnapshots](#getMemorySnapshots)
* [**getSample](#getSample)
* [**start](#start)
* [**stop](#stop)

## Constructors<!-- -->[**](#Constructors)

### [**](#constructor)[**](https://github.com/apify/crawlee/blob/8f2663aedfd2280ca35b9185b4e287f65a2ce969/packages/core/src/autoscaling/memory_load_signal.ts#L45)constructor

* ****new MemoryLoadSignal**(options): [MemoryLoadSignal](https://crawlee.dev/js/api/core/class/MemoryLoadSignal.md)

- #### Parameters

  * ##### options: [MemoryLoadSignalOptions](https://crawlee.dev/js/api/core/interface/MemoryLoadSignalOptions.md)

  #### Returns [MemoryLoadSignal](https://crawlee.dev/js/api/core/class/MemoryLoadSignal.md)

## Properties<!-- -->[**](#Properties)

### [**](#name)[**](https://github.com/apify/crawlee/blob/8f2663aedfd2280ca35b9185b4e287f65a2ce969/packages/core/src/autoscaling/memory_load_signal.ts#L33)readonlyname

**name: memInfo =

<!-- -->

'memInfo'

Implementation of LoadSignal.name

Human-readable name used in logging and `SystemInfo` keys.

### [**](#overloadedRatio)[**](https://github.com/apify/crawlee/blob/8f2663aedfd2280ca35b9185b4e287f65a2ce969/packages/core/src/autoscaling/memory_load_signal.ts#L34)readonlyoverloadedRatio

**overloadedRatio: number

Implementation of LoadSignal.overloadedRatio

Maximum ratio of overloaded snapshots in a sample before the signal is considered overloaded. For example, `0.2` means the signal fires when more than 20% of the sample window is overloaded.

## Methods<!-- -->[**](#Methods)

### [**](#getMemorySnapshots)[**](https://github.com/apify/crawlee/blob/8f2663aedfd2280ca35b9185b4e287f65a2ce969/packages/core/src/autoscaling/memory_load_signal.ts#L88)getMemorySnapshots

* ****getMemorySnapshots**(): [MemorySnapshot](https://crawlee.dev/js/api/core/interface/MemorySnapshot.md)\[]

- Returns typed memory snapshots for backward compatibility with `Snapshotter`.

  ***

  #### Returns [MemorySnapshot](https://crawlee.dev/js/api/core/interface/MemorySnapshot.md)\[]

### [**](#getSample)[**](https://github.com/apify/crawlee/blob/8f2663aedfd2280ca35b9185b4e287f65a2ce969/packages/core/src/autoscaling/memory_load_signal.ts#L81)getSample

* ****getSample**(sampleDurationMillis): [MemorySnapshot](https://crawlee.dev/js/api/core/interface/MemorySnapshot.md)\[]

- Implementation of LoadSignal.getSample

  Return snapshots for a recent time window (used for "current" status).

  ***

  #### Parameters

  * ##### optionalsampleDurationMillis: number

    How far back to look, in milliseconds.

  #### Returns [MemorySnapshot](https://crawlee.dev/js/api/core/interface/MemorySnapshot.md)\[]

### [**](#start)[**](https://github.com/apify/crawlee/blob/8f2663aedfd2280ca35b9185b4e287f65a2ce969/packages/core/src/autoscaling/memory_load_signal.ts#L55)start

* ****start**(): Promise\<void>

- Implementation of LoadSignal.start

  Start collecting snapshots. Called when the pool starts.

  ***

  #### Returns Promise\<void>

### [**](#stop)[**](https://github.com/apify/crawlee/blob/8f2663aedfd2280ca35b9185b4e287f65a2ce969/packages/core/src/autoscaling/memory_load_signal.ts#L77)stop

* ****stop**(): Promise\<void>

- Implementation of LoadSignal.stop

  Stop collecting snapshots. Called when the pool shuts down.

  ***

  #### Returns Promise\<void>
