![当物理机只有1个CPU核心时,我想伪造一个4核机器](https://linux22.com/image/177064/%E5%BD%93%E7%89%A9%E7%90%86%E6%9C%BA%E5%8F%AA%E6%9C%891%E4%B8%AACPU%E6%A0%B8%E5%BF%83%E6%97%B6%EF%BC%8C%E6%88%91%E6%83%B3%E4%BC%AA%E9%80%A0%E4%B8%80%E4%B8%AA4%E6%A0%B8%E6%9C%BA%E5%99%A8.png)
我只有一个 1 核 CPU,但有些程序需要看到 4 个 CPU 才能正常工作(尽管它们不会使用全部)。
我正在使用 Ubuntu,我的 CPU 信息如下所示
ubuntu@z:~$ lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit
Byte Order: Little Endian
CPU(s): 1
On-line CPU(s) list: 0
Thread(s) per core: 1
Core(s) per socket: 1
Socket(s): 1
NUMA node(s): 1
Hypervisor vendor: KVM
Virtualization type: full
L1d cache: 32K
L1i cache: 32K
L2 cache: 4096K
NUMA node0 CPU(s): 0