Adding Swap space to an Ubuntu server in Azure
So a few weeks ago, I was playing around with building LLVM/Clang from source on my Azure hosted Ubuntu VM (a story for another time). The process would take a few hours, so I’d start it running in the evening, log out. But when I came back to check up on it in the morning, I kept getting these errors:
Obviously, something bad was happening, so I Googled around and it seems that the error often occurs when linking and not having enough memory. But wait, I’m sure I have plenty of memory in my Azure VM, 3.5 GB of RAM and some extra Swap space to boot.
OH…
.. and then I found this blog post.
Really, Microsoft? No Swap space? Not even a little?
Let’s go ahead and use the good ‘ol estimate of ~2x my physical RAM for the Swap space.
And now I have Swap space!
That’s much better.
EDIT: … or I guess I could have just snuck into Microsoft’s server farm and connected a light timer to the rack that was hosting my VM.