---
title: "Netprobe Memory Protection Settings"
description: ""
url: "https://docs.itrsgroup.com/docs/geneos/7.11.0/collection/netprobe/configuration/netprobe-memory-protection-settings/index.html"
---
## Overview

The Netprobe has memory protection settings that manage its memory resource. Memory protection serves to limit the impact of the Netprobe to the system it is monitoring. Too much memory can cause processes to fail and the system to become unstable. In addition, the Netprobe itself may stop functioning or spontaneously restart.

The checks, variables, and mechanisms mentioned in this guide enable the Netprobe to monitor its own memory in a systematic way, alert the administrator, and protect other components from complications.

The memory discussed in this guide is the Netprobe virtual memory.  


## Memory checks

The Netprobe has two memory checks:

### Maximum memory limit check

The Netprobe checks if its memory has reached a specified maximum limit. If it has, then the Netprobe restarts.

This memory limit is defined by `MAX_MEM_SIZE`, in megabytes (MB).

The default value for `MAX_MEM_SIZE` is `0`. At this value, the Netprobe does not check if it reaches a certain memory limit.

This check is done every 30 seconds.

This is also applicable to Fix Analyser 2 Netprobe.

### Memory growth ratio check

The Netprobe checks if its memory has grown by a specified ratio. If the Netprobe's starting memory has multiplied by the specified ratio, then it restarts.

By default, the Netprobe checks the memory growth ratio, with the default ratio set to 2. This means that if the memory has doubled, then the Netprobe restarts. For Fix Analyser 2 Netprobe, it is disabled by default.

To enable or disable this check, set `DISABLE_MEM_PROTECTION` to false or true. To increase the ratio, set `MEM_PROTECTION_RATIO` between `2` to `5`.

Check is done every 10 minutes after a Netprobe starts or restarts.

#### Initial memory

The `MEM_PROTECTION_RATIO` setting relies on an initial memory as a baseline. For the Netprobe, this initial memory is captured in the following scenarios:

- When the Netprobe starts or restarts.
- When a sampler configuration is changed.

After the initial memory is recorded, the Netprobe commences its [Memory checks](#memory-checks).

## MEM\_UTIL module

The `MEM_UTIL` module can help you pinpoint the exact timestamp for when a Netprobe records its initial memory.

When you set the `MEM_UTIL` as a debug option on a probe, the following lines appear on the log:

```
<Thu Mar 14 14:51:09>  INFO: MEM_UTIL INFO: Netprobe initial utilisation 20090880 KB
<Thu Mar 14 14:51:19>  INFO: MEM_UTIL INFO: Netprobe mem utilisation 20090880 B from 20090880 B
```

The first line indicates that the initial memory has been calculated.

The second line indicates that the memory growth has been checked.

## Memory protection variables

The Netprobe has memory protection variables that govern its memory checks. These variables can be updated on the Netprobe accordingly:

- On Windows platforms, these variables are set in the registry.
- On non-Windows platforms, these variables are set as environment variables in the shell from which the Netprobe is launched.

For general information on Netprobe variables, see [Netprobe variables](https://docs.itrsgroup.com/docs/geneos/7.11.0/collection/netprobe/configuration/netprobe-variables/index.html#variables).


**Warning**

  
Do not change these variables in a live environment without first consulting with ITRS Client Services. Inappropriate values can adversely impact the operation of your system. 



To know more about the variables that you can set in Netprobe, see [Netprobe variables](https://docs.itrsgroup.com/docs/geneos/7.11.0/collection/netprobe/configuration/netprobe-variables/index.html).

<div class="table-container">
<table class="legacy-table" style="width: 100%; mc-table-style: url('../../../Resources/TableStyles/ref_3_col_table.css'); margin-left: 0; margin-right: auto;" class="TableStyle-ref_3_col_table" cellspacing="0">
                    <col class="TableStyle-ref_3_col_table-Column-Column1"/>
                    <col class="TableStyle-ref_3_col_table-Column-Column1"/>
                    <col class="TableStyle-ref_3_col_table-Column-Column1"/>
                    <thead>
                        <tr class="TableStyle-ref_3_col_table-Head-Header1">
                            <th class="TableStyle-ref_3_col_table-HeadE-Column1-Header1">Variable</th>
                            <th class="TableStyle-ref_3_col_table-HeadE-Column1-Header1">Default value</th>
                            <th class="TableStyle-ref_3_col_table-HeadD-Column1-Header1">Description</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr class="TableStyle-ref_3_col_table-Body-Body1">
                            <td class="TableStyle-ref_3_col_table-BodyE-Column1-Body1"><code>MAX_MEM_SIZE</code>
                            </td>
                            <td class="TableStyle-ref_3_col_table-BodyE-Column1-Body1"><code>0</code>
                            </td>
                            <td class="TableStyle-ref_3_col_table-BodyD-Column1-Body1">
                                <p>Limits the Netprobe to a memory equal to the <code>MAX_MEM_SIZE</code>.</p>
                                <p>For example, if <code>MAX_MEM_SIZE</code> is 500 MiB, then the Netprobe restarts when its memory reaches 500 MiB.</p>
                                <p>By default, the Netprobe does not check if it reaches a certain memory limit.</p>
                                <p>Check is done every 30 seconds.</p>
                                <p>Unit: mebibytes (MiB)</p>
                                <p>Maximum allowable value: 1024 MiB
                                </p>
                            </td>
                        </tr>
                        <tr class="TableStyle-ref_3_col_table-Body-Body1">
                            <td class="TableStyle-ref_3_col_table-BodyE-Column1-Body1"><code>MEM_PROTECTION_RATIO</code>
                            </td>
                            <td class="TableStyle-ref_3_col_table-BodyE-Column1-Body1"><code>2</code>
                            </td>
                            <td class="TableStyle-ref_3_col_table-BodyD-Column1-Body1">
                                <p>Limits the Netprobe to a memory equal to its starting memory multiplied by the <code>MEM_PROTECTION_RATIO</code>.</p>
                                <p>Check is done every 10 minutes after a Netprobe starts or restarts.</p>
                                <p>For example, if the Netprobe starts with 50 MiB of memory and the <code>MEM_PROTECTION_RATIO</code> is 3, then the Netprobe restarts when its memory reaches 150 MiB.</p>
                                <p>Allowable range: <code>2 - 5</code></p>
                            </td>
                        </tr>
                        <tr class="TableStyle-ref_3_col_table-Body-Body1">
                            <td class="TableStyle-ref_3_col_table-BodyE-Column1-Body1"><code>DISABLE_MEM_PROTECTION</code>
                            </td>
                            <td class="TableStyle-ref_3_col_table-BodyE-Column1-Body1"><code>false</code>
                            </td>
                            <td class="TableStyle-ref_3_col_table-BodyD-Column1-Body1">If set to true, stops the Netprobe from restarting due to the limits imposed by <code>MEM_PROTECTION_RATIO</code>.</td>
                        </tr>
                        <tr class="TableStyle-ref_3_col_table-Body-Body1">
                        </tr>
                    </tbody>
                </table>
                
</div>

## Example scenarios

The following table shows different scenarios and how the Netprobe behaves based on its memory protection settings.

All scenarios assume a default `MEM_PROTECTION_RATIO` of `2`. `MAX_MEM_SIZE` examples values are given to show the behaviour at default, when set at a positive value, and when not set.

<div class="table-container">
<table class="legacy-table" style="width: 100%; mc-table-style: url('../../../Resources/TableStyles/ref_6_col_table.css'); margin-left: 0; margin-right: auto;" class="TableStyle-ref_6_col_table" cellspacing="0">
                    <col class="TableStyle-ref_6_col_table-Column-Column1"/>
                    <col class="TableStyle-ref_6_col_table-Column-Column1"/>
                    <col class="TableStyle-ref_6_col_table-Column-Column1"/>
                    <col class="TableStyle-ref_6_col_table-Column-Column1"/>
                    <thead>
                        <tr class="TableStyle-ref_6_col_table-Head-Header1">
                            <th class="TableStyle-ref_6_col_table-HeadE-Column1-Header1">Scenario</th>
                            <th class="TableStyle-ref_6_col_table-HeadE-Column1-Header1">DISABLE_MEMORY_PROTECTION</th>
                            <th class="TableStyle-ref_6_col_table-HeadE-Column1-Header1">MAX_MEM_SIZE</th>
                            <th class="TableStyle-ref_6_col_table-HeadD-Column1-Header1">Behaviour</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr class="TableStyle-ref_6_col_table-Body-Body1">
                            <td class="TableStyle-ref_6_col_table-BodyE-Column1-Body1">
                                <p>Netprobe is started.</p>
                                <p>Memory usage is less than <code>MAX_MEM_SIZE</code>.</p>
                                <p>Memory usage becomes twice or more than the initial memory usage.</p>
                            </td>
                            <td class="TableStyle-ref_6_col_table-BodyE-Column1-Body1"><code>true</code>
                            </td>
                            <td class="TableStyle-ref_6_col_table-BodyE-Column1-Body1"><code>1000</code>
                            </td>
                            <td class="TableStyle-ref_6_col_table-BodyD-Column1-Body1">Netprobe does not restart.</td>
                        </tr>
                        <tr class="TableStyle-ref_6_col_table-Body-Body1">
                            <td class="TableStyle-ref_6_col_table-BodyE-Column1-Body1">
                                <p>Netprobe is started.</p>
                                <p>Memory usage is less than <code>MAX_MEM_SIZE</code>.</p>
                                <p>Memory usage becomes twice or more than the initial memory usage.</p>
                            </td>
                            <td class="TableStyle-ref_6_col_table-BodyE-Column1-Body1"><code>false</code>
                            </td>
                            <td class="TableStyle-ref_6_col_table-BodyE-Column1-Body1"><code>1000</code>
                            </td>
                            <td class="TableStyle-ref_6_col_table-BodyD-Column1-Body1">Netprobe restarts.</td>
                        </tr>
                        <tr class="TableStyle-ref_6_col_table-Body-Body1">
                            <td class="TableStyle-ref_6_col_table-BodyE-Column1-Body1">
                                <p>Netprobe is started.</p>
                                <p>Memory usage is less than <code>MAX_MEM_SIZE</code>.</p>
                                <p>Memory usage becomes twice or more than the initial memory usage.</p>
                            </td>
                            <td class="TableStyle-ref_6_col_table-BodyE-Column1-Body1">Not set</td>
                            <td class="TableStyle-ref_6_col_table-BodyE-Column1-Body1"><code>1000</code>
                            </td>
                            <td class="TableStyle-ref_6_col_table-BodyD-Column1-Body1">Netprobe restarts.</td>
                        </tr>
                        <tr class="TableStyle-ref_6_col_table-Body-Body1">
                            <td class="TableStyle-ref_6_col_table-BodyE-Column1-Body1">
                                <p>Netprobe is started.</p>
                                <p>Memory usage is greater than <code>MAX_MEM_SIZE</code>.</p>
                            </td>
                            <td class="TableStyle-ref_6_col_table-BodyE-Column1-Body1"><code>true</code>
                            </td>
                            <td class="TableStyle-ref_6_col_table-BodyE-Column1-Body1"><code>1000</code>
                            </td>
                            <td class="TableStyle-ref_6_col_table-BodyD-Column1-Body1">Netprobe restarts.</td>
                        </tr>
                        <tr class="TableStyle-ref_6_col_table-Body-Body1">
                            <td class="TableStyle-ref_6_col_table-BodyE-Column1-Body1">
                                <p>Netprobe is started.</p>
                                <p>Memory usage becomes twice or more than the initial memory usage.</p>
                            </td>
                            <td class="TableStyle-ref_6_col_table-BodyE-Column1-Body1"><code>true</code>
                            </td>
                            <td class="TableStyle-ref_6_col_table-BodyE-Column1-Body1"><code>0</code>
                            </td>
                            <td class="TableStyle-ref_6_col_table-BodyD-Column1-Body1">Netprobe does not restart.</td>
                        </tr>
                        <tr class="TableStyle-ref_6_col_table-Body-Body1">
                            <td class="TableStyle-ref_6_col_table-BodyE-Column1-Body1">
                                <p>Netprobe is started.</p>
                                <p>Memory usage becomes twice or more than the initial memory usage.</p>
                            </td>
                            <td class="TableStyle-ref_6_col_table-BodyE-Column1-Body1"><code>true</code>
                            </td>
                            <td class="TableStyle-ref_6_col_table-BodyE-Column1-Body1">Not set</td>
                            <td class="TableStyle-ref_6_col_table-BodyD-Column1-Body1">Netprobe does not restart.</td>
                        </tr>
                        <tr class="TableStyle-ref_6_col_table-Body-Body1">
                            <td class="TableStyle-ref_6_col_table-BodyB-Column1-Body1">
                                <p>Netprobe is started.</p>
                                <p>Memory usage becomes twice or more than the initial memory usage.</p>
                            </td>
                            <td class="TableStyle-ref_6_col_table-BodyB-Column1-Body1"><code>false</code>
                            </td>
                            <td class="TableStyle-ref_6_col_table-BodyB-Column1-Body1"><code>0</code>
                            </td>
                            <td class="TableStyle-ref_6_col_table-BodyA-Column1-Body1">Netprobe restarts.</td>
                        </tr>
                    </tbody>
                </table>
            
</div>

## Further reading

If you would like to set up memory debugging on the Netprobe, see [Netprobe Memory Debugging](https://docs.itrsgroup.com/docs/geneos/7.11.0/collection/troubleshooting/netprobe-memory-debugging/index.html).


