# 设定分配给虚拟机的处理器数量

Parallels Desktop for Mac 会根据 Mac CPU 中物理内核的数量自动计算允许的最大虚拟 CPU 数量。下面列出了针对系统中 N 个逻辑内核的分配方式（N 通常等于搭载 Apple Silicon 的系统中的物理内核数量，多亏了超线程技术，该数量是基于 Intel 的系统中物理内核数量的两倍）：

<table><thead><tr><th width="313">配置文件*</th><th>自动分配的虚拟内核数量</th></tr></thead><tbody><tr><td>生产力和软件测试</td><td>如果 N 小于 8，2 个虚拟内核；如果 N 大于等于 8，4 个虚拟内核</td></tr><tr><td>仅游戏</td><td>大于等于 N/2 的最小偶数（例如，对于 16 核 CPU，8 个虚拟内核；对于 18 核 CPU，10 个虚拟内核）</td></tr><tr><td>设计和软件开发</td><td>小于等于 N/2 的最大偶数（例如，对于 16 核 CPU，8 个虚拟内核；对于 18 核 CPU，也是 8 个虚拟内核）</td></tr><tr><td>所有其他场景</td><td>2 个虚拟内核</td></tr></tbody></table>

\*要详细了解配置文件，请参阅指南的[此页面](/pdfm-20-ug-zh_cn/parallels-desktop-for-mac-20-yong-hu-zhi-nan/zai-mac-shang-shi-yong-windows/you-hua-xing-neng/zhen-dui-you-xi-tu-xing-sheng-chan-li-huo-kai-fa-yong-tu-you-hua-xu-ni-ji.md)。

但是，如果您经常同时运行多个虚拟机，自动内核分配可能会导致资源冲突。我们建议手动配置分配给每个虚拟机的 CPU 数量。如需了解手动内核分配限制，请参阅[此页面](/pdfm-20-ug-zh_cn/parallels-desktop-for-mac-20-yong-hu-zhi-nan/parallels-desktop-pian-hao-she-zhi-he-xu-ni-ji-she-zhi/xu-ni-ji-she-zhi/ying-jian-she-zhi/cpu-yu-nei-cun-she-zhi.md)。

{% hint style="warning" %}
\*\*注意：\*\*虽然大多数现代化应用在设计时都考虑了多核处理器场景，但并非所有应用都能同样地通过增加可用内核数量而受益。增加虚拟内核的数量并非总能带来相应的性能提升。
{% endhint %}

要设置向虚拟机分配的处理器数量，请执行以下操作：

1. [关闭虚拟机](/pdfm-20-ug-zh_cn/parallels-desktop-for-mac-20-yong-hu-zhi-nan/zai-mac-shang-shi-yong-windows/ru-men/guan-bi-huo-zhong-zhi-windows.md)。
2. 打开**操作**菜单并选定**配置**。

   <figure><img src="/files/t7bbX7ICkMHCE7SGrjmJ" alt="" width="563"><figcaption></figcaption></figure>
3. 单击**硬件 > CPU 和内存**，然后从**处理器**菜单中选择一个数字。

{% hint style="info" %}
\*\*注意：\*\*在 Parallels Desktop for Mac 中，您可以向虚拟机分配最多 4 个内核。在 Parallels Desktop for Mac Pro Edition 中，您可以分配最多 16 个内核。
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.parallels.cn/pdfm-20-ug-zh_cn/parallels-desktop-for-mac-20-yong-hu-zhi-nan/gao-ji-zhu-ti/shi-yong-xu-ni-ji/she-ding-fen-pei-ji-xu-ni-ji-de-chu-li-qi-shu-liang.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
