Home  >  Article  >  Can I run multiple virtual machines simultaneously on the same server?

Can I run multiple virtual machines simultaneously on the same server?

尚
Original
2019-12-20 09:30:0015045browse

Can I run multiple virtual machines simultaneously on the same server?

You can run multiple virtual machines on the same server at the same time. The specific number of virtual machines that can be run depends on the hardware configuration of your physical server and the resource consumption of the virtual machine. It depends on the situation. There is no fixed algorithm.

But there are generally several restrictions:

1. Memory memory is basically a hard limit. Physical server memory is definitely limited.

For example, if a server has 8 cores and 8G memory, the hypervisor usually occupies 512M of memory, leaving about 7.5G of memory. Assuming that each virtual machine is configured with 1 core cpu and 1G of memory, then Up to 7 such virtual machines can run on this machine. When creating a new virtual machine, an error message will be reported saying that there is insufficient memory. In this case, each virtual machine can have up to 1 CPU core computing power and 1G of memory space under full load.

Of course, today’s hypervisors basically support the over-commit function. That is to say, if your memory is only 8G, but you set a certain proportion of overcommit, such as 50%, then you can allocate the maximum 12G memory.

Still the above example, if overcommit is set to 50%, then up to 11 virtual machines (1core, 1Gmem) can be created. In terms of server virtualization, it is recommended that overcommit is not set too high, usually 20%. In terms of desktop virtualization, you can set overcommit to 50%.

2. Network card If the server has only one network card, the network traffic of all virtual machines will go out through one network card. The more virtual machines there are, the more network traffic will be required for each virtual machine. The less bandwidth the machine can use, this needs to be considered comprehensively. For example, using multiple network cards, etc.

3. CPU resources are basically polled using time division multiplexing, that is, time slices.

4. Is disk I/O a local disk or a network disk? If it is a network disk, is it using iSCSI or optical fiber? Different situations have different loads.

Generally, the number of virtual machines that can be run on a server needs to be calculated by considering the overall situation of the physical server, virtual machine load, etc. There is no fixed formula.

The above is the detailed content of Can I run multiple virtual machines simultaneously on the same server?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn