• 调度执行
  • 切换(Context Switch)
    • CPU导出原线程指令和data到cache, 再导入新线程数据
  • 线程数
    • N(threads) = N(CPU) * U(CPU) * (1 + W/C)
      • N(CPU): CPU数
      • U(CPU): 期望CPU利用率, 0到1
      • W/C: wait时间/compute时间, (1+W/C)即运行时间/计算时间。用profiler、arthas分析
    • 压测决定