Gaining additional memory when running Linux on Azure Extra Small Instances

If you use Azure to host your Linux VMs (I prefer Azure extra-small instances over EC2 tiny instances because they allow you to put swap on ephemeral storage) you may notice that you only have 541MB of free memory rather than the 768MB promised by Microsoft. This is because the Linux crash kernel by default takes up ~128MB on an extra-small instance. You can change this by removing the crashkernel=auto reference inside your /etc/grub/grub.conf.


Before:

[root@localhost ~]$ free -m
             total     used     free     shared    buffers     cached
Mem:         541        306     235         0         12        175
-/+ buffers/cache:      118     422
Swap:         2047        0     2047

After:

[root@localhost ~]$ free -m
             total     used     free     shared    buffers     cached
Mem:         670        299     370         0         12        165
-/+ buffers/cache:      121     548
Swap:         2047        0     2047

Leave a Reply

Your email address will not be published.