Memory Management

Only enable under certain conditions

To avoid unnecessary submission-processing delays, do not enable Memory Management unless:

In v35, you can use flows and models from v33 and v34, as well as 35. To address the memory-management issues that result from running flows from multiple versions, you can allocate a specific number of application machines for each of these versions. This article describes the ways in which you can do so.

Enabling and configuring Memory Management

The Memory Management feature can prevent out-of-memory errors in certain conditions.

When to enable Memory Management

By default, Memory Management is disabled, and tasks from all flows are distributed across all application machines in your instance. You should only enable Memory Management if:

  • you have live flows from multiple versions of Hyperscience (e.g., a live flow created in v34 and another created in v35), 

  • the number of application machines in your instance is equal to or greater than the number of versions your live flows originate from (e.g., if you have live flows created in v33, v34, and v35, you should have at least 3 application machines in your instance), AND

  • the status of your system’s memory is shown as "Unhealthy" on the System & Health page. In systems where Memory Management has not been enabled, this status is “Unhealthy” if the system’s memory usage is 95% or greater.

Enable and configure Memory Management

Follow these steps to set up Memory Management in your instance. 

1. Enable Memory Management.

  1. Go to Administration > System & Health, and in the Memory Management section, click Review how machines are assigned.

  2. Toggle the switch next to Memory management turned off.

2. Review the number of automatically assigned machines and make adjustments if needed. 

When you enable Memory Management, all machines are automatically assigned to groups of flows by default. The system attempts to assign an equal number of machines to each group of flows, but if the number of application machines in your instance makes that impossible, the system allocates additional machines to flows originating from older versions of Hyperscience.

Example

Assume your instance has 5 application machines and you have live flows that were created in v33, v34, and v35. 

If you choose to have the system automatically assign all the machines, the system allocates: 

  • 2 machines to v33 flows, 

  • 2 machines to v34 flows, 

  • and 1 machine to v35 flows.

If you would like to make changes to this allocation, you can manually assign machines to groups of flows. To do so, adjust the number in the machines text box to reduce the number of automatically assigned machines. The machine count under Manually Assigned Machines changes to reflect the number of machines that you can manually assign in the next step.

If you choose to manually assign some, but not all, of the machines, any machines that remain available for automatic assignment will be distributed as described in the beginning of the section. 

Example

Assume your instance has 5 application machines and you have live flows that were created in v33, v34, and v35. 

If you choose to have 4 automatically assigned machines and 1 manually assigned machine, the system will automatically assign:

  • 2 machines to v33 flows, 

  • 1 machine to v34 flows, and 

  • 1 machine to v35 flows.

You can choose to assign the manually assigned machine to any group, and the total number of machines assigned to that group will increase by 1.

When you have finished reviewing the number of automatically assigned machines, click Save and continue. You can change this number later, if necessary.

3. Manually assign machines to groups of flows, if needed.

If you chose to manually assign machines in the previous step, assign those machines to groups of flows. To do so, adjust the number in the machines text box for each group of flows you want to manually assign machines to. The Total Dedicated Machines count shows how many machines can still be manually assigned to groups of flows.

If you need to change the number of automatically and manually assigned machines, click Edit in the Step 1/2 section of the page.

When you are finished making changes, click Save at the top of the page.

4. Confirm machine assignments for each group of flows.

Review the number of manually and automatically assigned machines for each group of flows.

  • If no additional changes are needed, click Confirm. It may take up to 10 minutes for your changes to take effect and for the system to stabilize.

  • If additional changes are needed, click Back to Editing Machines to make adjustments.

Editing Memory Management settings

You should only change your Memory Management settings when necessary.

When to edit Memory Management settings

Submission-processing delays occur each time you save changes to your Memory Management settings, as it takes some time for the system to shut down and restart flow blocks. After you first configure Memory Management, you should only change its settings in the following circumstances:

  • The number of application machines in your instance changes.

  • The priority of your flows changes (e.g., the number of submissions being processed by a particular flow increases).

  • The number of live flows in your instance changes, and the number of versions your live flows originated from changes as a result (e.g., you disable a live flow that was created in v33, and you have no other live flows that were created in v33).

Edit Memory Management settings

  1. Go to Administration > System & Health, and under Memory Management, click Review how machines are assigned.

  2. Edit the number of automatically or manually assigned machines, or edit the number of machines that you have assigned to specific sets of flows.

  3. When you are finished making changes, click Save.

  4. Review your changes.

    • If no additional changes are needed, click Confirm. It may take up to 10 minutes for your changes to take effect and for the system to stabilize.

    • If additional changes are needed, click Back to Editing Machines to make adjustments.

Potential performance implications

When Memory Management is enabled, each set of flows runs only on certain machines. As a result, the maximum throughput for live flows is reduced. This reduction may or not be noticeable in your instance, depending on the volume of submissions being processed.

Troubleshooting your application machines

The application does not indicate which application machine has been allocated to which set of flows. Therefore, if you need to take a particular machine offline temporarily, you need to SSH into the machine and look at its processes to determine which flows will be affected.  

For more details, contact your Hyperscience representative.