question

VidyaSagar-3506 avatar image
0 Votes"
VidyaSagar-3506 asked VidyaSagar-3506 commented

Not able to allocate swap memory

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://docs.microsoft.com/en-us/troubleshoot/azure/virtual-machines/oom-swap-file-linux-vm

azure-virtual-machines
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

CristianSPIRIDON72 avatar image
0 Votes"
CristianSPIRIDON72 answered VidyaSagar-3506 commented

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.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@CristianSPIRIDON72 We are using two VM's. In the other one, it worked fine. Specs are mostly same between them.

0 Votes 0 ·