当前位置:首页 > 内存 > 正文

虚拟机启动内存分配多少合适(怎么给虚拟机分配内存)

  • 内存
  • 2023-12-20 21:44:03
  • 4782
How much memory is allocated to the virtual machine?

The simple answers to a few questions are as follows:

1. Is it really necessary to allocate 40G hard disk space to the virtual machine?

Depending on which mode is selected, there are two modes for virtual machine allocation of hard disk space, one is thick format (thick) and the other is It is a thin supply model (thin). For the first mode, if you allocate 40GB space to the virtual machine, then sorry, the virtual machine actually allocates 40GB space to the virtual machine on your physical hard disk. This space cannot be used by other programs except the virtual machine. In the folder where you store the virtual machine files, you will see a 40GB vmdk file. If you use the second thin provisioning mode, then if you allocate 40Gb space, 40GB will not actually be allocated immediately on the physical hard disk, but will depend on the actual space size of your virtual machine system. For example, after installing win7, it will probably About 8GB, then on your physical hard disk, you will see a vmdk file of about 8GB in size. In the future, as you install software or write other data, new space will be occupied on the physical hard disk at any time, and it can occupy up to 40GB.

2. Virtual and occupied memory:

After allocating memory to the virtual machine, the virtual machine will obtain the memory from the physical host. The amount of allocated memory occupied in the memory. This memory is not on the disk, but the actual memory of the physical host.
It should be noted that generally a virtual machine occupies the same size of hard disk space as the virtual machine memory on the physical hard disk as the system's swap area. This occupies the physical hard disk of the physical host.

3. The problem of space occupied by installing software on a virtual machine

Refer to the answer to the first question, if it is a thick format , then this space has been occupied. If it is thin provisioning mode, hard disk space will be occupied when installing software.

4. How to completely delete the virtual system?

There are generally two modes for deleting a virtual machine. One is to right-click on the interface to delete the virtual machine. Another option is to directly delete all the folders where the virtual machine is located. It is recommended to use the first mode.
If you want to delete virtualization software (such as vmware workstation), it is best to use vmware's own uninstall. This cannot directly delete the virtualization software folder.

5. Do you have to reinstall the virtual system if you encounter problems?

It is not necessary to reinstall. Reinstallation is generally considered only as a last resort.
When encountering a problem, generally speaking, the first thing to consider is to look at the logs of the virtual machine or the logs of the virtualization software. You can usually find the problem and solve it directly after you find it. This can increase your virtualization knowledge. If it really can't be solved, you can only reinstall it.

I hope the above answers can be helpful.

What is the best virtual memory setting?

Virtual memory is a memory management technology in computers. It is the basis for downloading software required by the computer. The larger the value, the smaller the amount of downloads. The larger the value, the better virtual memory setting. Let’s discuss it with everyone.
💻The physical memory is too small
If the physical memory is too small, you can set the virtual memory to be larger, which can be 2 times or 3 times of the physical memory.
🔢Custom size setting
We can customize the size of virtual memory. Right-click the computer and click "Properties", find "Advanced System Settings" on the left, click "Settings", find "Advanced", click "Change", remove the first √, and select a drive letter of your own for custom size settings ( If you really don’t know, you can set it according to the value in the picture), just restart after setting it.
🚫If the physical memory is too large, it will affect the computer performance
If the physical memory is already large, such as 4G or 8G, then you can only keep the default state or 1.5 times. If it is too large, it will affect the performance of the computer. Affect computer performance.
💾To make up for the shortage of memory sticks
The meaning of virtual memory is to set aside an area on the disk to be used as memory, a method to make up for the shortage of memory sticks.

What is the appropriate virtual machine setting?
1. Open the virtual machine software and select a virtual system.
2. Click the "Settings" button on the toolbar.
3. Open the settings window and click "System" to enter the tab interface.
4. The "Memory Size" under the motherboard is currently set to 2048M, which is 2G memory. You can drag to modify this size. If your memory is large enough, allocate a larger size, 4G , 6G, etc. Generally, 4G is almost enough for ordinary actual computers.
5. Click "Processor" to modify the number of processors. This size directly affects the speed of the system. It is also divided according to the actual size. For comparison, I chose 4.
6. Two hardware acceleration interfaces are checked.
7. Click the "Display" option to adjust the display size.
8. If you need to process some pictures, check "3D acceleration" and "2D video acceleration".
9. The above settings can basically solve the problem of the virtual machine being too stuck.

What is the appropriate setting for virtual memory?

1. If the computer memory is less than 4G, the virtual memory can generally be set to 2-4G. Theoretically, it is multiplied by 1.5 times the physical memory, but in actual use it can be adjusted flexibly, and there is no The fixed value can even be set to the same value as the physical memory. For example, a 4G computer is also set to 4G virtual memory.

2. If the computer has 8G memory, the virtual memory is mainly 4-12G. It is recommended to set it to 8G, because setting it to high will have little impact on performance. In most cases It is set to 8G, but basically this much cannot be used.

Note:

It is best not to set the virtual memory on the same disk as the system. The memory changes dynamically with the application. Changes, if it is located on the C drive, it is easy to cause disk fragmentation and affect the system running speed.

Therefore, it is best to set the virtual memory on disks with large remaining disk space and infrequently used disks, such as D and F. This can avoid the system from performing frequent read and write operations on the C disk and affecting the system speed. . Virtual memory only needs to be set once on a computer and can be set on any disk.