Not able to allocate swap memory

Vidya Sagar 1 Reputation point
2021-08-02T14:47:56.873+00:00

Suddenly my vm will get extremely slow and disk read operations will sky rocket.
After some digging around, it's because of insufficient ram.
One recommended solution was to create a swap file.
I followed the steps mentioned in the below link but swap memory is not getting created. In htop, it's showing 0k/0k Swp.

https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/oom-swap-file-linux-vm

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
9,044 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Cristian SPIRIDON 4,486 Reputation points Volunteer Moderator
    2021-08-03T05:23:31.573+00:00

    I think the tutorial is incomplete - not covering all possible situations.
    Linux uses a different partition for swap. If you did not created that at system install then later might not be possible.

    Can you try to follow the tutorial on a brand new VM?

    Hope this helps.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.