8.2 Memory Resiliency

Memory resiliency provides the capability to monitor Java heap space and garbage collection events. It checks for low memory situations based on heap usage and garbage collection data.

When it encounters a low memory situation, it triggers throttling of message processing in the Service Bus server by controlling the threads in the default work manager. This largely helps in avoiding out-of-memory exceptions in Service Bus. After throttling, the server is monitored for low memory and when the server is out of low memory, throttling is released gradually by bringing the default work manager to its original capacity.

Note:

In a Reference Configuration domain, the memory resiliency feature is enabled by default. You can disable the feature by deselecting the Memory Resiliency Enabled checkbox on the Global Settings tab of Service Bus in the Enterprise Manager console.

Limitations of Memory Resiliency

  • Memory resiliency does not guarantee no out-of-memory exceptions, but largely avoids the situation. Out-of-memory situations can happen under extreme high load where the memory resiliency feature does not receive events related to heap space and garbage collection.

  • Memory resiliency supports only ParallelGC garbage collection, which is the default garbage collection of Java 1.8.

  • The server returns to the original speed very slowly after it recovers from low memory.

  • The default payload restriction size is enabled in a Reference Configuration domain.

  • Memory resiliency throttles concurrent executions for the default work manager. Other processes can still put pressure on heap usage and can trigger out-of-memory situations.