Netprobe Memory Protection Settings

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.

Note: 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 mebibytes (MiB).

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.

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.

To disable this check, set DISABLE_MEM_PROTECTION to 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. This applies to some, but not all, samplers. In particular, some Java-based samplers recapture the initial memory after a change in configuration. See each plugin configuration for more details.

After the initial memory is recorded, the Netprobe commences its 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 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.

Variable Default value Description
MAX_MEM_SIZE 0

Limits the Netprobe to a memory equal to the MAX_MEM_SIZE.

For example, if MAX_MEM_SIZE is 500 MiB, then the Netprobe restarts when its memory reaches 500 MiB.

By default, the Netprobe does not check if it reaches a certain memory limit.

Check is done every 30 seconds.

Unit: mebibytes (MiB)

Maximum allowable value: 1024 MiB

MEM_PROTECTION_RATIO 2

Limits the Netprobe to a memory equal to its starting memory multiplied by the MEM_PROTECTION_RATIO.

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

For example, if the Netprobe starts with 50 MiB of memory and the MEM_PROTECTION_RATIO is 3, then the Netprobe restarts when its memory reaches 150 MiB.

Allowable range: 2 - 5

DISABLE_MEM_PROTECTION false If set to true, stops the Netprobe from restarting due to the limits imposed by MEM_PROTECTION_RATIO.
     

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.

Scenario DISABLE_MEMORY_PROTECTION MAX_MEM_SIZE Behaviour

Netprobe is started.

Memory usage is less than MAX_MEM_SIZE.

Memory usage becomes twice or more than the initial memory usage.

true 1000 Netprobe does not restart.

Netprobe is started.

Memory usage is less than MAX_MEM_SIZE.

Memory usage becomes twice or more than the initial memory usage.

false 1000 Netprobe restarts.

Netprobe is started.

Memory usage is less than MAX_MEM_SIZE.

Memory usage becomes twice or more than the initial memory usage.

Not set 1000 Netprobe restarts.

Netprobe is started.

Memory usage is greater than MAX_MEM_SIZE.

true 1000 Netprobe restarts.

Netprobe is started.

Memory usage becomes twice or more than the initial memory usage.

true 0 Netprobe does not restart.

Netprobe is started.

Memory usage becomes twice or more than the initial memory usage.

true Not set Netprobe does not restart.

Netprobe is started.

Memory usage becomes twice or more than the initial memory usage.

false 0 Netprobe restarts.

Further reading

If you would like to set up memory debugging on the Netprobe, see Netprobe Memory Debugging.