Process Memory Management

This chapter describes memory management processes.

Process memory management refers to the efficient allocation and isolation of memory for individual processes within the modular operating system. Each process runs in its own protected memory space to ensure stability and prevent interference.

Dynamic memory allocation leverages segments like code, data, stack, heap, and shared memory for process execution.

Table 1. Feature History Table

Feature Name

Release

Description

Core dump folder limit

Cisco IOS-XR Release 26.1.1

You can now set disk storage limits to 20% to prevent excessive core dumps, and a new folder limit retains up to 20 coreinfo files. The system automatically cleans up every 15 minutes, ensuring efficient use of disk space and preserving resources for critical operations. This process provides better disk management and enhanced system reliability with configurable storage limits and automated cleanup.

CLI:

  • The command exception disk-usage-limit is introduced.

YANG data model:

  • Cisco-IOS-XR-sysadmin-dumper.yang

Core dump folders

A core dump folder is a directory in the Cisco IOS XR file system that

  • stores diagnostic files, known as core dumps, which capture the state of the system's memory during a crash or failure,

  • is typically located at /misc/disk1/coredumps, and

  • provides critical information for troubleshooting and debugging system issues.

To manage storage and maintain system reliability, Cisco IOS XR introduces several mechanisms related to core dump folder limits:

  • Configurable storage limits: Administrators can set disk storage limits to 20% of total disk space for core dumps, helping prevent the folder from consuming excessive space during repeated crash scenarios.

  • Maximum retained files: The storage capacity of /misc/disk1 is 140GB, and 20% of the disk is configured for core dumps, which comes to roughly 28GB. This indicates that the disk usage limit (20%) is being enforced. When the limit is exceeded, older files, typically those ending with .core.txt are automatically deleted to free space, every 15 minutes.

  • Syslog alerts: The system generates syslog messages to notify administrators when storage limits are reached or when automatic cleanup actions occur. This optimizes disk usage and helps prevent data loss during continuous crash scenarios.

Before Release 26.1.1, the core dump folder lacked a storage limit for core dump files. This could result in the allocated hard disk space being filled during continuous crash scenarios, potentially preventing Cisco IOS XR from saving the latest core files and leading to data loss.

From Release 26.1.1 onward, these improvements allow you to effectively control core dump folder storage and preserve disk space for critical operations, by configuring

  • Throttling mechanism bypass: Use the exception filepath to redirect core files to another directory, utilizing new storage space.

  • Disk usage limit: Use the exception disk-usage-limit <usage limit percent> command to set the storage limit between 20% and 50% of the total hard disk space.

Example

If the number of coreinfo files exceeds 50, Cisco IOS XR deletes older files during its periodic cleanup. These syslog messages indicate this action:

RP/0/RP0/CPU0:Jan 20 20:15:02.014 UTC: dumper[69243]: %OS-SYSLOG-6-LOG_INFO : Coreinfo count is currently 52, deleting /misc/disk1/coredumps/sleep_11899.by.3.20250120-191744.xr-vm_node0_RP0_CPU0.34684.core.txt
RP/0/RP0/CPU0:Jan 20 20:15:02.056 UTC: dumper[69255]: %OS-SYSLOG-6-LOG_INFO : Coreinfo count is currently 51, deleting /misc/disk1/coredumps/sleep_13995.by.3.20250120-193249.xr-vm_node0_RP0_CPU0.34684.core.txt

Requirement: Maintain core dump folder disk space and usage thresholds

To ensure reliable system operation and preserve critical diagnostic data, follow these requirements for managing core dump folder storage:

  • Maintain at least 10% free disk space before saving host core dumps. If disk space drops below this threshold, the system stops saving core files and deletes any temporary files.

  • Prevent the core dump folder from exceeding the configured disk usage limit. f the folder is over this limit and a recent core file exists within 10 minutes of a new crash, the system stops saving the new core dump and deletes any incoming files.

  • Regularly monitor disk space and core dump usage to avoid unexpected data loss and ensure proper incident investigation.

Failure to observe these requirements may result in the loss of core dumps necessary for troubleshooting and analysis.

How core dump folder limit works

Summary

Cisco IOS XR Software controls the core dump folder storage by monitoring disk usage and enforcing configured limits to ensure the system does not run out of disk space.

The key components that are involved in core dump folder limit are:

  • Cisco IOS XR Software: Monitors disk usage and performs actions.

  • Core dump folder: Stores the core files created during system crashes.

Workflow

After you enable the disk usage limit with the exception disk-usage-limit <usage limit percent> command, IOS XR software controls the core dump folder storage under various disk storage scenarios:

  1. Cisco IOS XR software continuously monitors the disk usage of the core dump folder against the configured limit.
  2. If the core dump folder storage size exceeds the configured disk usage limit, Cisco IOS XR software performs a set of actions.

    When…

    And...

    Then Cisco IOS XR software…

    And displays these syslog message…

    the core dump folder storage size exceeds the configured disk usage limit value and

    if the latest core file in the hard disk is more than 10 minutes older than the current crash time

    deletes the older core files starting from oldest to newest until the core dump folder storage value is below the the default or configured disk usage limit value.

    RP/0/RP0/CPU0:Jan 21 10:19:36.119 UTC: dumper[67458]: %OS-SYSLOG-3-LOG_ERR : sleep_14157 signature 4f24a3679e430a4a68d6096785d26548 
    RP/0/RSP0/CPU0:Jan 21 10:19:36.251 UTC: dumper[399]: %OS-COREHELPER-6-DELETE_STALE_CORE : Deleting /misc/disk1/coredumps/
    sleep_10432.by.3.20250121-100007
    .xr-vm_node0_RSP0_CPU0.34684.core.lz4
    on active RP for reason: Freeing up old core in
    /misc/disk1/coredumps, attempting to copy new core file

    the core dump folder storage size exceeds the configured disk usage limit value and

    if the latest core file in the hard disk is within 10 minutes than the current crash time

    will stop saving the core files and delete any incoming core files.

    RP/0/RP0/CPU0:/misc/disk1/coredumps]
    $RP/0/RSP0/CPU0:
    Jan 24 10:23:53.921 UTC: dumper[175]:
    %OS -COREHELPER-2-ABORT_COPY :
    Copy of sleep_19617.by.3.
    20250124-102353.xr-vm_node
    0_RSP0_CPU0.34684.core.lz4 to 0/RSP0/CPU0:/misc/disk1/
    coredumps stoped for reason: Dumper disk usage exceeds 20% threshold of /misc/disk1. Potential /misc/disk1/coredumps usage with new core: 100.0%, seconds since last core: 36.0s. Deleting core from /misc/scratch/core.

    the hard disk is filled more than 90 percent of the total hard disk space

    -

    will stop saving the core files and delete any incoming core files as it can't delete any old core files.

    RP/0/RP0/CPU0:Mar 25 04:25:06.252 UTC: dumper[329]: %OS -COREHELPER-2-ABORT_COPY :
    Copy of sleep_30731.by.3.20380325-042505.
    xr-vm_node0_RSP0_CPU0.34684.core.lz4 to
    0/RSP0/CPU0:/misc/disk1/coredumps
    stoped for reason: Not enough available space in /misc/disk1 (less than 10%). Current /misc/disk1 bytes in use: 23590813696B, size of core file: 1471276B. Deleting core from /misc/scratch/core.

Result

Cisco IOS XR ensures that core dump storage remains within configured limits, prevents disk space exhaustion, and logs actions so operators can respond if necessary.

Configure core dump folder limit

Use this procedure to limit the storage usage of the core dump folder. This prevents excessive accumulation of core dumps and ensures optimal disk space management and system reliability.

Procedure


Step 1

Set the core dump folder storage limit. This prevents excessive core dumps on the hard disk.

Example:

RP/0/RP0/CPU0# configuration
RP/0/RP0/CPU0(config)# exception disk-usage-limit 29
RP/0/RP0/CPU0(config)# commit

You can configure the core dump folder storage limit to range to 20% of the total hard disk space.

Step 2

Run show exception command to view the set core dump folder storage limit.

Example:

This example displays the core dump folder storage limit set to 20 percent of the total hard disk space.
RP/0/RP0/CPU0# show exception
 Exception path for choice 1 is not configured or removed 
 Exception path for choice 2 is not configured or removed 
 Exception path for choice 3 is not configured or removed 
 Default fallback/copy path = /misc/disk1/coredumps
 Core dump usage on disk limited to 20%

The system enforces the specified storage limit for the core dump folder, ensuring disk space is optimally managed and preventing excess core dump accumulation.