Kdump Memory Reservation

Kdump memory reservation is a feature in Linux that reserves part of system memory to capture and store kernel crash dumps when a kernel panic occurs. By reserving memory, Kdump always has enough space to collect and save critical information about the crash, even if the rest of the system runs out of memory.

Estimate the amount of memory to reserve for Kdump by running the following command:

sudo kdumpctl estimate

The output is similar to the following:

Reserved crashkernel:    448M
Recommended crashkernel: 448M

Kernel image size:   54M
Kernel modules size: 28M
Initramfs size:      39M
Runtime reservation: 64M
Large modules:
    xfs: 2584576
    bluetooth: 1122304
    i915: 4186112
    cfg80211: 1335296
    mac80211: 1507328
    kvm: 1400832

Memory reservations are made using the crashkernel kernel parameter. By default, crashkernel reserves space in low memory. Low memory is the area of memory used by certain devices when the system crashes. The size of this area varies depending on the device and system type. High memory is any remaining memory beyond this point.

The amount of memory required for the reservation can be specified in three different ways:
crashkernel=size

First, the kernel searches low memory for the requested amount of space. If this fails, it looks for this space in high memory. If the reservation in high memory succeeds, it then tries to reserve the default amount of space (128 MB in arm64 systems) in low memory.

crashkernel=size@offset

Reserves size memory at the specified offset, or fails if already occupied.

crashkernel=size,high crashkernel=size,low

Reserves memory from both high and low memory. The kernel first searches for the amount of memory required in high memory. If the reservation succeeds in high memory, the kernel then tries to reserve the amount of low memory specified in crashkernel=size,low. If the reservation from high memory fails, the kernel searches low memory for the amount of memory specified in crashkernel=size,high. Setting crashkernel=0,low disables low memory allocation.

Important:

Memory reservation in aarch64 systems.

Kdump reservation in low memory can cause issues in aarch64 systems. We recommend using the crashkernel=size,high crashkernel=size,low options to prefer reservations in high memory on aarch64 systems.