How to calculate SPU memory usage

How to calculate memory usage in SPU or PFE in dataplane from CLI output of ‘show security monitoring fpc X’.

  • To calculate memory in SPU or PFE in dataplane
  • To provide a guideline for understanding memory map in SPU and figure out what modules are using SPU memory

Memory utilization from CLI ‘show security monitoring fpc X’ is based on the output of ‘show memory’ and ‘show arena’ in PFE/SPU.

This formula is based on kernel and global data SHM memory:

Example of SRX-Branch (SRX210) running 12.1X44-D35, Memory Utilization of PFE is 57%:

Another example for SRX5600 with SPU in Slot 3. Memory Utilization is 66%:

The total available memory in SPU is divided into segments for buffers, platform queues, Heap, SHM (Shared Heap Manager), etc. when the SRX device boots up. In most cases, the memory for services grows either into the Heap or Services SHM segment. Other segments are platform/memory dependent; but tend to stay constant across releases.

The services segment is used to create two SHM blocks for control and data. The Control SHM is used by modules to allocate objects from the control thread and the Data SHM is used by modules to allocate from the real-time threads, in which packet processing occurs.

To display overall heap or data SHM usage, run the following from CLI:

 

About the author

James Palmer

Leave a Comment