Proxmox VE 虚拟机cpu绑核教程

为什么要绑核

绑核是为了提高CPU的性能,减少上下文切换的性能损失。

精准的绑核,可以不浪费CPU的资源。

不同版本的绑核

7.3+版本

在官方7.3版本中放出,如果是7.3+的版本,直接在web上就可以绑定核心。

不同的翻译版本,可能不一样,可以在英文界面affinity对应。

7.3之前版本

这种方式需要使用taskset命令手动绑核。

比如 taskset -c 1-3 qm start 101

如果虚拟机已经在运行,可以找出pid,继续使用taskset -cp 1-3  [pid]进行绑定

绑核规则

同一个超线程组建议在一起。同一个socket下的cpu建议在一起。amd建议一个ccd的在一起。

绑核语法

语法就是根据taskset来的。

如果是要绑定cpu1到cpu10,就是1-10,如果要加上cpu19,就是1-10,19。中间用逗号隔开。

 

https://foxi.buduanwang.vip/virtualization/pve/2796.html/

评论

  1. ella
    Windows Edge 113.0.1774.42
    12月前
    2023-5-17 11:09:05

    The third CPU resource limiting setting, affinity, controls what host cores the virtual machine will be permitted to execute on. E.g., if an affinity value of 0-3,8-11 is provided, the virtual machine will be restricted to using the host cores 0,1,2,3,8,9,10, and 11. Valid affinity values are written in cpuset List Format. List Format is a comma-separated list of CPU numbers and ranges of numbers, in ASCII decimal.

    官方文档原话,7.3+的,CPU核心是从0开始算的

  2. somgthing
    Windows Edge 112.0.1722.39
    1年前
    2023-4-13 14:40:32

    笔误? “如果是要绑定cpu1到cpu10,就是1-10,如果要加上cpu19,就是1-10,9。中间用逗号隔开。” 应该是 1-10,19吧

    • 佛西 博主
      Macintosh Safari 16.4
      1年前
      2023-4-13 22:48:30

      嗯,是19,改了。谢谢

  3. ives
    Macintosh Edge 112.0.1722.34
    1年前
    2023-4-12 9:29:49

    64 x Intel(R) Xeon(R) CPU E5-2698 v3 @ 2.30GHz (2 插槽) 我试了一下 只开numa cpuz跑分单核360 多核8770 绑核不开numa 360/5600 这是啥原因啊 我确定绑核没问题 但并没有性能提升

    • 佛西 博主
      Macintosh Safari 16.4
      1年前
      2023-4-12 20:48:30

      不知道你怎么操作的


Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /www/wwwroot/foxi.buduanwang.vip_80/wwwroot/wp-content/themes/argon-theme-master/functions.php on line 1383

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇