# GrainCollectionOptions Properties

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.runtime/orleans.configuration.graincollectionoptions/)

## ActivationTimeout {#activationtimeout-95d88645}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.runtime/orleans.configuration.graincollectionoptions/properties/activationtimeout-95d88645/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Runtime/Configuration/Options/GrainCollectionOptions.cs)

```csharp
public TimeSpan ActivationTimeout
```

Timeout value before giving up when trying to activate a grain.

## ClassSpecificCollectionAge {#classspecificcollectionage-f6636002}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.runtime/orleans.configuration.graincollectionoptions/properties/classspecificcollectionage-f6636002/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Runtime/Configuration/Options/GrainCollectionOptions.cs)

```csharp
public Dictionary<string, TimeSpan> ClassSpecificCollectionAge
```

Period of inactivity necessary for a grain to be available for collection and deactivation by grain type.

## CollectionAge {#collectionage-2fe61f1d}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.runtime/orleans.configuration.graincollectionoptions/properties/collectionage-2fe61f1d/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Runtime/Configuration/Options/GrainCollectionOptions.cs)

```csharp
public TimeSpan CollectionAge
```

Gets or sets the default period of inactivity necessary for a grain to be available for collection and deactivation.

## CollectionQuantum {#collectionquantum-2d464737}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.runtime/orleans.configuration.graincollectionoptions/properties/collectionquantum-2d464737/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Runtime/Configuration/Options/GrainCollectionOptions.cs)

```csharp
public TimeSpan CollectionQuantum
```

Regulates the periodic collection of inactive grains.

## DeactivationTimeout {#deactivationtimeout-0ea75250}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.runtime/orleans.configuration.graincollectionoptions/properties/deactivationtimeout-0ea75250/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Runtime/Configuration/Options/GrainCollectionOptions.cs)

```csharp
public TimeSpan DeactivationTimeout
```

Timeout value before giving up when trying to deactivate a grain activation (waiting for all timers to stop and calling Grain.OnDeactivate())

## EnableActivationSheddingOnMemoryPressure {#enableactivationsheddingonmemorypressure-6623cbcf}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.runtime/orleans.configuration.graincollectionoptions/properties/enableactivationsheddingonmemorypressure-6623cbcf/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Runtime/Configuration/Options/GrainCollectionOptions.cs)

```csharp
public bool EnableActivationSheddingOnMemoryPressure
```

Indicates if memory pressure should trigger grain activation shedding.

## MemoryUsageLimitPercentage {#memoryusagelimitpercentage-84f21ecb}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.runtime/orleans.configuration.graincollectionoptions/properties/memoryusagelimitpercentage-84f21ecb/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Runtime/Configuration/Options/GrainCollectionOptions.cs)

```csharp
public double MemoryUsageLimitPercentage
```

The memory usage percentage (0–100) at which grain collection is triggered. Must be greater than 0 and less than or equal to 100.

## MemoryUsagePollingPeriod {#memoryusagepollingperiod-da652f8a}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.runtime/orleans.configuration.graincollectionoptions/properties/memoryusagepollingperiod-da652f8a/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Runtime/Configuration/Options/GrainCollectionOptions.cs)

```csharp
public TimeSpan MemoryUsagePollingPeriod
```

The interval at which memory usage is polled.

## MemoryUsageTargetPercentage {#memoryusagetargetpercentage-8e1673a9}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.runtime/orleans.configuration.graincollectionoptions/properties/memoryusagetargetpercentage-8e1673a9/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Runtime/Configuration/Options/GrainCollectionOptions.cs)

```csharp
public double MemoryUsageTargetPercentage
```

The target memory usage percentage (0–100) to reach after grain collection. Must be greater than 0, less than or equal to 100, and less than [GrainCollectionOptions](/orleans/docs/api/csharp/microsoft.orleans.runtime/orleans.configuration.graincollectionoptions/).
