:::: MENU ::::

How to fix a slow booting linux server

My debian 9 (stretch) server became slow and I was not sure what was causing it. Another thing I noticed was that it was taking longer than usual to boot. While booting, I also noticed a message showing up momentarily on the screen such as

“gave up waiting for suspend/resume device”

I also noticed that SWAP was not being utilized. Apparently, this happens when the UUID of the swap doesn’t match and swap is encrypted. I managed to fix it by the running code snippets given in this link

  1. Get the UUID of the swap by running the command: lsblk -f
  2. Note down the UUID and edit: /etc/initramfs-tools/conf.d/resume
  3. Replace the UUID with the correct one and run the command: update-initramfs -u
  4. Reboot and enjoy

This is assuming that you are a root user. You may have to use sudo prefix if you are not a root user. In case you are looking for a command to avoid typing things then you may refer to this link.

Leave a Reply

Your email address will not be published. Required fields are marked *