gpt4 book ai didi

linux - 隔离 cpu 内核(物理的还是逻辑的?)

转载 作者:太空宇宙 更新时间:2023-11-04 10:58:15 28 4
gpt4 key购买 nike

我认为内核参数“isolcpus”接受物理核心 ID 是否正确?因此,如果我有 4 个物理内核,并启用了超线程,总共有 8 个内核,那么我只能在 isolcpus 参数中指定 cpu 内核 1..3(内核 0 用于操作系统)?

谢谢。

最佳答案

红帽大师 Daniel Macphersona Red Hat community discussion 中说:

So you might need to restrict the kernel from accessing the CPUs you have pinned to the instance. For example, let's say I have an 8 core CPU with dual hyper-threading, which results in 16 vcpus. I want to use core 0 for my OpenStack services and cores 1-7 for instances. I'd need to tell the kernel to leave those cores alone. This means I'd need to tell the kernel to leave alone vcpus 1-7 and 9-15:

$ sudo grubby --update-kernel=ALL --args="isolcpus=1,2,3,4,5,6,7,9,10,11,12,13,14,15"
$ sudo grub2-install /dev/sda
$ sudo reboot

据此,您指定 logical CPU cores isolcpus 内核参数。

关于linux - 隔离 cpu 内核(物理的还是逻辑的?),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27990555/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com