« Identifying file associated with a bad sector on ext2/ext3/ext4 | Encrypting and decrypting PDFs using QPDF » |
Disabling kdump to reclaim missing RAM on CentOS 8
Saturday, January 25, 2020
After setting up a Droplet on DigitalOcean (a VPS) using their CentOS 8 image, I found that various sources (like top
, free
, and even /proc/meminfo
) were reporting only 821 MB of total RAM, even though the instance should have had 1 GB. Where did the missing ~200 MB go?
It turns out that kdump is enabled by default. In short, it uses a second kernel to capture dumps in case the running kernel crashes. I don't need this since I'm not going to do anything useful with those dumps anyway, so here's how to disable it and get the memory back.
First, check to see if it's enabled by looking for a nonzero value in /sys/kernel/kexec_crash_size
:
$ cat /sys/kernel/kexec_crash_size
You'll also see a line like this in dmesg
:
kernel: Reserving 160MB of memory at 672MB for crashkernel (System RAM: 1023MB)
To disable it, edit /etc/default/grub
and change crashkernel=auto
to crashkernel=no
, then:
# grub2-mkconfig -o /boot/grub2/grub.cfg # systemctl disable kdump # reboot
Now you should have your memory back!
Comments
QBUwAZMbqEzmLol on Wednesday, March 15, 2023 at 14:15
bekzHJUsXgK
YZQejrvkxfng on Wednesday, March 15, 2023 at 14:15
PvYAaSTDFBcC
nFLZzeICSYbagQ on Wednesday, March 15, 2023 at 14:15
pnjhmZyXAvUMQ
pAyYuPzd on Wednesday, March 15, 2023 at 14:15
JCEMcKtSFgdH
YXQvMhAgpysRbniT on Monday, March 20, 2023 at 15:40
fzFbZjkcWiGv
oFpsILdfUjakJy on Monday, March 20, 2023 at 15:40
PTjoHeLtFIYWfx
ktPpLozTwifln on Monday, March 20, 2023 at 15:40
gHoOsUDvL
KhwrugXRATviUDsI on Monday, March 20, 2023 at 15:40
ROZVIYASELbBwdqp
Rick on Saturday, June 13, 2020 at 14:36
Thanks for the info - made short work of figuring this out!