# Memory overcommitment

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Memory_overcommitment
> Markdown URL: https://mediated.wiki/source/Memory_overcommitment.md
> Source: https://en.wikipedia.org/wiki/Memory_overcommitment
> Source revision: 1246871311
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

'''Memory overcommitment''' is a concept in [computing](/source/computing) that covers the assignment of more [memory](/source/Random-access_memory) to virtual computing devices (or processes) than the physical machine they are hosted, or running on, actually has. This is possible because [virtual machine](/source/virtual_machine)s (or processes) do not necessarily use as much memory at any one point as they are assigned, creating a buffer. If four virtual machines each have 1&nbsp;GB of memory on a physical machine with 4&nbsp;GB of memory, but those virtual machines are only ''using'' 500&nbsp;MB, it is possible to create additional virtual machines that take advantage of the 500&nbsp;MB each existing machine is leaving free.<ref>{{cite book|last=Portnoy|first=Matthew|title=Virtualization Essentials|url=https://archive.org/details/virtualizationes00port|url-access=limited|publisher=John Wiley & Sons|date=2012|pages=[https://archive.org/details/virtualizationes00port/page/n79 60]|isbn=978-1118240175}}</ref> [Memory swapping](/source/Memory_swapping) is then used to handle spikes in memory usage. The disadvantage of this approach is that memory swap files are slower to read from than 'actual' memory, which can lead to performance drops.<ref>{{cite book|last=Siebert|first=Eric|title=VMware VI3 Implementation and Administration|url=https://archive.org/details/whatsupamericani00mcpa_044|url-access=limited|publisher=Prentice Hall Professional|date=2009|pages=[https://archive.org/details/whatsupamericani00mcpa_044/page/n176 166]|isbn=978-0137008599}}</ref> Another disadvantage is that, when running out of real memory, the system is relying on the applications to not use the additional memory despite it being allocated to them. Should a program do so anyway, it or another has to be killed in order to free up memory to prevent the system from freezing. The [OOM Killer](/source/Out_of_memory) is what performs this task.

While memory overcommitment is usually talked about in the context of [virtualization](/source/virtualization), it is actually a generalised concept; [Windows NT](/source/Windows_NT) contained overcommitment features, as do most modern generalised operating systems,<ref>{{Cite web |url=https://www.sepago.com/blog/2008/09/25/vmware-vs-microsoft-why-memory-overcommitment-is-useful-in-production-and-why |title=VMware vs. Microsoft: Why Memory Overcommitment is Useful in Production and Why Microsoft Denies it |access-date=22 April 2015 |archive-date=5 March 2016 |archive-url=https://web.archive.org/web/20160305041600/https://www.sepago.com/blog/2008/09/25/vmware-vs-microsoft-why-memory-overcommitment-is-useful-in-production-and-why |url-status=bot: unknown }}</ref> including the [Linux kernel](/source/Linux_kernel).<ref>{{cite web|url=https://blog.csdn.net/maimang1001/article/details/29630477|title=When Linux Runs Out of Memory|last=Santosa|first= Mulyadi|publisher=O'Reilly Media|accessdate=22 April 2015}}</ref>

== See also ==
* [Memory ballooning](/source/Memory_ballooning)

==References==
{{Reflist}}

Category:Virtual machines
Category:Hardware virtualization

{{compsci-stub}}

---
Adapted from the Wikipedia article [Memory overcommitment](https://en.wikipedia.org/wiki/Memory_overcommitment) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Memory_overcommitment?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
