skip to content

Fixing Missing Memory on a Cloud Server

1 min read

This page was translated by AI

Last week, Tencent Cloud had a server promotion, so I bought a server with 2 CPU cores and 4 GB of memory. After starting it and installing the panel, however, I found that only 3.3 GB of memory was available.

So I ran:

Terminal window
free -h

It confirmed that only 3.3 GB was available, which left me puzzled.

After searching online, I found that Linux had reserved space for kdump. Here is the original article.

The solution is to disable kdump:

  1. Run:

    Terminal window
    sudo vim /etc/default/grub

    to edit the GRUB file.

  2. Find the lines starting with GRUB_CMDLINE_LINUX= or GRUB_CMDLINE_LINUX_DEFAULT=.

    Remove crashkernel=2G-16G:512M,16G-:768M.

  3. Then enter:

    Terminal window
    :wq //意思是保存并退出
  4. Then run:

    Terminal window
    sudo grub-mkconfig -o /boot/grub/grub.cfg

    to regenerate the GRUB configuration file.

  5. Restart the server, and the issue should be resolved.