39.8. 查看 CPU 压力测试机制

CPU 压力测试包含很多用于设置 CPU 的机制。您可以使用 哪个 功能输出输出来查看所有机制。

如果您没有指定测试方法,默认情况下,Eessor 会以大约循序检查所有压力者,从而利用每个压力测试 CPU。

先决条件

  • 系统上的 root 权限。

流程

  1. 打印所有可用的压力机制,使用 该选项

    # stress-ng --cpu-method which
    
    cpu-method must be one of: all ackermann bitops callfunc cdouble cfloat clongdouble correlate crc16 decimal32 decimal64 decimal128 dither djb2a double euler explog fft fibonacci float fnv1a gamma gcd gray hamming hanoi hyperbolic idct int128 int64 int32
  2. 使用 --cpu-method 选项指定特定的 CPU 压力方法:

    # stress-ng --cpu 1 --cpu-method fft -t 1m