Home  >  Article  >  How to fix VMMEM high memory and CPU usage

How to fix VMMEM high memory and CPU usage

WBOY
WBOYforward
2023-04-18 16:40:0311522browse

Vmmem or virtual memory may cause high CPU or memory usage due to various factors. One of the key reasons behind this issue is some resource-intensive processes running in the virtual host. However, if this is not the case and the VM still consumes a lot of system resources in idle mode, it could be a driver failure. This slows down the virtual machine and your work may stop. So, follow the steps below to resolve the issue quickly.

Fix 1 – End all resource-intensive processes

If you are running some heavy applications or software versions, expect vmmem to use a lot of resources. There is nothing unusual about this. Even if you can kill these processes directly, it will free up more resources for your device.

NOTE – You can end these processes in a variety of ways. These steps may vary depending on the host operating system. We have shown the steps in Windows operating system.

1. Open the virtual machine.

2. There, right-click the Windows icon and click "Task Manager" to open it.

How to fix VMMEM high memory and CPU usage

#3. When Task Manager appears, go to the Processes tab.

4. There, look for any processes taking up CPU usage exceeding 70%. If you can identify any such process, right-click on it and click "End Task".

How to fix VMMEM high memory and CPU usage

#This way, any unnecessary processes consuming power and resources in the background can be killed. This will free up more resources and vmmem will not have high CPU or RAM usage.

Fix 2 – Restart WSL

Try restarting Windows Subsystem for Linux (WSL) on your computer.

1. Open the search bar and type "cmd".

2. Then, right-click "Command Prompt" and click "Run as administrator".

How to fix VMMEM high memory and CPU usage

3. After opening the CMD terminal, you can easily copy-paste this code and press Enter

wsl --shutdown

How to fix VMMEM high memory and CPU usage

This should shut down the Windows Subsystem for Linux on your computer. The virtual machine will shut down automatically.

If this doesn’t work, you can perform the following steps –

1. Open File Explorer.

2. Then you have to go to WSL configuration file. You can find it at this address -

C:\Users\your-username\.wslconfig

How to fix VMMEM high memory and CPU usage

3. This configuration file will open in Notepad.

4. So when it does this, copy-paste this line into the config file.

[wsl2]                                                                           guiApplications=false

How to fix VMMEM high memory and CPU usage

5. Next, just click "

File" and "Save" to save the configuration file immediately .

How to fix VMMEM high memory and CPU usage

After this, just close the

.wslconfig file.

Then you must

restart the system. Rebooting the system completely terminates the vmmem process.

Note

You have stopped the vmmem process and shut down Windows Subsystem for Linux (WSL). Therefore, you cannot run any Linux-based GUI applications. To do this, the WSL service must be restarted and you can follow these simple steps:

1. Click on the "

Search" box and type "PowerShell".

2. Then, right-click "Windows PowerShell" and click "Run as administrator"

Open as administratorPowerShell.

How to fix VMMEM high memory and CPU usage

3. Now, just

write this line and press Enter key to restart the WSL service.

Restart-Service LxssManager

How to fix VMMEM high memory and CPU usage

After that, close the PowerShell terminal. Now you can use the Linux GUI application again.

Fix 3 – Disable running virtual machines

If ending the process or shutting down the VM does not work, you can try killing the virtual machines that are already running on the system.

1. You can do this through PowerShell with administrator privileges. So, write "

powershell".

2. Then, right-click "

Windows PowerShell" and click "Run as administrator".

How to fix VMMEM high memory and CPU usage

3. When the PowerShell terminal opens,

write this exact line here and press Enter key. This command will display a list of virtual machines and their current status.

wsl -l -v

How to fix VMMEM high memory and CPU usage

4. 最后,您可以使用此特定代码停止正在运行的虚拟机 –

wsl -t nameofvm

[现在,将“nameofvm”替换为系统上运行的虚拟机的名称。假设你有 Kali Linux,命令是这样的——

wsl -t kali-linux

]

How to fix VMMEM high memory and CPU usage

终止 Linux 机器后,vmmem 不会消耗那么多 CPU 或 RAM 处理能力。

修复4 –增加分配的资源

已分配给虚拟机的主机资源可能供应不足,具体取决于您在虚拟机上执行的操作。因此,如果您正在运行某些内容或测试需要大量资源的版本,vmmem 将消耗大量的 CPU 和 RAM。

Hyper-V 用户

1. 打开 Hyper-V 管理器

2.在那里,右键单击列表中的虚拟机,然后点击“设置”。

How to fix VMMEM high memory and CPU usage

3.在“设置”页面上,您可以找到与“内存”,“处理器”相关的薮猫选项。

4. 现在,您可以增加虚拟机的内存和处理器计数。

How to fix VMMEM high memory and CPU usage

如果虚拟机已在系统上运行,则必须重新启动它才能使此更改生效。

VMWare 工作站用户

1. 打开 VMware 工作站

2.然后,在左侧窗格中,您可以找到堆叠为一列的所有虚拟机。

3. 接下来,右键单击虚拟机,然后单击“设置”。

How to fix VMMEM high memory and CPU usage

4.现在,转到“硬件”部分。

5.在那里,您可以看到分配的“内存”和“处理器”。

根据您的需要和资源限制调整这些设置。

How to fix VMMEM high memory and CPU usage

您必须关闭虚拟机一次,然后重新启动它。

这样,vmmem 将消耗更少的资源。

附加积分 –

您应该注意某些要点。

1.检查是否有任何进程正在流失资源。这样,所有资源都被浪费了 所以,所以从进程管理器测试它。

2. 恶意软件和潜在有害感染可能导致资源过度使用。因此,运行完整的恶意软件扫描以识别并读取恶意软件文件。

The above is the detailed content of How to fix VMMEM high memory and CPU usage. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:yundongfang.com. If there is any infringement, please contact admin@php.cn delete